jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1721371 - /jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java
Date Tue, 22 Dec 2015 11:49:45 GMT
Author: fschumacher
Date: Tue Dec 22 11:49:45 2015
New Revision: 1721371

URL: http://svn.apache.org/viewvc?rev=1721371&view=rev
Log:
Remove ArgumentNullExcption and document the need for non null parameters.
If floatFormater is null, it will be replaced by the default formatter.

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java?rev=1721371&r1=1721370&r2=1721371&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java Tue Dec 22 11:49:45
2015
@@ -61,22 +61,32 @@ public class SampleBuilder {
 
     private long row = 0;
 
+    /**
+     * Construct a SampleBuilder.
+     *
+     * @param metadata
+     *            the details about expected sample data (must not be {@code null})
+     * @param floatFormater
+     *            the formater to be used (the default formater will be used, if
+     *            {@code null} is given.)
+     */
     public SampleBuilder(SampleMetadata metadata, NumberFormat floatFormater) {
-        if (metadata == null) {
-            throw new ArgumentNullException("metadata");
-        }
-
         if (floatFormater == null) {
-            throw new ArgumentNullException("floatFormater");
+            this.floatFormater = DEFAULT_FLOAT_FORMATER;
+        } else {
+            this.floatFormater = floatFormater;
         }
-
-        this.floatFormater = floatFormater;
         this.metadata = metadata;
         this.data = new String[metadata.getColumnCount()];
         k = 0;
         row = 0;
     }
 
+    /**
+     * Construct a SampleBuilder with default formater
+     * @param metadata
+     *            the details about expected sample data (must not be {@code null})
+     */
     public SampleBuilder(SampleMetadata metadata) {
         this(metadata, DEFAULT_FLOAT_FORMATER);
     }



Mime
View raw message