-
Enhancement
-
Resolution: Won't Do
-
Major
-
None
-
2.4.3.Final
-
None
If one is using qualifiers that make use of binding members, a resolution error message like the following fails to adequately describe which qualifiers are involved:
Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318: Cannot resolve an ambiguous dependency between:
- Producer Method [Optional] with qualifiers [@Claim @Claim @Claim] declared as [[UnbackedAnnotatedMethod] @Claim @Dependent @Produces org.eclipse.microprofile.jwt.wfswarm.cdi.CustomClaimProducer.genericOptionalClaimProducer(InjectionPoint)],
- Producer Method [Object] with qualifiers [@Claim @Claim @Claim] declared as [[UnbackedAnnotatedMethod] @Claim @Dependent @Produces org.eclipse.microprofile.jwt.wfswarm.cdi.CustomClaimProducer.genericClaimProducer(InjectionPoint)]
where Claim is:
@Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) public @interface Claim { /** * The value specifies the id name the claim to inject * @return the claim name * @see JsonWebToken#getClaim(String) */ String value() default ""; /** * An alternate way of specifying a claim name using the {@linkplain Claims} * enum * @return the claim enum */ Claims standard() default Claims.UNKNOWN; }
In general, it would be good if the messages involving qualifiers that have binding members would print out the binding members to help with identifying the context that is involved.