From: Mikael Grankvist Date: Thu, 26 Jan 2017 08:46:28 +0000 (+0200) Subject: Do not stream the collection for a forEach. X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b0ce3d034d321971191ceb48f7a2bca62efe71e;p=vaadin-framework.git Do not stream the collection for a forEach. --- 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())));