void (@NotNull PsiVariable field, @Nullable PsiClass containingClass) { if (!SerializationUtils.isSerializable(containingClass)) return; if (!HardcodedMethodConstants.SERIAL_VERSION_UID.equals(field.getName())) return; final boolean rightReturnType = PsiTypes.longType().equals(field.getType()); boolean isStaticField = field.hasModifierProperty(STATIC); if (rightReturnType && isStaticField && field.hasModifierProperty(PRIVATE) && field.hasModifierProperty(FINAL)) return; PsiIdentifier identifier = field.getNameIdentifier(); assert identifier != null; registerError(identifier, Boolean.valueOf(rightReturnType && (!containingClass.isRecord() || isStaticField))); }