IDEA-205482 "Use removal by object" fix may change semantics for List<Integer>

This commit is contained in:
Tagir Valeev
2019-01-16 16:04:35 +07:00
parent 32e8190948
commit c51dbd9bc6
3 changed files with 20 additions and 0 deletions
@@ -0,0 +1,8 @@
// "Use removal by object" "true"
import java.util.List;
class Test {
void test(List<Integer> list, int key) {
list.remove((Integer) key);
}
}
@@ -0,0 +1,9 @@
// "Use removal by object" "true"
import java.util.List;
class Test {
void test(List<Integer> list, int key) {
int idx = list.indexOf(key);
list.r<caret>emove(idx);
}
}