From 6b0ce3d034d321971191ceb48f7a2bca62efe71e Mon Sep 17 00:00:00 2001 From: Mikael Grankvist Date: Thu, 26 Jan 2017 10:46:28 +0200 Subject: Do not stream the collection for a forEach. --- server/src/main/java/com/vaadin/data/SelectionModel.java | 4 ++-- 1 file 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 extends Serializable { */ public default void selectItems(Collection items) { Objects.requireNonNull(items); - items.stream().forEach(Objects::requireNonNull); + items.forEach(Objects::requireNonNull); updateSelection( new LinkedHashSet<>( @@ -229,7 +229,7 @@ public interface SelectionModel extends Serializable { */ public default void deselectItems(Collection items) { Objects.requireNonNull(items); - items.stream().forEach(Objects::requireNonNull); + items.forEach(Objects::requireNonNull); updateSelection(Collections.emptySet(), new LinkedHashSet<>( items.stream().collect(Collectors.toList()))); -- cgit v1.2.3