myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r698197 - /myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java
Date Tue, 23 Sep 2008 14:50:09 GMT
Author: bommel
Date: Tue Sep 23 07:50:09 2008
New Revision: 698197

URL: http://svn.apache.org/viewvc?rev=698197&view=rev
Log:
minor performance improvement

Modified:
    myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java

Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java?rev=698197&r1=698196&r2=698197&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java
Tue Sep 23 07:50:09 2008
@@ -118,16 +118,13 @@
           } else if (inStock instanceof String[]) { // double (or more) parameter
             String[] oldValues = (String[]) inStock;
             String[] values = new String[oldValues.length + 1];
-            int i = 0;
-            for (; i < oldValues.length; i++) {
-              values[i] = oldValues[i];
-            }
+            System.arraycopy(oldValues, 0, values, 0, oldValues.length);
             try {
               // TODO: enable configuration of  'accept-charset'
-              values[i] = item.getString(FORM_ACCEPT_CHARSET);
+              values[oldValues.length] = item.getString(FORM_ACCEPT_CHARSET);
             } catch (UnsupportedEncodingException e) {
               LOG.error("Caught: " + e.getMessage(), e);
-              values[i] = item.getString();
+              values[oldValues.length] = item.getString();
             }
             parameters.put(key, values);
           } else {



Mime
View raw message