Skip to content

Commit b151914

Browse files
committed
Double.NaN == Double.NaN always returns false, use Double.isNaN()
1 parent 314e953 commit b151914

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/firefly/java/edu/caltech/ipac/firefly/server/util/QueryUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ public static DataGroup doDecimation(DataGroup dg, DecimateInfo decimateInfo) {
643643
double xval = xValGetter.getValue(row);
644644
double yval = yValGetter.getValue(row);
645645

646-
if (xval==Double.NaN || yval==Double.NaN) {
646+
if (Double.isNaN(xval) || Double.isNaN(yval)) {
647647
outRows--;
648648
continue;
649649
}
@@ -708,7 +708,7 @@ public static DataGroup doDecimation(DataGroup dg, DecimateInfo decimateInfo) {
708708
double xval = xValGetter.getValue(row);
709709
double yval = yValGetter.getValue(row);
710710

711-
if (xval==Double.NaN || yval==Double.NaN) {
711+
if (Double.isNaN(xval) || Double.isNaN(yval)) {
712712
outRows--;
713713
continue;
714714
}

0 commit comments

Comments
 (0)