JEP 406 introduced a new preview feature in Java 17 called Pattern Matching for switch. Checkstyle added support for this in Issue #10848 and PR #11100. Since then, however, the feature got refined multiple times in:
In those refinements, some syntax was dropped, which led to some of the test cases added in PR #11100 becoming non-compileable.
In PR #18103, we:
- Extracted the non-compilable test cases in separate files -
*NoLongerSupportedByJava.java. This was done to preserve parser coverage.
- Updated all non-compilable test cases to match updated syntax and moved them to the compilable
resources/
What remains is to:
JEP 406 introduced a new preview feature in Java 17 called
Pattern Matching for switch. Checkstyle added support for this in Issue #10848 and PR #11100. Since then, however, the feature got refined multiple times in:In those refinements, some syntax was dropped, which led to some of the test cases added in PR #11100 becoming non-compileable.
In PR #18103, we:
*NoLongerSupportedByJava.java. This was done to preserve parser coverage.resources/What remains is to:
MissingSwitchDefaultOperatorWrapCheckRemove grammar that was added in Issue #10848: Support patterns in switch #11100