On Wed, 14 May 2025 09:55:35 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> Johannes Graham has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   fix code tag in javadoc
>
> src/java.base/share/classes/java/math/BigDecimal.java line 1408:
> 
>> 1406:         }
>> 1407: 
>> 1408:         return valueOf(s, fmt.getScale(), fmt.getPrecision());
> 
> I'd prefer to have a `getExp()` rather than `getScale()` in 
> `FormattedFPDecimal`.

I was looking for a way clearly distinguish it from getExponentRounded. Will go 
with getExp, since it makes more sense in the scope of that class.

> test/jdk/java/math/BigDecimal/ValueOfDouble.java line 41:
> 
>> 39: 
>> 40: public class ValueOfDouble {
>> 41:     private static final String DIGITS = "1234567899123456789"; // 
>> Enough digits to fill a long
> 
> Suggestion:
> 
>     private static final String DIGITS = "1234567000003456789"; // Enough 
> digits to fill a long

What is the significance of the positioning of the zeros? I wasn't really 
attaching any significance to the digit values other than making it easy to 
count how many there were.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25173#discussion_r2088959379
PR Review Comment: https://git.openjdk.org/jdk/pull/25173#discussion_r2088963691

Reply via email to