This makes Classpath parse "+x" as x, not -x. ChangeLog:
2008-05-11 Andrew John Hughes <[EMAIL PROTECTED]> * java/lang/Integer.java: (parseInt(String,int,boolean)): Parse +x as x, not -x. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: java/lang/Integer.java =================================================================== RCS file: /sources/classpath/classpath/java/lang/Integer.java,v retrieving revision 1.37 diff -u -r1.37 Integer.java --- java/lang/Integer.java 18 Apr 2008 21:00:11 -0000 1.37 +++ java/lang/Integer.java 12 May 2008 22:05:02 -0000 @@ -776,16 +776,19 @@ if (len == 0) throw new NumberFormatException("string length is null"); int ch = str.charAt(index); - if (ch == '-' || ch == '+') + if (ch == '-') { if (len == 1) - if (ch == '-') - throw new NumberFormatException("pure '-'"); - else if (ch == '+') - throw new NumberFormatException("pure '+'"); + throw new NumberFormatException("pure '-'"); isNeg = true; ch = str.charAt(++index); } + if (ch == '+') + { + if (len == 1) + throw new NumberFormatException("pure '+'"); + ch = str.charAt(++index); + } if (decode) { if (ch == '0')