[gwt-contrib] Change in gwt[master]: Use Double.isNaN(d) instead of d != d to test for NaN.
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 mdemp...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: 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.
[gwt-contrib] Change in gwt[master]: Use Double.isNan(d) instead of d != d to test for NaN.
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.
[gwt-contrib] Change in gwt[master]: Use Double.isNaN(d) instead of d != d to test for NaN.
Goktug Gokdogan has posted comments on this change. Change subject: Use Double.isNaN(d) instead of d != d to test for NaN. .. Patch Set 2: Code-Review+2 -- To view, visit https://gwt-review.googlesource.com/3490 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Matthew Dempsky mdemp...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-HasComments: No -- 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.