On Tue, 13 Jan 2026 18:05:43 GMT, Jan Lahoda <[email protected]> wrote:

> The `SwitchBootstraps.enumSwitch` is documented to throw a 
> `NullPointerException` when `lookup` is `null`, but it does not throw the 
> exception in all cases.
> 
> Given the `lookup` is in some cases required, the proposal herein is to 
> properly check `lookup` is not `null`. And while doing that, I added similar 
> checks for `invocationType` and `labels` - those were checked implicitly, but 
> doing the check explicitly is better. Note `invocationName` is unused and is 
> permitted to be `null`, and hence there's no check for it.
> 
> Please also review the CSR:
> https://bugs.openjdk.org/browse/JDK-8375120

TestNG has a `org.testng.Assert.assertThrows` method, but sure we can migrate 
later. 👍

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

PR Comment: https://git.openjdk.org/jdk/pull/29202#issuecomment-3769533609

Reply via email to