Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
============= Spec ========================
public short shortValueExact()
Throws:
ArithmeticException - if this has a nonzero fractional part, or
will not fit in a short.
================ Test =========================
import java.math.BigDecimal;
public class Test {
public static void main(String args[] )
}
================ Output =====================
RI throws java.lang.ArithmeticException: Overflow
Harmony throws nothing, just return 0
Actually BigDecimal.valueOf(0L, -22) equals 0E+22. So Harmony follows
spec and looks absolutely logically.