mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-19 18:50:59 +07:00
14 lines
290 B
Java
14 lines
290 B
Java
// "Replace iteration with bulk 'Collection.addAll()' call" "false"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
class Person {}
|
|
|
|
void collectNames(Iterable<Person> persons){
|
|
List<Person> names = new ArrayList<>();
|
|
persons.forEach(p -> {
|
|
names<caret>.add(p);
|
|
});
|
|
}
|
|
}
|