Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Arc to deal with final methods of beans that need to be proxied #10497

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Jul 6, 2020

This is done in the same manner that is already present for
interceptors and is very useful for Kotlin code where methods
are final by default

Fixes: #10290

@geoand geoand requested a review from mkouba July 6, 2020 14:22
@boring-cyborg boring-cyborg bot added the area/arc Issue related to ARC (dependency injection) label Jul 6, 2020
@geoand geoand changed the title Allow Arc to deal with final methods of beans that needs to be proxied Allow Arc to deal with final methods of beans that need to be proxied Jul 6, 2020
@geoand
Copy link
Contributor Author

geoand commented Jul 6, 2020

@mkouba this probably could be a little cleaner, but I hope it's good enough for now :)

@geoand geoand added this to the 1.7.0 - master milestone Jul 7, 2020
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

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

LGTM, but let's wait for @mkouba to review :)

Copy link
Contributor

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

I wonder if we should mention this in the guide (under the "Non-standard Features" section) and possibly also mention the fact that we do this for beans classes as well. Maybe even enhance the javadoc of ArcConfig.transformUnproxyableClasses?

@geoand
Copy link
Contributor Author

geoand commented Jul 7, 2020

Looks good.

I wonder if we should mention this in the guide (under the "Non-standard Features" section) and possibly also mention the fact that we do this for beans classes as well. Maybe even enhance the javadoc of ArcConfig.transformUnproxyableClasses?

Sure, I'll do that later on

@geoand
Copy link
Contributor Author

geoand commented Jul 7, 2020

@mkouba PR updated with the doc suggestions you mentioned

@geoand
Copy link
Contributor Author

geoand commented Jul 8, 2020

@mkouba OK to merge?

@@ -59,6 +59,9 @@
* If set to true, the bytecode of unproxyable beans will be transformed. This ensures that a proxy/subclass
* can be created properly. If the value is set to false, then an exception is thrown at build time indicating that a
* subclass/proxy could not be created.
*
* Furthermore when enabled, this setting allows Quarkus to properly create regular scoped class beans whose methods
Copy link
Contributor

Choose a reason for hiding this comment

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

I was more thinking about a list of all transformations we do... final class, no-args constructors, final methods of bean classes (for proxies/subclasses). This sentence is more or less redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, fixed

Copy link
Contributor

@mkouba mkouba left a comment

Choose a reason for hiding this comment

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

LGTM.

This is done in the same manner that is already present for
interceptors and is very useful for Kotlin code where methods
are final by default

Fixes: quarkusio#10290
@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 8, 2020
@geoand geoand merged commit 75e944a into quarkusio:master Jul 8, 2020
@geoand geoand deleted the #10290 branch July 8, 2020 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/documentation triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RequestScoped beans keeping property values from previous requests when using kotlin.
3 participants