The JavaDoc for the intValue, longValue, floatValue, and doubleValue methods in the BigInteger and BigDecimal classes slightly mistates the relation of these methods to Java language narrowing primitive conversions. In particular, technically speaking these methods don't implement narrowing primitive conversions since the "big" types aren't primitive. Also some of the conversion methods can lose more information than others; e.g. BigDecimal.intValue can lose, magnitude, precision, and *sign* information while BigDecimal.doubleValue can only lose magnitude and precision information. These issues should be clarified in the JavaDoc descriptions.
-
Joe Darcy
-
Joe Darcy
- Votes:
-
0 Vote for this issue
- Watchers:
-
0 Start watching this issue
- Created:
- Updated:
- Resolved:
- Imported:
- Indexed: