This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans only allows @Qualifiers to have: @Target({ FIELD, PARAMETER }) or @Target({ METHOD, FIELD, PARAMETER, TYPE }) This is too restrictive, because it fails to consider (e.g.) @Produces methods. @Produces @MyQualifier String getValue() { return "foo"; } This @Produces method might reasonably expect to satisfy a field and/or parameter injection point, but that would require that @MyQualifier be applicable to a METHOD as well. However, NetBeans rejects a qualifier that wants to use: @Target({ METHOD, FIELD, PARAMETER }) It is therefore forced to include TYPE as well, despite @MyQualifier *not* being applicable to a type declaration. Conversely, I also have previously also had reason to create qualifiers that have wanted to use only: @Target(TYPE) NetBeans doesn't like these either, although they are perfectly legal and accepted by WELD. Even worse, once NetBeans decides it doesn't like the @Target types on a qualifier, it refuses to use that qualifier for type-safe bean resolution. I strongly suspect that this is what bug #225556 was trying to raise.
http://hg.netbeans.org/web-main/rev/d86437089d04
*** Bug 243155 has been marked as a duplicate of this bug. ***