Permalink
Browse files

Merge pull request #26 from tgoetz/master

Fixes issue #25
  • Loading branch information...
2 parents 998d7ff + 30f7cf8 commit 3b68ea4bf8821d04099366efa09910f54328f481 @ivaynberg 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 3b68ea4

Please sign in to comment.