Repository navigation
[java] Fix #5670, #5514: ExhaustiveSwitchHasDefault when default is necessary - #6822
Conversation
|
Compared to main: (comment created at 2026-07-15 09:22:43+00:00 for 1169e5f) |
f4bd397 to
a5c0c8c
Compare
a5c0c8c to
fc2aa88
Compare
adangel
left a comment
There was a problem hiding this comment.
Thanks, looks good. Just some minor suggestions (not sure if they work).
This PR doesn't address any of the concerns in #5514 (comment).
Should we create a new issue for that? IIRC, the java compiler adds in sometimes a default case, to exactly prevent the issue described in the comment (compiling against a different enum version than running at runtime...).
Hm.. it seems, this happens only for exhaustive switch expressions (see https://openjdk.org/jeps/361 - section "Exhaustiveness").
So, maybe it indeed makes sense have a separate issue for this.
…itchLike.java Co-authored-by: Andreas Dangel <[email protected]>
a3bb19c to
1169e5f
Compare
|
Thanks for the review. I've added #6879 to track the other issue. |
Describe the PR
What this PR doesn't do
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)