Matthew Dempsky has submitted this change and it was merged.

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(-)

Approvals:
  Leeroy Jenkins: Verified
  Goktug Gokdogan: Looks good to me, approved



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: merged
Gerrit-Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Matthew Dempsky <[email protected]>
Gerrit-Reviewer: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: Leeroy Jenkins <[email protected]>
Gerrit-Reviewer: Matthew Dempsky <[email protected]>

--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to