mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
IDEA-182004 Collection.containsAll() can be simplified in certain cases
RedundantCollectionOperation: strings externalized, description fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'contains'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void test(List<String> list) {
|
||||
list.contains("foo");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Objects.equals'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
final boolean ff = Objects.equals("foo", "bar");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'contains'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void test(List<String> list) {
|
||||
list.con<caret>tainsAll(Collections.singleton("foo"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Objects.equals'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
final boolean ff = Collections.singleton("foo").contai<caret>ns("bar");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user