On Tue, 16 Dec 2025 15:05:03 GMT, Raffaello Giulietti <[email protected]> 
wrote:

>> test/jdk/java/math/BigDecimal/Constructor.java line 71:
>> 
>>> 69:                 } else {
>>> 70:                     throw nfe;
>>> 71:                 }
>> 
>> If you want, you could use `NumberFormatException nfe = assertThrows(..)` 
>> here, then assert the cause. That would avoid mixing JUnit asserts with 
>> explicit throw of RuntimeException.
>
> That's just the result of a mechanical conversion of the original 
> testng-based code.

Okay, but you could go the extra mile and replace the throw of RuntimeException 
as it looks very strange to have the test be a JUnit test and still have this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28848#discussion_r2626254818

Reply via email to