-
Bug
-
Resolution: Done
-
Minor
-
3.1.5.Final
-
None
-
-
Undefined
When BeanManager#isQualifier is called with annotations that are not valid qualifiers, the warning with ID 001101 "Member of array type or annotation type must be annotated @NonBinding: [some attribute of the offending annotation]" appears in my log file. The message originates from org.jboss.weld.metadata.cache.QualifierModel.java:66.
A warning is unnecessary in my opinion, at least in the context of BeanManager#isQualifier, because the occasional input that isn't an qualifier should be expected for this method. It should simply return false and nothing more.
In my case, I'm developing an extension that at some point uses
Arrays.stream(clazz.getAnnotations()).filter(annotation -> beanManager.isQualifier(annotation.annotationType()))
to obtain all qualifiers of some type. Depending on the input this line spams my log with warnings that do not warn about a real problem.