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

Ok, though ideally tests should use dedicated throws detection tools

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

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29202#pullrequestreview-3675325350

Reply via email to