diff options
author | Denis Anisimov <denis@vaadin.com> | 2016-09-16 21:57:40 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-09-21 09:02:55 +0000 |
commit | 3db7de6eac975f75e76fafc1352f09cf2ac6fa53 (patch) | |
tree | e11b9bd81ea49f6ebc4727a1bb910262cfa29f59 /server/src/main/java/com | |
parent | 53427c897cacc979d8378d46cd8b72fd0cd2fbe6 (diff) | |
download | vaadin-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.java | 2 |
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 |