diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java | 5 | ||||
-rw-r--r-- | server/src/main/java/com/vaadin/ui/MultiSelect.java | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java b/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java index 9947067288..a0c8fd2225 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java +++ b/server/src/main/java/com/vaadin/ui/AbstractMultiSelect.java @@ -216,11 +216,6 @@ public abstract class AbstractMultiSelect<T> extends AbstractListing<T> updateSelection(copy, new LinkedHashSet<>(getSelectedItems())); } - @Override - public Set<T> getEmptyValue() { - return Collections.emptySet(); - } - /** * Adds a value change listener. The listener is called when the selection * set of this multi select is changed either by the user or diff --git a/server/src/main/java/com/vaadin/ui/MultiSelect.java b/server/src/main/java/com/vaadin/ui/MultiSelect.java index 6519921c88..3c56a22da1 100644 --- a/server/src/main/java/com/vaadin/ui/MultiSelect.java +++ b/server/src/main/java/com/vaadin/ui/MultiSelect.java @@ -136,4 +136,15 @@ public interface MultiSelect<T> extends HasValue<Set<T>>, Serializable { */ public Registration addSelectionListener( MultiSelectionListener<T> listener); + + /** + * MultiSelect empty value should always be an empty set by default and not + * {@code null}. + * + * @return An empty set, not {@code null} + */ + public default Set<T> getEmptyValue() { + return Collections.emptySet(); + } + } |