GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — #4062 added the new switch expression usage for jdk greater than 13 by bydrim · Pull Request #4065 · mapstruct/mapstruct

Conversation

@bydrim

@bydrim bydrim commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

As described in the issue #4062 for jdk equal or greater than 13 the usage of new switch expression added. Related fixtures are updated. Also as discussed with Filip, for switch expressions with only default case, defaultTarget is directly assigned without switch expression, such as

ExternalOrderType externalOrderType = ExternalOrderType.DEFAULT;

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bydrim

bydrim commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

It seems that the code is not compliant with the formatting rules. Working on it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bydrim
bydrim force-pushed the feat/switch-exp-jdk13 branch from 6e20680 to ca10fcc Compare June 7, 2026 11:44
@bydrim

bydrim commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

I realized that Reformat Code on save was not active on my Intellij. I used git squash to keep the git logs clean, so these are the formatting changes:

  • ValueMappingMethod.java line 567
  • DefaultVersionInformation.java line 7 (actually i didn't touch this line in my first commit but intellij formatted when i was reformatting the whole file)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bydrim

bydrim commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

The fail seems to be related to codecov migrating their keybase accounts. Their advice is to use v7, and currently v5 is used in this project.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hduelme

hduelme commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@bydrim yes the JDK 21 pipline failed because of the issue you referenced. We upgraded the plugin to v7.

The fail seems to be related to codecov migrating their keybase accounts. Their advice is to use v7, and currently v5 is used in this project.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hduelme
hduelme requested changes Jun 8, 2026
View reviewed changes

@hduelme hduelme left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@bydrim nice work.
I think we could stop generating the default branch if all enum values are explicitly covered by case statements. Am I overlooking something, or would that work here? Let me know what you think.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread processor/src/main/resources/org/mapstruct/ap/internal/model/ValueMappingMethod.ftl Resolved

Uh oh!

There was an error while loading. Please reload this page.

stefanos-kalantzis
stefanos-kalantzis suggested changes Jun 9, 2026
View reviewed changes
Comment thread processor/src/main/java/org/mapstruct/ap/internal/processor/DefaultVersionInformation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread processor/src/main/resources/org/mapstruct/ap/internal/model/ValueMappingMethod.ftl Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hduelme hduelme changed the title added the new switch expression usage for jdk equal or greater than 13 added the new switch expression usage for jdk greater than 13 Jun 10, 2026
@bydrim
added the new switch expression usage for jdk equal or greater than 14
1ccc2f3
@bydrim
bydrim force-pushed the feat/switch-exp-jdk13 branch from ca10fcc to 1ccc2f3 Compare June 12, 2026 20:51
hduelme
hduelme approved these changes Jun 14, 2026
View reviewed changes
@hduelme hduelme changed the title added the new switch expression usage for jdk greater than 13 #4062 added the new switch expression usage for jdk greater than 13 Jun 14, 2026
@hduelme
hduelme merged commit 9376d42 into mapstruct:main Jun 14, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@hduelme hduelme mentioned this pull request Jun 14, 2026
Use switch Expressions for JDK13 and newer #4062
Closed
@hduelme

hduelme commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

@bydrim Thanks for making the adjustments, and thanks for the contribution.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bydrim

bydrim commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

thank you @hduelme and Filip for the opportunity and support. I learned a lot and had fun. I hope to contribute more in the future. Also thank you @stefanos-kalantzis for correcting the version number.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hduelme hduelme hduelme approved these changes
+1 more reviewer
@stefanos-kalantzis stefanos-kalantzis stefanos-kalantzis requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@bydrim @hduelme @stefanos-kalantzis
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.