jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380047 - /jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
Date Sun, 02 Sep 2012 20:20:43 GMT
Author: pmouawad
Date: Sun Sep  2 20:20:43 2012
New Revision: 1380047

URL: http://svn.apache.org/viewvc?rev=1380047&view=rev
Log:
Avoid String concat
Use parseBoolean instead of creating useless wrapper

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java?rev=1380047&r1=1380046&r2=1380047&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testelement/property/AbstractProperty.java Sun
Sep  2 20:20:43 2012
@@ -176,7 +176,7 @@ public abstract class AbstractProperty i
         if (val == null) {
             return false;
         }
-        return Boolean.valueOf(val).booleanValue();
+        return Boolean.parseBoolean(val);
     }
 
     /**
@@ -313,7 +313,7 @@ public abstract class AbstractProperty i
      */
     protected Map<String, JMeterProperty> normalizeMap(Map<?,?> coll) {
         if (coll.isEmpty()) {
-            @SuppressWarnings("unchecked") // empty collection ok to cast
+            @SuppressWarnings("unchecked")// empty collection ok to cast
             Map<String, JMeterProperty> emptyColl = (Map<String, JMeterProperty>)
coll;
             return emptyColl;
         }
@@ -369,10 +369,10 @@ public abstract class AbstractProperty i
                     (TestElement) item);
         }
         if (item instanceof Collection<?>) {
-            return new CollectionProperty("" + item.hashCode(), (Collection<?>) item);
+            return new CollectionProperty(Integer.toString(item.hashCode()), (Collection<?>)
item);
         }
         if (item instanceof Map<?, ?>) {
-            return new MapProperty("" + item.hashCode(), (Map<?, ?>) item);
+            return new MapProperty(Integer.toString(item.hashCode()), (Map<?, ?>) item);
         }
         return null;
     }
@@ -381,7 +381,7 @@ public abstract class AbstractProperty i
         JMeterProperty prop = makeProperty(item);
         if (prop == null) {
             prop = getBlankProperty();
-            prop.setName("" + item.hashCode());
+            prop.setName(Integer.toString(item.hashCode()));
             prop.setObjectValue(item);
         }
         return prop;
@@ -400,5 +400,6 @@ public abstract class AbstractProperty i
 
     /** {@inheritDoc} */
     public void mergeIn(JMeterProperty prop) {
+        // NOOP
     }
 }



Mime
View raw message