NullPointerException in switch: null selector and case null
A switch on a null String, enum, Integer or sealed type throws NullPointerException, and default won't catch it. Why, how 8 to 25 differ, and the fix.
A switch on a null String, enum, Integer or sealed type throws NullPointerException, and default won't catch it. Why, how 8 to 25 differ, and the fix.
A ThreadLocal that worked fine in a thread pool returns null the moment a virtual thread forks a subtask. Here's the mechanism, and what actually fixes it.