mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-20 03:20:56 +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
20 lines
436 B
Java
20 lines
436 B
Java
// "Fix all 'Redundant call to 'String.format()'' problems in file" "true"
|
|
package java.lang;
|
|
|
|
class String {
|
|
String(Object original) {}
|
|
public native String formatted(Object... args);
|
|
}
|
|
|
|
class Main {
|
|
static {
|
|
/* 6 */
|
|
String s = (/* 1 */ new /* 2 */ String(/* 3 */"""
|
|
Hello, World!
|
|
"""/* 4 */)/* 5 */);
|
|
String s1 = new String("""
|
|
%s, %s!
|
|
""").formatted("Hello", "World");
|
|
}
|
|
}
|