DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41288>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41288 ------- Additional Comments From [EMAIL PROTECTED] 2007-03-28 06:05 ------- Wouldn't it be possible to just catch the NumberFormatException and reparse it as a float: try { int val = Integer.parseInt(sval); nextIgnoreSpaces(); return CSSLexicalUnit.createInteger(val, prev); } catch (NumberFormatException e) { // fall through } instead of long lVal = Long.parseLong( sval ); // fix #41288 if ( lVal >= Integer.MIN_VALUE && lVal <= Integer.MAX_VALUE ){ // we can safely convert to int int iVal = (int) lVal; nextIgnoreSpaces(); return CSSLexicalUnit.createInteger( iVal, prev); } // we are too large for an int: convert to float // we can just fall-through to the float-handling ... (I proposed this in bug 38207 but failed to post it here too.) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]