[java] Support JDK 15#2714
Conversation
Generated by 🚫 Danger |
so that it can be distinguished from local var decl or other statements.
oowekyala
left a comment
There was a problem hiding this comment.
Thanks for working on this!
It's buried in the JEP, but local interfaces and enums are now allowed too.
Given the usefulness of local records, it would be useful to have local enums and local interfaces too. They were traditionally disallowed in Java because of concern over their semantics. Specifically, nested enums and nested interfaces are implicitly static, so local enums and local interfaces should be implicitly static too; yet, local declarations in the Java language (local variables, local classes) are never static. However, the introduction of local records in JEP 359 [the first record preview] overcame this semantic concern, allowing a local declaration to be static, and opening the door to local enums and local interfaces.
(source: https://openjdk.java.net/jeps/384)
I've seen this, but interpreted it just as this would theoretically be possible now (the door is open to allow this) but wasn't actually done yet.... But it seems, it's implemented in javac already - at least it compiles. |
Yes, I would appreciate this. You're more familiar with the java-grammar branch 😄 |
Describe the PR
Update PMD Java to support Java 15.
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by travis)