* Add deafult getEmptyValue for MultiSelect interface (#8420) Added an default implementation for getEmptyValue to the MultiSelect interface.tags/8.0.0.beta2^0
@@ -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 |
@@ -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(); | |||
} | |||
} |