Permalink
Browse files

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

  • Loading branch information...
1 parent 998d7ff commit 30f7cf8ac55f01e812fbe5487a676373ce149417 @tgoetz committed Oct 4, 2012
@@ -12,9 +12,9 @@
*/
package com.vaynberg.wicket.select2;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import org.apache.wicket.markup.html.IHeaderResponse;
import org.apache.wicket.model.IModel;
@@ -52,8 +52,8 @@ protected void convertInput() {
final Collection<T> choices;
if (Strings.isEmpty(input)) {
- choices = Collections.emptyList();
- } else {
+ choices = new ArrayList<T>();
+ } else {
choices = getProvider().toChoices(Arrays.asList(input.split(",")));
}

0 comments on commit 30f7cf8

Please sign in to comment.