Files
openide/java/java-tests/testData/codeInsight/replaceStringFormat/beforeStringFormatWithArgsAndTokensPassedToPrintf.java
Bas Leijdekkers df2af98547 IG: don't warn on call to .formatted() when qualifier contains %n (IDEA-284569)
GitOrigin-RevId: e1b9a826f67e0209f82810ed19f907b2d0161605
2022-01-06 20:08:21 +00:00

33 lines
921 B
Java

// "Fix all 'Redundant call to 'String.format()'' problems in file" "true"
import java.io.PrintStream;
import java.util.Locale;
import static java.lang.String.format;
class Main {
static {
System.out.<caret>printf(/* one */ "hello" /* two */);
System.out.printf(/* one */ ("hello") /* two */;
System.out.printf(((/* one */ ("hello") /* two */)));
}
Main() {
System.out.printf(/* one */ ("hello") /* two */);
System.out.printf(((/* one */ ("hello") /* two */)));
}
void f() {
System.out.printf(/* one */ ("hello") /* two */);
System.out.printf(((/* one */ ("hello") /* two */)));
}
void out(PrintStream printer) {
printer.printf(/* one */ ("hello") /* two */);
printer.printf(((/* one */ ("hello") /* two */)));
}
void caller() {
printf(/* one */ ("hello") /* two */);
printf(((/* one */ ("hello") /* two */)));
}
static void printf(String value) {}
}