jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380851 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java
Date Tue, 04 Sep 2012 20:23:24 GMT
Author: pmouawad
Date: Tue Sep  4 20:23:24 2012
New Revision: 1380851

URL: http://svn.apache.org/viewvc?rev=1380851&view=rev
Log:
Use indexOf(char) is faster

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java?rev=1380851&r1=1380850&r2=1380851&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java
Tue Sep  4 20:23:24 2012
@@ -128,14 +128,14 @@ public class MultipartUrlConfig implemen
                 // Get the form field name
                 final String namePrefix = "name=\""; //$NON-NLS-1$
                 int index = contentDisposition.indexOf(namePrefix) + namePrefix.length();
-                String name = contentDisposition.substring(index, contentDisposition.indexOf("\"",
index)); //$NON-NLS-1$
+                String name = contentDisposition.substring(index, contentDisposition.indexOf('\"',
index)); //$NON-NLS-1$
 
                 // Check if it is a file being uploaded
                 final String filenamePrefix = "filename=\""; //$NON-NLS-1$
                 if (contentDisposition.indexOf(filenamePrefix) > -1) {
                     // Get the filename
                     index = contentDisposition.indexOf(filenamePrefix) + filenamePrefix.length();
-                    String path = contentDisposition.substring(index, contentDisposition.indexOf("\"",
index)); //$NON-NLS-1$
+                    String path = contentDisposition.substring(index, contentDisposition.indexOf('\"',
index)); //$NON-NLS-1$
                     if(path != null && path.length() > 0) {
                         // Set the values retrieved for the file upload
                         files.addHTTPFileArg(path, name, contentType);



Mime
View raw message