mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
This patch adds processing of Java 14's text blocks to RedundantStringFormatCallInspection and fixes the problems from the code review Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com> GitOrigin-RevId: 126cfc001e7b201b62060333de7f71480403fb93
53 lines
1.4 KiB
Java
53 lines
1.4 KiB
Java
// "Fix all 'Redundant call to 'String.format()'' problems in file" "true"
|
|
|
|
import java.io.PrintStream;
|
|
|
|
class Main {
|
|
static {
|
|
System.out.print(/* one */"""
|
|
Hello
|
|
""" /* two */);
|
|
System.out.printf(/* three */"""
|
|
Hello%n
|
|
""" /* four */);
|
|
}
|
|
|
|
Main() {
|
|
System.out.print(/* one */"""
|
|
Hello
|
|
""" /* two */);
|
|
System.out.printf(/* three */"""
|
|
Hello%n
|
|
""" /* four */);
|
|
}
|
|
|
|
void f() {
|
|
System.out.print(/* one */"""
|
|
Hello
|
|
""" /* two */);
|
|
System.out.printf(/* three */"""
|
|
Hello%n
|
|
""" /* four */);
|
|
}
|
|
|
|
void out(PrintStream printer) {
|
|
printer.print(/* one */"""
|
|
Hello
|
|
""" /* two */);
|
|
printer.printf(/* three */"""
|
|
Hello%n
|
|
""" /* four */);
|
|
}
|
|
|
|
void caller() {
|
|
printf(/* one */"""
|
|
Hello
|
|
""" /* two */);
|
|
printf(/* three */"""
|
|
Hello%n
|
|
""" /* four */);
|
|
}
|
|
|
|
static void printf(String value) {}
|
|
}
|