mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 23:51:37 +07:00
GitOrigin-RevId: eaddc0dbf65a0b2066f52ff75b77418cde20fb82
28 lines
844 B
Java
28 lines
844 B
Java
// "Fix all 'Redundant 'String' operation' problems in file" "true"
|
|
import static java.lang.StringTemplate.RAW;
|
|
|
|
class Foo {
|
|
void test() {
|
|
String str1 = <warning descr="String template can be converted to a plain string literal">STR<caret></warning>."""
|
|
my
|
|
long
|
|
simle
|
|
string
|
|
""";
|
|
|
|
String template = "template";
|
|
String str2 = STR."""
|
|
my
|
|
long
|
|
\{template}
|
|
string
|
|
""";
|
|
|
|
String str3 = <warning descr="String template can be converted to a plain string literal">StringTemplate.STR</warning>."Simple string";
|
|
String str4 = StringTemplate.STR."Simple \{template}";
|
|
|
|
String str5 = STR."Simple \{template} " + <warning descr="String template can be converted to a plain string literal">STR</warning>."Simple string" + "str";
|
|
|
|
StringTemplate str6 = RAW."Hi!";
|
|
}
|
|
} |