Java Cup
Inside Java

News and views from members of the Java team at Oracle

WHEN and NULL in Pattern Matching - Inside Java Newscast #24

JEP 427 proposes two changes to pattern matching in switch:

  1. Guarded patterns, which belonged to patterns, are replaced with when clauses, which belong to the case.

  2. null needs to be handled by a specific case null.

Show Notes

Additional Resources

The Inside Java Newscast is a monthly YouTube show - check out the YouTube playlist for all the episodes. Since 2026, we also publish it as a podcast. For more Java news, subscribe to our RSS feed and follow @Java on X.

Contact us.