IG: highlight all argument problems, not just the first (IDEA-172286)

This commit is contained in:
Bas Leijdekkers
2017-06-04 12:32:12 +02:00
parent 72749bfab4
commit 324e0f1dd1
2 changed files with 7 additions and 1 deletions
@@ -176,7 +176,6 @@ public class MalformedFormatStringInspectionBase extends BaseInspection {
}
if (validator != null && !validator.valid(argumentType)) {
registerError(argument, validators, Integer.valueOf(argumentCount), argumentType, validator);
return;
}
}
}
@@ -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) {