@Override
    public void visitMethod(@NotNull PsiMethod method) {
      // no call to super, so it doesn't drill down
      final PsiClass aClass = method.getContainingClass();
      if (aClass == null) {
        return;
      }
      if (aClass.isInterface() || aClass.isAnnotationType() || aClass.isRecord()) {
        return;
      }
      if (!SerializationUtils.isSerializable(aClass)) {
        return;
      }
      if (!SerializationUtils.isReadObject(method)) {
        return;
      }
      final boolean defaultReadObjectCalled =
        ControlFlowUtils.elementContainsCallToMethod(method, "java.io.ObjectInputStream",
                                                     PsiTypes.voidType(), "defaultReadObject");
      final PsiField[] fields = aClass.getFields();
      if (defaultReadObjectCalled) {
        for (final PsiField field : fields) {
          if (field.hasModifierProperty(PsiModifier.TRANSIENT) &&
              !isFieldInitialized(field, method)) {
            registerFieldError(field);
          }
        }
      }
      else {
        for (final PsiField field : fields) {
          if (!isFieldInitialized(field, method)) {
            registerFieldError(field);
          }
        }
      }
    }
@Override
    public void visitMethod(@NotNull PsiMethod method)