jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1381353 - in /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http: modifier/AnchorModifier.java proxy/HttpRequestHdr.java util/ConversionUtils.java util/accesslog/LogFilter.java util/accesslog/TCLogParser.java
Date Wed, 05 Sep 2012 20:35:31 GMT
Author: pmouawad
Date: Wed Sep  5 20:35:30 2012
New Revision: 1381353

URL: http://svn.apache.org/viewvc?rev=1381353&view=rev
Log:
use indexOf(char)

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java?rev=1381353&r1=1381352&r2=1381353&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
Wed Sep  5 20:35:30 2012
@@ -78,7 +78,7 @@ public class AnchorModifier extends Abst
         String responseText = ""; // $NON-NLS-1$
         responseText = result.getResponseDataAsString();
         Document html;
-        int index = responseText.indexOf("<"); // $NON-NLS-1$
+        int index = responseText.indexOf('<'); // $NON-NLS-1$
         if (index == -1) {
             index = 0;
         }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java?rev=1381353&r1=1381352&r2=1381353&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
Wed Sep  5 20:35:30 2012
@@ -251,12 +251,12 @@ public class HttpRequestHdr {
             str = str.substring(i + 2);
         }
         // chop to server.name:xx
-        i = str.indexOf("/"); // $NON-NLS-1$
+        i = str.indexOf('/'); // $NON-NLS-1$
         if (0 < i) {
             str = str.substring(0, i);
         }
         // chop to server.name
-        i = str.lastIndexOf(":"); // $NON-NLS-1$
+        i = str.lastIndexOf(':'); // $NON-NLS-1$
         if (0 < i) {
             str = str.substring(0, i);
         }
@@ -282,12 +282,12 @@ public class HttpRequestHdr {
             str = str.substring(i + 2);
         }
         // chop to server.name:xx
-        i = str.indexOf("/");
+        i = str.indexOf('/');
         if (0 < i) {
             str = str.substring(0, i);
         }
         // chop to server.name
-        i = str.lastIndexOf(":");
+        i = str.lastIndexOf(':');
         if (0 < i) {
             return Integer.parseInt(str.substring(i + 1).trim());
         }
@@ -305,7 +305,7 @@ public class HttpRequestHdr {
         if (i > 0) {
             str = str.substring(i + 2);
         }
-        i = str.indexOf("/");
+        i = str.indexOf('/');
         if (i < 0) {
             return "";
         }
@@ -394,7 +394,7 @@ public class HttpRequestHdr {
      */
     public String getProtocol(HTTPSamplerBase sampler) {
         if (url.indexOf("//") > -1) {
-            String protocol = url.substring(0, url.indexOf(":"));
+            String protocol = url.substring(0, url.indexOf(':'));
             if (log.isDebugEnabled()) {
                 log.debug("Proxy: setting protocol to : " + protocol);
             }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java?rev=1381353&r1=1381352&r2=1381353&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java
Wed Sep  5 20:35:30 2012
@@ -63,7 +63,7 @@ public class ConversionUtils {
                     charSet = charSet.trim();
                     if (charSet.length() > 0) {
                         // See Bug 44784
-                        int semi = charSet.indexOf(";");
+                        int semi = charSet.indexOf(';');
                         if (semi == 0){
                             return null;
                         }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java?rev=1381353&r1=1381352&r2=1381353&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
Wed Sep  5 20:35:30 2012
@@ -124,7 +124,7 @@ public class LogFilter implements Filter
     public void setReplaceExtension(String oldext, String newext) {
         if (oldext != null && newext != null) {
             this.CHANGEEXT = true;
-            if (oldext.indexOf(".") < 0 && newext.indexOf(".") < 0) {
+            if (oldext.indexOf('.') < 0 && newext.indexOf('.') < 0) {
                 this.OLDEXT = "." + oldext;
                 this.NEWEXT = "." + newext;
             } else {

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java?rev=1381353&r1=1381352&r2=1381353&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java
Wed Sep  5 20:35:30 2012
@@ -343,7 +343,7 @@ public class TCLogParser implements LogP
         // if the string contains atleast one double
         // quote and checkMethod is true, go ahead
         // and tokenize the string.
-        if (entry.indexOf("\"") > -1 && checkMethod(entry)) {
+        if (entry.indexOf('"') > -1 && checkMethod(entry)) {
             StringTokenizer tokens = null;
             // we tokenize using double quotes. this means
             // for tomcat we should have 3 tokens if there
@@ -413,7 +413,7 @@ public class TCLogParser implements LogP
      * @return String parameters
      */
     public String stripFile(String url, TestElement el) {
-        if (url.indexOf("?") > -1) {
+        if (url.indexOf('?') > -1) {
             StringTokenizer tokens = this.tokenize(url, "?");
             this.URL_PATH = tokens.nextToken();
             el.setProperty(HTTPSamplerBase.PATH, URL_PATH);
@@ -431,7 +431,7 @@ public class TCLogParser implements LogP
      * @return boolean
      */
     public boolean checkURL(String url) {
-        if (url.indexOf("?") > -1) {
+        if (url.indexOf('?') > -1) {
             return true;
         }
         return false;
@@ -445,7 +445,7 @@ public class TCLogParser implements LogP
      * @return boolean
      */
     public boolean checkParamFormat(String text) {
-        if (text.indexOf("&") > -1 && text.indexOf("=") > -1) {
+        if (text.indexOf('&') > -1 && text.indexOf('=') > -1) {
             return true;
         }
         return false;



Mime
View raw message