Interesting. Almost all my actual experience writing Java is in Java 8, so I'm not super familiar with the modern stuff (other then a few things like Records). I'll have to take a look.

Most of the people I know who write Java would have an aneurysm at seeing a switch statement.

To be clear, that's a critique of the Java mindset, not your code. Lol