jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1844035 - /jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
Date Tue, 16 Oct 2018 17:58:00 GMT
Author: fschumacher
Date: Tue Oct 16 17:58:00 2018
New Revision: 1844035

URL: http://svn.apache.org/viewvc?rev=1844035&view=rev
Log:
Use static strings first when comparing strings

Followup to r1843941. Relates to #409.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java?rev=1844035&r1=1844034&r2=1844035&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Tue Oct 16 17:58:00 2018
@@ -256,7 +256,7 @@ public class SaveService {
     private static void registerConverter(String key, String val) {
         try {
             final String trimmedValue = val.trim();
-            boolean useMapper = trimmedValue.equals("collection") || trimmedValue.equals("mapping");
// $NON-NLS-1$ $NON-NLS-2$
+            boolean useMapper = "collection".equals(trimmedValue) || "mapping".equals(trimmedValue);
// $NON-NLS-1$ $NON-NLS-2$
             registerConverter(key, JMXSAVER, useMapper);
             registerConverter(key, JTLSAVER, useMapper);
         } catch (IllegalAccessException | InstantiationException | ClassNotFoundException
| IllegalArgumentException|



Mime
View raw message