Skip to content

#4062 added the new switch expression usage for jdk greater than 13#4065

Merged
hduelme merged 1 commit into
mapstruct:mainfrom
bydrim:feat/switch-exp-jdk13
Jun 14, 2026
Merged

#4062 added the new switch expression usage for jdk greater than 13#4065
hduelme merged 1 commit into
mapstruct:mainfrom
bydrim:feat/switch-exp-jdk13

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;

@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.

@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)

@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.

@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.

@hduelme hduelme left a comment

Copy link
Copy Markdown
Contributor

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.

@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 bydrim force-pushed the feat/switch-exp-jdk13 branch from ca10fcc to 1ccc2f3 Compare June 12, 2026 20:51
@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
@hduelme

hduelme commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

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

@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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants