Let's discuss compatibility issue.

Test 
---------------------------------------------------------------------------------
import java.math.BigDecimal;

public class Test {
  public static void main(String args[] ) {
      BigDecimal.valueOf(0L, -22).shortValueExact();
  }
}

Results 
-----------------------------------------------------------------------------
RI throws java.lang.ArithmeticException: Overflow
Harmony throws nothing, just return 0

Spec 1.5 
--------------------------------------------------------------------------
public short shortValueExact()
Throws:
  ArithmeticException - if this has a nonzero fractional part, or
will not fit in a short.

Actually BigDecimal.valueOf(0L, -22) equals 0E+22. So Harmony follows
spec and looks absolutely logically. I suggest file this issue and
don't change Harmony.

--
Denis M. Kishenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to