mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 23:31:05 +07:00
[java] IJ-CR-167924 IDEA-371865 Inspection to convert 'System.out'<->'IO'
- add array case (cherry picked from commit fb6b84584ef3778f9b03216d3df57bfea1433b84) (cherry picked from commit 75d20e2763b7b7506ccab939805cd9d18aa3d745) IJ-MR-169535 GitOrigin-RevId: 8268a8491f2be9eedca68f0d75f71ac61e6f7795
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d3b08c4011
commit
3e2d137fdf
@@ -319,6 +319,8 @@ public interface CallMatcher extends Predicate<PsiMethodCallExpression> {
|
||||
* The resulting matcher enforces the following criteria for unresolved calls:
|
||||
* - Method name must match the specified names.
|
||||
* - The argument list must match certain conditions based on parameter types.
|
||||
* - Checking types is limited and checks only basic cases. Generics, primitive conversions, and so on are not supported and should be checked separately.
|
||||
* - Class name must match the specified class name.
|
||||
* - Class name must end with qualifier expressions. Qualifier expression should be unresolved.
|
||||
* - Call is checked as it is static.
|
||||
* <p>
|
||||
@@ -445,7 +447,10 @@ public interface CallMatcher extends Predicate<PsiMethodCallExpression> {
|
||||
else {
|
||||
parameter = myParameters[myParameters.length - 1];
|
||||
}
|
||||
if (!expressionTypeMatches(parameter, arg)) return false;
|
||||
if (!(expressionTypeMatches(parameter, arg) ||
|
||||
(myParameters.length - 1 == i && args.length == myParameters.length &&
|
||||
parameter.endsWith("...") &&
|
||||
expressionTypeMatches(parameter.substring(0, parameter.length() - 3) + "[]", arg)))) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user