GWT application hangs browser!!!

6 views
Skip to first unread message

Alex

unread,
Jun 25, 2006, 6:07:57 AM6/25/06
to Google Web Toolkit
It's simple to hang GWT:

int i = -10;
String s = Integer.toHexString(i);
Window.alert(s); //you will not see this message

Any ideas?

mP

unread,
Jun 26, 2006, 4:25:37 AM6/26/06
to Google Web Toolkit
wrap it with a try/catch and show the exception...

Alex

unread,
Jun 26, 2006, 5:16:15 AM6/26/06
to Google Web Toolkit
There is no exception.
I think there is mistake in Long.toHexString(long) implementation. When
Itry to get hex representation of negative integer infinite loop
starts.

Integer.toHexString(int) simply calls Long.toHexString(long);

FireFox proposes to stop script execution. IE stops responding at all.

All works fine when I use toHexString() method implementation from Java
Sun JDK.

Reply all
Reply to author
Forward
0 new messages