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

Funqy - fix constructor injection for normal scoped beans #27674

Merged

Conversation

michalvavrik
Copy link
Contributor

fixes: #27671

Default no-args constructor is not generated for normal scoped beans anymore.

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

I am not familiar with funqy so I'll let someone else also review as well but from Arc/CDI perspective, this looks good!

@geoand geoand merged commit 9abae6d into quarkusio:main Sep 2, 2022
@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Sep 2, 2022
@@ -172,6 +172,12 @@ private static void generateDefaultConstructors(BuildProducer<BytecodeTransforme
Set<ClassInfo> withoutDefaultCtor) {

for (ClassInfo classInfo : withoutDefaultCtor) {
// don't generate constructor for normal scoped beans as the Quarkus Arc does that for us
Copy link
Contributor

Choose a reason for hiding this comment

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

So in theory, custom scopes can be normal as well. On the other hand, this solution probably covers 99% of use cases. Also the CustomScopeAnnotationsBuildItem can only be used to test the scope annotations and not whether they represent a normal scope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't know that, thank you.

@michalvavrik michalvavrik deleted the feature/funq-fix-constructor-injection branch September 2, 2022 07:31
@gsmet gsmet modified the milestones: 2.13 - main, 2.12.1.Final Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Classes with @Funq methods fail in constructor injection for normal scoped bean
5 participants