mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
substring(x).indexOf(y) -> indexOf(y, x) (IDEA-219640, case#3)
GitOrigin-RevId: aab34215f1dc50e33af12cc56954dc17b9104318
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4e9f723467
commit
7f8d9a2372
@@ -0,0 +1,11 @@
|
||||
// "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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user