mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java8CollectionsApiInspection: access modifiers, cosmetic, more comments in tests (IDEA-CR-14084)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user