void (@NotNull PsiVariable psiVariable, @Nullable PsiClass containingClass) { if (psiVariable.hasModifierProperty(PsiModifier.TRANSIENT) || psiVariable.hasModifierProperty(PsiModifier.STATIC)) { return; } if (!SerializationUtils.isSerializable(containingClass)) { return; } PsiType variableType = psiVariable.getType(); if (SerializationUtils.isProbablySerializable(variableType)) { return; } PsiClass variableClass = PsiUtil.resolveClassInClassTypeOnly(variableType); if (variableClass != null && isIgnoredSubclass(variableClass)) { return; } if (SerializationUtils.hasWriteObject(containingClass) || SerializationUtils.hasWriteReplace(containingClass)) { return; } if (AnnotationUtil.isAnnotated(psiVariable, ignorableAnnotations, 0)) { return; } PsiIdentifier nameIdentifier = psiVariable.getNameIdentifier(); assert nameIdentifier != null; registerError(nameIdentifier, psiVariable); }