Skip to content

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

@hktmyzk

Description

@hktmyzk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions