jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1335251 - /jmeter/trunk/src/core/org/apache/jmeter/testelement/property/CollectionProperty.java
Date Mon, 07 May 2012 20:49:54 GMT
Author: pmouawad
Date: Mon May  7 20:49:53 2012
New Revision: 1335251

URL: http://svn.apache.org/viewvc?rev=1335251&view=rev
Log:
Little optimization : Avoid NullPointerException by testing for nullity.
Caller catches NPE and selects NullProperty so no regression will happen

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/testelement/property/CollectionProperty.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testelement/property/CollectionProperty.java?rev=1335251&r1=1335250&r2=1335251&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testelement/property/CollectionProperty.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testelement/property/CollectionProperty.java Mon
May  7 20:49:53 2012
@@ -184,7 +184,7 @@ public class CollectionProperty extends 
      */
     @Override
     protected Class<? extends JMeterProperty> getPropertyType() {
-        if (value.size() > 0) {
+        if (value != null && value.size() > 0) {
             return value.iterator().next().getClass();
         }
         return NullProperty.class;



Mime
View raw message