RFR: 8358804: Improve the API Note of BigDecimal.valueOf(double)

Raffaello Giulietti rgiulietti at openjdk.org
Fri Jun 13 18:12:29 UTC 2025


On Fri, 13 Jun 2025 17:39:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Documenting a suggestion for `float` arguments.
>
> src/java.base/share/classes/java/math/BigDecimal.java line 1383:
> 
>> 1381:      * the result usually contains too many trailing digits compared
>> 1382:      * to the precision of a {@code float}.
>> 1383:      * Consider using {@code new BigDecimal(Float.toString(v))} instead.
> 
> Perhaps move "Consider using" to the previous line; otherwise, looks fine.

I usually start a sentence on a new line because that generates less noise when diffing in the future.
The HTML renders it in the same paragraph as the preceding text.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25805#discussion_r2145721480


More information about the core-libs-dev mailing list