jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1853236 - /jmeter/trunk/src/core/org/apache/jmeter/testelement/property/CollectionProperty.java
Date Fri, 08 Feb 2019 21:26:08 GMT
Author: pmouawad
Date: Fri Feb  8 21:26:08 2019
New Revision: 1853236

URL: http://svn.apache.org/viewvc?rev=1853236&view=rev
Log:
Simplify to fix Sonar warning
Add isEmpty

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=1853236&r1=1853235&r2=1853236&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 Fri
Feb  8 21:26:08 2019
@@ -44,10 +44,8 @@ public class CollectionProperty extends
 
     @Override
     public boolean equals(Object o) {
-        if (o instanceof CollectionProperty) {
-            if (value != null) {
-                return value.equals(((JMeterProperty) o).getObjectValue());
-            }
+        if (o instanceof CollectionProperty && value != null) {
+            return value.equals(((JMeterProperty) o).getObjectValue());
         }
         return false;
     }
@@ -130,6 +128,10 @@ public class CollectionProperty extends
         return value.size();
     }
 
+    public boolean isEmpty() {
+        return value.isEmpty();
+    }
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message