Matthew Dempsky has uploaded a new change for review.

  https://gwt-review.googlesource.com/3490


Change subject: Use "Double.isNan(d)" instead of "d != d" to test for NaN.
......................................................................

Use "Double.isNan(d)" instead of "d != d" to test for NaN.

Satisfies upcoming error-prone warnings.

Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764
---
M dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java b/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java
index df30186..d9599e3 100644
--- a/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java
+++ b/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java
@@ -52,7 +52,7 @@
     public static double NaN = 0.0d / 0.0;

     public static String numberToString(double d, int base) {
-        if (d != d)
+        if (Double.isNaN(d))
             return "NaN";
         if (d == Double.POSITIVE_INFINITY)
             return "Infinity";

--
To view, visit https://gwt-review.googlesource.com/3490
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Matthew Dempsky <mdemp...@google.com>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to