Skip to content


Don't use Collections.emptyList() to clear choices #25

uweschaefer opened this Issue · 1 comment

2 participants

@uweschaefer uses Collections.emptyList() in order to clear the list of choices.
The problem he is, that we introduce a Collection no longer capable of adding elements to it.
This is only relevant, if the underlying object is not marshalled in a way the disassembles and reassembles the list anyway (JPA, most non-serializing persistence mechanisms).

We keep our stuff in RAM, so this breaks our code when first clearing the list and then adding something again.

I'd suggest new ArrayList() instead of Collections.emptyList();

@tgoetz tgoetz added a commit to tgoetz/wicket-select2 that referenced this issue
@tgoetz tgoetz Issue #25: Don't use Collections.emptyList() to clear choices 30f7cf8

looks like everything has been merged. closing.

@ivaynberg ivaynberg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.