PATCH: BigDecimal - libgcj/1596: setScale() missing from BigDecimal

Warren Levy warrenl@redhat.com
Wed Jan 10 01:44:00 GMT 2001


Folks,
Here's a patch for libgcj/1596.  In fixing it a couple other bugs turned
up (in BigDecimal.divide).  Turns out the newScale arg to the divide
method wasn't properly checked for validity; and small newScale values
for BigDecimal.divide sometimes caused an IllegalArgumentException
because they caused a BigInteger.pow() with a negative value to be
attempted.  I took care of both of them and I'm checking in a test case to
Mauve for this.

Here's the patch I've checked in (to Classpath also).
--warrenl


2001-01-10  Warren Levy  <warrenl@redhat.com>

	Fix for PR libgcj/1596:
        * java/math/BigDecimal.java (divide): Check newScale for validity.
        Ensure that BigInteger.pow() is called with a non-negative value.
        (setScale (int)): New public method.
        (setScale (int,int)): New public method.






More information about the Java-patches mailing list