mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-26 16:31:26 +07:00
IDEA-253512: Warn about possible O(N^2) in AbstractSet#removeAll calls
GitOrigin-RevId: 76f59d4f019482420142cdf760be3f9e4c7f4d1e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
de9bf11e00
commit
d4dbc49dab
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'removals.forEach(source::remove)'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void foo(Set<Integer> source, ArrayList<Integer> removals) {
|
||||
removals.forEach(source::remove);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'removals.forEach(source::remove)'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void foo(Set<Integer> source, List<Integer> removals) {
|
||||
removals.forEach(source::remove);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'removals.forEach(source::remove)'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void foo(Set<Integer> source, ArrayList<Integer> removals) {
|
||||
source.removeAll(removals)<caret>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace with 'removals.forEach(source::remove)'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void foo(Set<Integer> source, List<Integer> removals) {
|
||||
source.removeAll(removals)<caret>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user