Java8CollectionsApiInspection is split into 4 separate inspections

This commit is contained in:
Tagir Valeev
2016-10-04 13:15:57 +07:00
parent c6cf323132
commit 6629cc0fb1
37 changed files with 745 additions and 451 deletions
@@ -0,0 +1,16 @@
// "Replace the loop with Collection.removeIf" "true"
import java.util.*;
public class Main {
public void removeEmpty(List<String> list) throws Exception {
f<caret>or(Iterator<String> it = list.iterator(); it.hasNext();) {
// iterate over list
String str = it.next();
// if it's empty
if(str.isEmpty()) {
/* remove! */
it.remove();
}
}
}
}