Files
openide/java/java-tests/testData/inspection/java8CollectionRemoveIf/afterForEachRemoveArrayList.java
Tagir Valeev aeeb1ebd38 Java8CollectionRemoveIf: testdata fixed (IDEA-214448)
GitOrigin-RevId: e9d934fc8d31016744f2302c39651eb6ecfa4de7
2019-07-02 06:52:16 +03:00

9 lines
237 B
Java

// "Replace the loop with Collection.removeIf" "true"
import java.util.*;
public class Main {
public void removeEmpty(List<String> list) throws Exception {
// Copy to avoid CME
list.removeIf(String::isEmpty);
}
}