RFR: 8170389: java.text.DigitList.getDouble() : Controversy between javadoc and code [v2]

Lance Andersen lancea at openjdk.org
Wed Oct 5 21:01:27 UTC 2022


On Wed, 5 Oct 2022 20:49:52 GMT, Justin Lu <duke at openjdk.org> wrote:

>> Problem: Outdated doc does not match code. Claimed to throw exception and compared to Long method.
>> Fix: Update doc to match code, compared to Double.parseDouble() accordingly.
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update doc code

src/java.base/share/classes/java/text/DigitList.java line 198:

> 196: 
> 197:     /**
> 198:      * Utility routine to get the value of the digit list.

new BigDecimal("") will also throw a NumberFormatException so I would add a similar comment for count as done above for getLong/Double()

-------------

PR: https://git.openjdk.org/jdk/pull/10567


More information about the core-libs-dev mailing list