mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IG: highlight all argument problems, not just the first (IDEA-172286)
This commit is contained in:
-1
@@ -176,7 +176,6 @@ public class MalformedFormatStringInspectionBase extends BaseInspection {
|
||||
}
|
||||
if (validator != null && !validator.valid(argumentType)) {
|
||||
registerError(argument, validators, Integer.valueOf(argumentCount), argumentType, validator);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -117,6 +117,13 @@ public class MalformedFormatString {
|
||||
System.out.printf("%c %<C", '\u00A9');
|
||||
System.out.printf("%o %<o", 15);
|
||||
}
|
||||
|
||||
private int count1;
|
||||
private int count2;
|
||||
|
||||
public String highlightBothArguments() {
|
||||
return String.format("count 1: %f, count 2: %f", <warning descr="Argument type 'int' does not match the type of the format specifier '%f'">count1</warning>, <warning descr="Argument type 'int' does not match the type of the format specifier '%f'">count2</warning>);
|
||||
}
|
||||
}
|
||||
class A {
|
||||
void m(Formattable f) {
|
||||
|
||||
Reference in New Issue
Block a user