Skip to content

Update Reformatter to honour case wrap settings with switch expressions (GH7326).#9484

Open
neilcsmith-net wants to merge 1 commit into
apache:masterfrom
neilcsmith-net:gh7326
Open

Update Reformatter to honour case wrap settings with switch expressions (GH7326).#9484
neilcsmith-net wants to merge 1 commit into
apache:masterfrom
neilcsmith-net:gh7326

Conversation

@neilcsmith-net

Copy link
Copy Markdown
Member

Update Reformatter to only add a newline to cases in switch expressions when wrapCaseStatements is set to WRAP_ALWAYS (default).

Fixes #7326

Alternative might be to ignore the force wrap setting when we have an ARROW rather than COLON. I'm not sure the default works as well in those cases.

@neilcsmith-net neilcsmith-net requested a review from mbien July 3, 2026 09:36
@neilcsmith-net neilcsmith-net added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Jul 3, 2026
@neilcsmith-net neilcsmith-net added this to the NB31 milestone Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatting Issue - Wrapping for Java 21 Style Switch Cases that have Arrows

1 participant