mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
ChangeToAppendUtil: do not add useless .append("")
Partially fixes IDEA-180178 String concatenation as argument to 'StringBuilder.append()' call should be smarter
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Convert variable 'res' from String to StringBuilder" "true"
|
||||
|
||||
public class Main {
|
||||
String test(int[] ints) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
for (int i : ints) {
|
||||
res.append(i);
|
||||
}
|
||||
return res.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Convert variable 'res' from String to StringBuilder" "true"
|
||||
|
||||
public class Main {
|
||||
String test(int[] ints) {
|
||||
String res = "";
|
||||
for (int i : ints) {
|
||||
res = res <caret>+ i + "";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user