jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1722364 - /jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java
Date Wed, 30 Dec 2015 15:47:00 GMT
Author: fschumacher
Date: Wed Dec 30 15:46:59 2015
New Revision: 1722364

URL: http://svn.apache.org/viewvc?rev=1722364&view=rev
Log:
Use Boolean.parseBoolean instead of doing the string compare ourself. Correct javadoc

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java?rev=1722364&r1=1722363&r2=1722364&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java Wed Dec 30 15:46:59 2015
@@ -272,7 +272,7 @@ public class Sample {
      * @return The data of the specified column as a boolean
      */
     public boolean getBoolean(String name) {
-        return "true".equalsIgnoreCase(data[metadata.indexOf(name)]);
+        return Boolean.parseBoolean(data[metadata.indexOf(name)]);
     }
 
     /**
@@ -285,12 +285,12 @@ public class Sample {
      * @param id
      *            The column number (zero based) of the data to be returned as a
      *            boolean
-     * @return The ith column data as a double
+     * @return The ith column data as a boolean
      * @throws NumberFormatException
-     *             if the data could not be parsed as a double
+     *             if the data could not be parsed as a boolean
      */
     public boolean getBoolean(int id) {
-        return "true".equalsIgnoreCase(data[id]);
+        return Boolean.parseBoolean(data[id]);
     }
 
     /*



Mime
View raw message