From 7ca960b42fde3da51d823504c0919de90b91b9ca Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 16 Aug 2010 08:59:06 +0000 Subject: [PATCH] LMS-1661 Using Double.compare() for comparing two double values which could be NaN SVN: 17463 --- .../cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java index b18d2527189..a9ef132b623 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java @@ -44,7 +44,7 @@ public class DoubleTableCell implements ISerializableComparable double v1 = number; DoubleTableCell numberTableCell = (DoubleTableCell) o; double v2 = numberTableCell.number; - return v1 < v2 ? -1 : (v1 > v2 ? 1 : 0); + return Double.compare(v1, v2); } return toString().compareTo(o.toString()); } -- GitLab