This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Integer.decode() patch for negative numbers
Hi,
On Mon, 2002-04-01 at 18:02, Tom Tromey wrote:
>
> I think fixing important bugs via re-merging is fine now.
> Wholesale re-merging needs to wait until 3.2 though.
I have gone through the changes to Integer in Classpath but it is
actually a large rewrite (that will bring some other important
improvements).
The changes are:
2002-04-01 Eric Blake <ebb9@email.byu.edu>
* java/lang/Integer.java (toString, toUnsignedString): Use package
String constructor.
2002-04-01 Eric Blake <ebb9@email.byu.edu>
* java/lang/Number.java (digits): Add lookup table.
* java/lang/Integer.java (toString(int, int)): Optimize
case for MIN_VALUE.
(getInteger(String, Integer)): Trap NullPointerException,
IllegalArgumentException from System.getProperty.
(parseInt(String, int, boolean)): Combine parseInt and decode into
one method, and optimize.
(parseInt, decode, valueOf): Use improved parseInt.
2002-04-01 Eric Blake <ebb9@email.byu.edu>
* java/lang/String.java
(String(char[], int, int, boolean)): Change signature of package
constructor to be more flexible, and match gcj.
2002-04-01 Eric Blake <ebb9@email.byu.edu>
* java/lang/Integer.java: Reformat, improve Javadoc.
* java/lang/Number.java: Ditto.
I have tested this with mauve and it fixes the decoding of negative
haxadecimal values but it seems to introduce some new failures with
to[Hex|Octal|Binary]String(). This might be my fault for not applying to
correct patches though.
Would it be OK for me to checkin my original patch only to the 3.1
branch and do the real merging of Integer (and other wrapper classes)
after 3.1 is released?
Note that the String change is actually part of the patch that Eric
posted earlier this month and which seems to not have been approved yet.
<http://gcc.gnu.org/ml/java-patches/2002-q1/msg00699.html>
Cheers,
Mark