mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
Revert substring(x).indexOf(y) -> indexOf(y, x) (IDEA-219640, case#3); was incorrect replacement
GitOrigin-RevId: f62ccdd76bd6353fe1bce95fe17ab4b3ca507dce
This commit is contained in:
committed by
intellij-monorepo-bot
parent
30fbc0441a
commit
98792cbf73
@@ -1,12 +0,0 @@
|
||||
// "Fix all 'Redundant String operation' problems in file" "true"
|
||||
class X {
|
||||
void test(String s) {
|
||||
/*1*/
|
||||
/*2*/
|
||||
int pos = s/*3*/.indexOf("foo", 10);
|
||||
int posBounded = s.substring(10, 20).indexOf("foo");
|
||||
int posChar = s.indexOf('f', 10);
|
||||
int posIdx = s.substring(10).indexOf('f', 2);
|
||||
int posFromZero = s.indexOf("xyzt") > 0;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// "Fix all 'Redundant String operation' problems in file" "true"
|
||||
class X {
|
||||
void test(String s) {
|
||||
int pos = s.substr<caret>ing(/*1*/10/*2*/)/*3*/.indexOf("foo");
|
||||
int posBounded = s.substring(10, 20).indexOf("foo");
|
||||
int posChar = s.substring(10).indexOf('f');
|
||||
int posIdx = s.substring(10).indexOf('f', 2);
|
||||
int posFromZero = s.substring(0).indexOf("xyzt") > 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user