Author: pmouawad
Date: Sun Dec 23 11:37:36 2018
New Revision: 1849605
URL: http://svn.apache.org/viewvc?rev=1849605&view=rev
Log:
Fix Sonar warning Equality tests should not be made with floating point values
Modified:
jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java
Modified:
jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java?rev=1849605&r1=1849604&r2=1849605&view=diff
==============================================================================
---
jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java
(original)
+++
jmeter/trunk/src/components/org/apache/jmeter/control/ThroughputController.java
Sun Dec 23 11:37:36 2018
@@ -204,7 +204,7 @@ public class ThroughputController
&& current >= getSubControllers().size())
|| (getMaxThroughputAsInt() == 0)))
|| (getStyle() == BYPERCENT
- && getPercentThroughputAsFloat() == 0.0f)
+ && Float.compare(getPercentThroughputAsFloat(),
0.0f)==0)
);
}