Skip to content

Drop support in checks for no-longer-compilable preview feature - Pattern matching for swtich #18104

@stoyanK7

Description

@stoyanK7

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions