aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2016-09-16 21:57:40 +0300
committerVaadin Code Review <review@vaadin.com>2016-09-21 09:02:55 +0000
commit3db7de6eac975f75e76fafc1352f09cf2ac6fa53 (patch)
treee11b9bd81ea49f6ebc4727a1bb910262cfa29f59 /server/src/main/java/com
parent53427c897cacc979d8378d46cd8b72fd0cd2fbe6 (diff)
downloadvaadin-framework-3db7de6eac975f75e76fafc1352f09cf2ac6fa53.tar.gz
vaadin-framework-3db7de6eac975f75e76fafc1352f09cf2ac6fa53.zip
Make CheckBoxGroup.SimpleMultiSelectModel return a selection copy #293.
getSelectedItems() must return a copy to fulfill the contract specified in SelectionModel: it must be a snapshot of the current state and safe to iterate over while changing selection. Change-Id: Ie2f15eb626dd80df2036bcb2d4e9387fc31389c9
Diffstat (limited to 'server/src/main/java/com')
-rw-r--r--server/src/main/java/com/vaadin/ui/CheckBoxGroup.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java b/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java
index 8525dc6cbb..d5b2c5a851 100644
--- a/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java
+++ b/server/src/main/java/com/vaadin/ui/CheckBoxGroup.java
@@ -71,7 +71,7 @@ public class CheckBoxGroup<T> extends AbstractMultiSelect<T> {
@Override
public Set<T> getSelectedItems() {
- return Collections.unmodifiableSet(selection);
+ return Collections.unmodifiableSet(new LinkedHashSet<>(selection));
}
@Override