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

missing @Any qualifier on MybatisBean if user provided qualifier is present #430

Open
hktmyzk opened this issue Dec 22, 2023 · 0 comments
Open

Comments

@hktmyzk
Copy link

hktmyzk commented Dec 22, 2023

Hello,

After reviewing MyBatisBean.java, it appears that the @Any annotation will not be assigned to the bean if a qualifier is present at the injection point.

On line 71:

    if (qualifiers == null || qualifiers.isEmpty()) {
      this.qualifiers = new HashSet<>();
      this.qualifiers.add(new CDIUtils.SerializableDefaultAnnotationLiteral());
      this.qualifiers.add(new CDIUtils.SerializableAnyAnnotationLiteral());
    } else {
      this.qualifiers = qualifiers;
    }

If no qualifiers are found, the @Any annotation will be added. However, if qualifiers are found, the @Any annotation will not be added.

I believe the @Any qualifier should be added regardless.

Thanks.

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

No branches or pull requests

1 participant