mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
RedundantStringOperationInspection: warn about append(s.substring(x, y))
Replaceable with append(s, x, y) Fixes IDEA-185652 Improve StringBulder.append(s.substring(1,2)) intention Also optimization of new expression resolution
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// "Remove redundant 'substring()' call" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(args[0], 3, 4);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Remove redundant 'substring()' call" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(args[0].subs<caret>tring(3, 4));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user