jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380863 - in /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler: HTTPSampleResult.java HttpClientDefaultParameters.java
Date Tue, 04 Sep 2012 20:29:37 GMT
Author: pmouawad
Date: Tue Sep  4 20:29:36 2012
New Revision: 1380863

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

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java?rev=1380863&r1=1380862&r2=1380863&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
Tue Sep  4 20:29:36 2012
@@ -200,7 +200,7 @@ public class HTTPSampleResult extends Sa
             int tagstart=prefix.indexOf(METATAG);
             if (tagstart!=-1){
                 tagstart += METATAG.length();
-                int tagend = prefix.indexOf("\"", tagstart); // $NON-NLS-1$
+                int tagend = prefix.indexOf('\"', tagstart); // $NON-NLS-1$
                 if (tagend!=-1){
                     // TODO use fixed charset:
                     final String ct = new String(bytes,tagstart,tagend-tagstart); // TODO
- charset?

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java?rev=1380863&r1=1380862&r2=1380863&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java
Tue Sep  4 20:29:36 2012
@@ -114,7 +114,7 @@ public class HttpClientDefaultParameters
             for (Map.Entry<Object, Object> me : props.entrySet()){
                 String key = (String) me.getKey();
                 String value = (String)me.getValue();
-                int typeSep = key.indexOf("$"); // $NON-NLS-1$
+                int typeSep = key.indexOf('$'); // $NON-NLS-1$
                 try {
                     if (typeSep > 0){
                         String type = key.substring(typeSep+1);// get past separator



Mime
View raw message