[gwt-contrib] Re: Replace calls to printInt(num) with printInt(num, 10) to make sure
On Mar 17, 2010, at 1:54 PM, j...@google.com wrote: It's completely a style thing. Closure Compiler's externs files only allow printInt to take two parameters. This code wouldn't be able to trigger the incorrect behavior as far as I know. Ok, LGTM, though perhaps file a bug against Closure Compiler to remove a restriction that may not be accurate. The restriction's accurate - not providing a base can be buggy, and has different behavior depending on the browser (such as whether 08 is 8 or 0). Calling parseInt() without a base is banned in Google's JavaScript, and similarly counts as an error in Closure Compiler. See the es3.js externs file for the words "strictly banned": http://code.google.com/p/closure-compiler/source/browse/trunk/externs/es3.js and this thread on the Closure Compiler open source list for another one of the discussions on the topic. http://code.google.com/p/closure-compiler/issues/detail?id=111 Robert -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace calls to printInt(num) with printInt(num, 10) to make sure
It's completely a style thing. Closure Compiler's externs files only allow printInt to take two parameters. This code wouldn't be able to trigger the incorrect behavior as far as I know. http://gwt-code-reviews.appspot.com/225802 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace calls to printInt(num) with printInt(num, 10) to make sure
On 2010/03/17 20:39:47, bowdidge wrote: It's completely a style thing. Closure Compiler's externs files only allow printInt to take two parameters. This code wouldn't be able to trigger the incorrect behavior as far as I know. Ok, LGTM, though perhaps file a bug against Closure Compiler to remove a restriction that may not be accurate. http://gwt-code-reviews.appspot.com/225802 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace calls to printInt(num) with printInt(num, 10) to make sure
http://gwt-code-reviews.appspot.com/225802/diff/1/2 File user/super/com/google/gwt/emul/java/util/AbstractHashMap.java (right): http://gwt-code-reviews.appspot.com/225802/diff/1/2#newcode279 Line 279: if (hashCode == parseInt(hashCode, 10)) { How can this make a difference? Even if it is something like 0xA, it wouldn't compare as equal, right? http://gwt-code-reviews.appspot.com/225802 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Replace calls to printInt(num) with printInt(num, 10) to make sure
LGTM http://gwt-code-reviews.appspot.com/225802 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors