gwt /
gwt /
02d203ece2b7ca2999c51f996a075a71ee815d68 Integer.parseInt throws a JavaScript Exception when passed null. The Number.__parseAndValidateLong method
calls s.length (where "s" is the string) without checking if "s" is null. The problem only occurs in non-hosted mode, as
we use the Java version of the Number class in hosted mode.
Change:
I took levikcom's suggestion and added a conditional to check if "s" is null at the beginning of the __parseAndValidateLong
method in the Number class. If it is null, we throw a NumberFormatException with the message "Unable to parse null".
Issue: 1317
Found by: levikcom
Fixed by: jlabanca
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1240 8db76d5a-ed1c-0410-87a9-c151d255dfc7
1 file changed