-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
5.3.1
-
None
In a Dialog I have an OptionGroup with Checkboxes. When the last checked check box is de-selected, the following Exception is Thrown:
com.vaadin.data.util.converter.Converter$ConversionException: Cannot convert class java.util.LinkedHashSet to class java.util.LinkedList
After this every checkbox checked/unchecked causes the same Exception.
Something seems to go wrong in the ListToSetTransformer. When I override the ListToSetTransformer.writeToItem(T newValue) method like this:
public void writeToItem(T newValue) {
Property<T> p = getOrCreateProperty(type, true); // !! SET checkTypes TO TRUE !!
if (p.getValue() instanceof List && newValue instanceof Set) {
newValue = (T) new LinkedList((Set) newValue);
if (((List<?>) newValue).isEmpty())
}
p.setValue(newValue);
}
the Exception is gone and everything seems to work correctly. Could this be the solution? Or am I missing something?
Includes are the stacktrace and screenshots of the steps taken.