aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Grankvist <mikael.grankvist@vaadin.com>2017-01-26 10:46:28 +0200
committerMikael Grankvist <mikael.grankvist@vaadin.com>2017-01-26 10:46:28 +0200
commit6b0ce3d034d321971191ceb48f7a2bca62efe71e (patch)
tree8457668d565149dcc39a4235ab0fc6539bd81fd4
parent5703dc03dc57cf4751360b97307796519bc321b0 (diff)
downloadvaadin-framework-6b0ce3d034d321971191ceb48f7a2bca62efe71e.tar.gz
vaadin-framework-6b0ce3d034d321971191ceb48f7a2bca62efe71e.zip
Do not stream the collection for a forEach.issue/8307_select_using_collection
-rw-r--r--server/src/main/java/com/vaadin/data/SelectionModel.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/data/SelectionModel.java b/server/src/main/java/com/vaadin/data/SelectionModel.java
index 2f22c81aa1..69f143e0f7 100644
--- a/server/src/main/java/com/vaadin/data/SelectionModel.java
+++ b/server/src/main/java/com/vaadin/data/SelectionModel.java
@@ -187,7 +187,7 @@ public interface SelectionModel<T> extends Serializable {
*/
public default void selectItems(Collection<T> items) {
Objects.requireNonNull(items);
- items.stream().forEach(Objects::requireNonNull);
+ items.forEach(Objects::requireNonNull);
updateSelection(
new LinkedHashSet<>(
@@ -229,7 +229,7 @@ public interface SelectionModel<T> extends Serializable {
*/
public default void deselectItems(Collection<T> items) {
Objects.requireNonNull(items);
- items.stream().forEach(Objects::requireNonNull);
+ items.forEach(Objects::requireNonNull);
updateSelection(Collections.emptySet(), new LinkedHashSet<>(
items.stream().collect(Collectors.toList())));