RFR: 8375119: SwitchBoostraps.enumSwitch does not throw an NPE when lookup is null in some cases
Jan Lahoda
jlahoda at openjdk.org
Mon Jan 19 08:52:12 UTC 2026
On Sun, 18 Jan 2026 08:35:36 GMT, Chen Liang <liach at openjdk.org> wrote:
> Ok, though ideally tests should use dedicated throws detection tools
This test is still a TestNG test, and AFAIK TestNG does not have so nice assert for thrown exception (it is an attribute to the `@Test` annotation). So this whole test is using the same pattern. My plan is to convert all tests in this directory to JUnit, at which point using the JUnit' `assertThrows` should be used.
Thanks for the review!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29202#issuecomment-3767141867
More information about the core-libs-dev
mailing list