mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IG: highlight constructor call problems too (IDEA-173852)
This commit is contained in:
+6
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2016 Dave Griffith, Bas Leijdekkers
|
||||
* Copyright 2003-2017 Dave Griffith, Bas Leijdekkers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -83,9 +83,12 @@ public class NullArgumentToVariableArgMethodInspection extends BaseInspection {
|
||||
private static class NullArgumentToVariableArgVisitor extends BaseInspectionVisitor {
|
||||
|
||||
@Override
|
||||
public void visitMethodCallExpression(@NotNull PsiMethodCallExpression call) {
|
||||
super.visitMethodCallExpression(call);
|
||||
public void visitCallExpression(PsiCallExpression call) {
|
||||
super.visitCallExpression(call);
|
||||
final PsiExpressionList argumentList = call.getArgumentList();
|
||||
if (argumentList == null) {
|
||||
return;
|
||||
}
|
||||
final PsiExpression[] arguments = argumentList.getExpressions();
|
||||
if (arguments.length == 0) {
|
||||
return;
|
||||
|
||||
+7
@@ -25,4 +25,11 @@ class X {
|
||||
public static String join(CharSequence delimiter, CharSequence... elements) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
class AB {
|
||||
AB(String msg, Object... args) {}
|
||||
|
||||
void m(String e) {
|
||||
new AB("reactor", <warning descr="Confusing argument 'null', unclear if a varargs or non-varargs call is desired">null</warning>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user