-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Java 14 switch/yield expression #6615
Comments
Examples and explanation: https://openjdk.java.net/jeps/325 OpenJDK repositories: |
Some more info from when executing checkstyle:
|
There some work is done, but not completed, everyone is welcome to continue, referenced code can be reused. |
For the ones feeling blocked, by checkstyle excpetions on java 14 files, see https://stackoverflow.com/a/61071633/873282:
|
This includes allowing switch as an expression, i.e. switch expressions, and allowing mutliple expressions in both labels and rules as according to the JLS.
I have written support for this and made a new PR #8185. |
Any workaround for this? |
@cemo the only workaround for now is to use file filter to avoid processing of such files |
fix is merged. |
@romani can you cut a release soon please? |
Hello. But I faced the same problem. I am using "checkstyle-8.35". CheckStyle plugin in IDEA says that it cannot parse the file. And in the console displays the following text:
I found that the standard java 14 "switch" syntax throws this error. Here's this piece of code:
If I am doing something wrong - tell me where to look for a solution? |
These changes will be in the 8.36 release. |
we will do release as planned, last weekend of month. |
Running checkstyle validation on a class that contains switch expression:
fails with:
And also
FIX Summary:
new Tokens are created. Syntax should be supported, Checks will be updated later on, See follow up issues.
see #8449 for more details
The text was updated successfully, but these errors were encountered: