On Tue, 21 Jul 2026 17:31:35 GMT, Naoto Sato <[email protected]> wrote:

>> Justin Lu has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Naoto's review
>
> src/java.base/share/classes/java/text/DecimalFormat.java line 2765:
> 
>> 2763:         return isGroupingUsed() && groupingSize > 0;
>> 2764:     }
>> 2765: 
> 
> "Relevant" sounds a bit vague here. Since this checks whether grouping is 
> effectively enabled (`isGroupingUsed()` and a positive grouping size), how 
> about `isGroupingEnabled()`?
> 
> Also, I think you meant "lenient" instead of "legacy" at the last comment 
> line.

Yeah I agree `enabled` is better. I actually did mean to use "legacy" there to 
explain **why** the lenient parsing behavior did not validate grouping size. 
(Since there was no reason other than it being long standing legacy behavior.)

> test/jdk/java/text/Format/NumberFormat/StrictParseTest.java line 127:
> 
>> 125:         fmt.setGroupingUsed(true);
>> 126:         var pp = new ParsePosition(0);
>> 127:         assertThrows(ParseException.class, () -> fmt.parse("555,000.0", 
>> pp));
> 
> I ran this locally and it seems failing. `parse` returns `null` instead of 
> throwing the exception

Thanks, I had fixed that and did not commit it 🙃.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31980#discussion_r3624601928
PR Review Comment: https://git.openjdk.org/jdk/pull/31980#discussion_r3624602050

Reply via email to