Skip to content

Conversation

@oowekyala
Copy link
Member

I noticed the grammar we have for switch labels does not match the reference grammar at https://docs.oracle.com/javase/specs/jls/se25/html/jls-14.html#jls-SwitchLabel. For instance our grammar allows things like case null, null, null, default or specifying multiple guard clauses when at most one is permitted.

Describe the PR

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

@oowekyala oowekyala added this to the 7.20.0 milestone Dec 2, 2025
@oowekyala oowekyala added the in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception label Dec 2, 2025
@pmd-actions-helper
Copy link
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.

Regression Tester Report

(comment created at 2025-12-02 16:33:48+00:00 for 84a5f42)

@oowekyala oowekyala marked this pull request as ready for review December 2, 2025 16:46
Copy link
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adangel adangel merged commit 84a5f42 into pmd:main Dec 21, 2025
12 checks passed
adangel added a commit that referenced this pull request Dec 21, 2025
adangel added a commit that referenced this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants