commit
41b5cd81f3
|
@ -22,9 +22,9 @@ public class TodoDao implements Dao<Todo> {
|
|||
|
||||
@Override
|
||||
public Collection<Todo> getAll() {
|
||||
return Collections.unmodifiableCollection(todoList.stream()
|
||||
return todoList.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList()));
|
||||
.collect(Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue