jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1721333 - /jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java
Date Tue, 22 Dec 2015 10:33:33 GMT
Author: fschumacher
Date: Tue Dec 22 10:33:33 2015
New Revision: 1721333

URL: http://svn.apache.org/viewvc?rev=1721333&view=rev
Log:
Use Validate.notNull instead of ArgumentNullException

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java?rev=1721333&r1=1721332&r2=1721333&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java Tue Dec
22 10:33:33 2015
@@ -26,6 +26,7 @@ import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 
+import org.apache.commons.lang3.Validate;
 import org.apache.jorphan.util.JOrphanUtils;
 
 /**
@@ -62,9 +63,7 @@ abstract public class AbstractSampleWrit
      *            sample writer
      */
     public void setWriter(Writer writer) {
-        if (writer == null) {
-            throw new ArgumentNullException("writer");
-        }
+        Validate.notNull(writer, "writer must not be null.");
 
         if (this.writer != null) {
             // flush and close previous writer
@@ -81,9 +80,7 @@ abstract public class AbstractSampleWrit
      *            The output stream on which sample should be written
      */
     public void setOutputStream(OutputStream out) {
-        if (out == null) {
-            throw new ArgumentNullException("out");
-        }
+        Validate.notNull(out, "out must not be null.");
 
         try {
             setWriter(new OutputStreamWriter(out, CHARSET));



Mime
View raw message