BigInteger(byte[]) constructor bugfix.
Warren Levy
warrenl@redhat.com
Wed Apr 4 20:20:00 GMT 2001
Thanks Mark, I've got it on my to-do list to take care of getting the
patch in and verifying no regressions were introduced. I hope to get to
it in the next week or so.
--warrenl
On Sun, 1 Apr 2001, Mark J. Roberts wrote:
> On 1 Apr 2001, Tom Tromey wrote:
>> > >>>>> "Mark" == Mark J Roberts <mjr@statesmean.com> writes:
> >
> > Could you send the output of `diff -u' between the current cvs version
> > and your fixed version? If you are using the cvs checkout out can use
> > `cvs diff -u' to get this. That would be easiest...
>> mjr::math$ cvs diff -u BigInteger.java
> Index: BigInteger.java
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/java/math/BigInteger.java,v
> retrieving revision 1.10.4.1
> diff -u -r1.10.4.1 BigInteger.java
> --- BigInteger.java 2001年03月03日 07:27:59 1.10.4.1
> +++ BigInteger.java 2001年04月02日 00:05:33
> @@ -220,12 +220,8 @@
> private static int[] byteArrayToIntArray(byte[] bytes, int sign)
> {
> // Determine number of words needed.
> - int[] words = new int[(bytes.length + 3) / 4 + 1];
> + int[] words = new int[bytes.length/4 + 1];
> int nwords = words.length;
> -
> - // For simplicity, tack on an extra word of sign at the front,
> - // it will be canonicalized out later. */
> - words[--nwords] = sign;
>> // Create a int out of modulo 4 high order bytes.
> int bptr = 0;
More information about the Java
mailing list