mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-28 15:20:54 +07:00
This patch fixes the notes from the code review, it includes: - Renaming the testData files so their titles are more informative - Moving `PsiLiteralUtil#append` to `RedundantStringFormatCallInspection` and renaming it to `joinWithNewlineToken` so it does not have to deal with the escape characters' problems - `RedundantStringFormatCallInspection` only highlights the "`format`" word in `String.format` in order to reduce the warnings area in code visually Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com> GitOrigin-RevId: 07b3b3b2d24e500774928d406e274dd4cb20bd5d
29 lines
1004 B
Java
29 lines
1004 B
Java
// "Fix all 'Redundant call to 'String.format()'' problems in file" "true"
|
|
import java.io.PrintStream;
|
|
|
|
class Main {
|
|
static {
|
|
System.out.print(String.<caret>format(/* begin */ "Hello, World!"/* end */));
|
|
System.out.print(String.format(/* begin */ "Hello, World!%n"/* end */));
|
|
}
|
|
|
|
Main() {
|
|
System.out.print(String.format(/* begin */ "Hello, World!"/* end */));
|
|
System.out.print(String.format(/* begin */ "Hello, World!%n"/* end */));
|
|
}
|
|
void f() {
|
|
System.out.print(String.format(/* begin */ "Hello, World!"/* end */));
|
|
System.out.print(String.format(/* begin */ "Hello, World!%n"/* end */));
|
|
}
|
|
void out(PrintStream printer) {
|
|
printer.print(String.format(/* begin */ "Hello, World!"/* end */));
|
|
printer.print(String.format(/* begin */ "Hello, World!%n"/* end */));
|
|
}
|
|
void caller() {
|
|
print(String.format(/* begin */ "Hello, World!"/* end */));
|
|
print(String.format(/* begin */ "Hello, World!%n"/* end */));
|
|
}
|
|
|
|
static void print(String value) {}
|
|
}
|