RedundantStringOperation: id changed, merger updated (IDEA-CR-34351)

This commit is contained in:
Tagir Valeev
2018-11-04 10:54:34 +07:00
parent d910120ac7
commit 11e73d577f
7 changed files with 29 additions and 8 deletions

View File

@@ -5,6 +5,10 @@ class Foo {
// check merger
//noinspection SubstringZero
String sOld = s.substring(0x0);
//noinspection RedundantStringOperation
String sOld2 = s.substring(0x0);
//noinspection StringOperationCanBeSimplified
String sNew = s.substring(0x0);
String s2 = s;
String s3 = s.substring(0, 20);
/*up until the string length*/

View File

@@ -5,6 +5,10 @@ class Foo {
// check merger
//noinspection SubstringZero
String sOld = s.substring(0x0);
//noinspection RedundantStringOperation
String sOld2 = s.substring(0x0);
//noinspection StringOperationCanBeSimplified
String sNew = s.substring(0x0);
String s2 = s.su<caret>bstring(0x0);
String s3 = s.substring(0, 20);
String s4 = s.substring(0, /*up until the string length*/ s.length());