click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1030958 - /click/trunk/click/framework/src/org/apache/click/control/Select.java
Date Thu, 04 Nov 2010 13:30:30 GMT
Author: sabob
Date: Thu Nov  4 13:30:29 2010
New Revision: 1030958

URL: http://svn.apache.org/viewvc?rev=1030958&view=rev
Log:
cleanup

Modified:
    click/trunk/click/framework/src/org/apache/click/control/Select.java

Modified: click/trunk/click/framework/src/org/apache/click/control/Select.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/Select.java?rev=1030958&r1=1030957&r2=1030958&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/Select.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/Select.java Thu Nov  4 13:30:29
2010
@@ -966,14 +966,16 @@ public class Select extends Field {
             return;
         }
 
-        List<String> localSelectedState = new ArrayList<String>(5);
+        List<String> localSelectedState = null;
 
         if (state instanceof String) {
+            localSelectedState = new ArrayList<String>(1);
             String selectState = (String) state;
             setValue(selectState);
             localSelectedState.add(selectState);
         } else {
             String[] selectState = (String[]) state;
+            localSelectedState = new ArrayList<String>(selectState.length);
             for (String val : selectState) {
             localSelectedState.add(val);
         }



Mime
View raw message