You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/09/23 16:50:09 UTC
svn commit: r698197 -
/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java
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 {