jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1381342 - in /jmeter/trunk/src/core/org/apache/jmeter: gui/action/Load.java gui/util/FileDialoger.java reporters/ResultSaver.java samplers/SampleResult.java
Date Wed, 05 Sep 2012 20:29:55 GMT
Author: pmouawad
Date: Wed Sep  5 20:29:54 2012
New Revision: 1381342

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

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/Load.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Load.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/Load.java?rev=1381342&r1=1381341&r2=1381342&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/Load.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/Load.java Wed Sep  5 20:29:54 2012
@@ -170,7 +170,7 @@ public class Load implements Command {
                 if (!ok){
                     String name = te.getName();
                     String className = te.getClass().getName();
-                    className = className.substring(className.lastIndexOf(".")+1);
+                    className = className.substring(className.lastIndexOf('.')+1);
                     throw new IllegalUserActionException("Can't merge "+name+" ("+className+")
here");
                 }
             }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java?rev=1381342&r1=1381341&r2=1381342&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java Wed Sep  5 20:29:54
2012
@@ -129,7 +129,7 @@ public final class FileDialoger {
                     new File(filename) :
                     new File(lastJFCDirectory, filename));
             int i = -1;
-            if ((i = filename.lastIndexOf(".")) > -1) {//$NON-NLS-1$
+            if ((i = filename.lastIndexOf('.')) > -1) {//$NON-NLS-1$
                 ext = filename.substring(i);
             }
         }

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java?rev=1381342&r1=1381341&r2=1381342&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java Wed Sep  5 20:29:54
2012
@@ -213,9 +213,9 @@ public class ResultSaver extends Abstrac
         if (!skipSuffix){
             sb.append('.');
             if (contentType != null) {
-                int i = contentType.indexOf("/"); // $NON-NLS-1$
+                int i = contentType.indexOf('/'); // $NON-NLS-1$
                 if (i != -1) {
-                    int j = contentType.indexOf(";"); // $NON-NLS-1$
+                    int j = contentType.indexOf(';'); // $NON-NLS-1$
                     if (j != -1) {
                         sb.append(contentType.substring(i + 1, j));
                     } else {

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=1381342&r1=1381341&r2=1381342&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java Wed Sep  5 20:29:54
2012
@@ -514,7 +514,7 @@ public class SampleResult implements Ser
      */
     public String getSampleLabel(boolean includeGroup) {
         if (includeGroup) {
-            StringBuilder sb = new StringBuilder(threadName.substring(0,threadName.lastIndexOf("
"))); //$NON-NLS-1$
+            StringBuilder sb = new StringBuilder(threadName.substring(0,threadName.lastIndexOf('
'))); //$NON-NLS-1$
             return sb.append(":").append(label).toString(); //$NON-NLS-1$
         }
         return label;



Mime
View raw message