jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1721406 - /jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java
Date Tue, 22 Dec 2015 14:02:46 GMT
Author: fschumacher
Date: Tue Dec 22 14:02:46 2015
New Revision: 1721406

URL: http://svn.apache.org/viewvc?rev=1721406&view=rev
Log:
Replace ArgumentNullException with NPE by using Validate.notNull instead of checking for null
by hand.
Document the need for non null parameter.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java?rev=1721406&r1=1721405&r2=1721406&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java Tue
Dec 22 14:02:46 2015
@@ -23,7 +23,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
-import org.apache.jmeter.report.core.ArgumentNullException;
+import org.apache.commons.lang3.Validate;
 import org.apache.jmeter.report.core.Sample;
 import org.apache.jmeter.report.core.SampleException;
 import org.apache.jmeter.report.core.SampleMetadata;
@@ -126,10 +126,14 @@ abstract public class AbstractSampleCons
         setWorkingDirectory(sampleContext.getWorkingDirectory());
     }
 
+    /**
+     * Sets the consumers
+     * 
+     * @param consumers
+     *            for the samples (must not be {@code null})
+     */
     public void setSampleConsumers(List<SampleConsumer> consumers) {
-        if (consumers == null) {
-            throw new ArgumentNullException("consumers");
-        }
+        Validate.notNull(consumers, "consumers must not be null");
 
         this.sampleConsumers = consumers;
     }



Mime
View raw message