@Override
    public void visitMethodCallExpression(@NotNull PsiMethodCallExpression methodCallExpression) {
      super.visitMethodCallExpression(methodCallExpression);

      if (!MethodCallUtils.isSimpleCallToMethod(methodCallExpression,
                                                "java.io.ObjectOutputStream", PsiTypes.voidType(), "writeObject",
                                                CommonClassNames.JAVA_LANG_OBJECT)) {
        return;
      }
      final PsiExpressionList argumentList = methodCallExpression.getArgumentList();
      final PsiExpression[] arguments = argumentList.getExpressions();
      if (arguments.length != 1) {
        return;
      }
      final PsiExpression argument = arguments[0];
      final PsiType argumentType = argument.getType();
      if (argumentType == null) {
        return;
      }
      if (SerializationUtils.isProbablySerializable(argumentType)) {
        return;
      }
      if (CommonClassNames.JAVA_LANG_OBJECT.equals(argumentType.getCanonicalText())) {
        // to prevent false positives.
        return;
      }
      registerError(argument);
    }
@Override
    public void visitMethodCallExpression(@NotNull PsiMethodCallExpression methodCallExpression)