Change in ovirt-engine[master]: webadmin: Avoid findbugs warning about comparing doubles

juan.hernandez at redhat.com juan.hernandez at redhat.com
Wed Sep 23 15:50:19 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: webadmin: Avoid findbugs warning about comparing doubles
......................................................................


webadmin: Avoid findbugs warning about comparing doubles

This is needed to avoid the following findbugs 3.x complain:

  compareTo()/compare() incorrectly handles float or double value

  This method compares double or float values using pattern like this:
  val1 > val2 ? 1 : val1 < val2 ? -1 : 0. This pattern works incorrectly
  for -0.0 and NaN values which may result in incorrect sorting result
  or broken collection (if compared values are used as keys). Consider
  using Double.compare or Float.compare static methods which handle all
  the special cases correctly.

  Bug kind and pattern: Co - CO_COMPARETO_INCORRECT_FLOATING

Change-Id: I415528d3895fbc56a3e3a4f6620f64d1d6dcc9dc
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Juan Hernandez: Verified
  Alexander Wels: Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/46545
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I415528d3895fbc56a3e3a4f6620f64d1d6dcc9dc
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list