]> source.dussan.org Git - vaadin-framework.git/commitdiff
Do not stream the collection for a forEach. issue/8307_select_using_collection
authorMikael Grankvist <mikael.grankvist@vaadin.com>
Thu, 26 Jan 2017 08:46:28 +0000 (10:46 +0200)
committerMikael Grankvist <mikael.grankvist@vaadin.com>
Thu, 26 Jan 2017 08:46:28 +0000 (10:46 +0200)
server/src/main/java/com/vaadin/data/SelectionModel.java

index 2f22c81aa1df6edd47286259e653ebd4f56c3a73..69f143e0f71b5b950ecbe8fa0718a9410f06d44c 100644 (file)
@@ -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())));