Details
-
Bug
-
Resolution: Outdated
-
Neutral
-
None
-
5.0
-
None
-
None
Description
The ValueChangeListener in ListViewImpl creates a Set of size 1 containing the null value and then passes this Set to its listener, AbstractContentPresenter#onItemSelection. It expects to be given a Set of zero elements when nothing is selected.
The code should be changed to:
Set<String> items;
if (value instanceof Set) {
items = (Set<String>) value;
} else {
items = new LinkedHashSet<String>();
if (value != null) {
items.add((String) value);
}
}
listener.onItemSelection(items);
We need to be make sure this doesn't have side effects elsewhere. Because the set is later passed to setSelectedItemIds() and a ContentChangedEvent is sent containing jcr item adapters, this is probably also a collection of size 1 containing null.
Checklists
Acceptance criteria