Java8CollectionsApiInspection: access modifiers, cosmetic, more comments in tests (IDEA-CR-14084)

This commit is contained in:
Tagir Valeev
2016-09-28 12:06:44 +07:00
parent e3d816402a
commit c3e57bf911
3 changed files with 16 additions and 12 deletions
@@ -3,6 +3,9 @@ import java.util.*;
public class Main {
public void removeEmpty(List<String> list) throws Exception {
// iterate over list
// if it's empty
/* remove! */
list.removeIf(String::isEmpty);
}
}
@@ -4,8 +4,11 @@ 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();
}
}