Skip to content

Conversation

@yrodiere
Copy link
Member

@yrodiere yrodiere commented Nov 8, 2024

This method allows custom contexts to pick the behavior they want when a class contains getters/setters that do not have a matching field, making enhancement impossible.

Three behaviors are available:

  • SKIP (the default), which will skip enhancement of such classes.
  • FAIL, which will throw an exception upon encountering such classes.
  • LEGACY, which will restore the pre-HHH-16572 behavior.

I do not think LEGACY is useful at the moment, but I wanted to have that option in case it turns out HHH-16572 does more harm than good in Quarkus 3.15.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-18833

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Nov 8, 2024

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@yrodiere yrodiere changed the title Introduce EnhancementContext#getUnsupportedEnhancementStrategy HHH-18833 Introduce EnhancementContext#getUnsupportedEnhancementStrategy Nov 8, 2024
@yrodiere
Copy link
Member Author

Thanks. Backporting as #9245.

Copy link
Member

@sebersole sebersole left a comment

Choose a reason for hiding this comment

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

Looks good. A few requests, mainly adding @Incubating

This method allows custom contexts to pick the behavior they want when
a class contains getters/setters that do not have a matching field,
making enhancement impossible.

Three behaviors are available:

* SKIP (the default), which will skip enhancement of such classes.
* FAIL, which will throw an exception upon encountering such classes.
* LEGACY, which will restore the pre-HHH-16572 behavior.

I do not think LEGACY is useful at the moment, but I wanted to have
that option in case it turns out HHH-16572 does more harm than good in
Quarkus 3.15.
@yrodiere
Copy link
Member Author

Looks good. A few requests, mainly adding @Incubating

Thanks, I addressed your comments. Will merge when CI is green.

@yrodiere yrodiere dismissed sebersole’s stale review November 13, 2024 08:40

Addressed comments.

@yrodiere
Copy link
Member Author

The only test failure happens on main too. Merging.

@yrodiere yrodiere merged commit b5221e2 into hibernate:main Nov 13, 2024
23 of 24 checks passed
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.

4 participants