Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

t1/repeatable-interceptor-stereotype-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bug in WELD (CDI RI)

See WELD-2670

I can add multiple instances of a repeatable annotation on a method and/or on a stereotype used on that method, and the interceptor is triggered. I can freely mix both locations and then collect all annotations in my interceptor.

When I try to do the same at the class level, I run into two issues:

  • If I add one instances of the same repeatable annotations on the class as well as on a stereotype used on the same class, I get an IllegalArgumentException: WELD-001312: Duplicate interceptor binding type QualifierInstance exception at deploy time. It works, if I put at least two instances of that annotation on the stereotype.

  • If I add multiple instances of one repeatable annotation to a stereotype used at a class, the interceptor is simply not triggered.

Instructions

  1. Build the war and deploy it on a WildFly 23.0.1.Final

  2. Request http://localhost:8080/ping

  3. Look into the logs ⇒ no messages from the interceptor.

  4. Uncomment one of the @Logged annotations in the LoggedStereotype, rebuild/redeploy/rerequest ⇒ it logs.

  5. Uncomment one of the @Logged annotations in the Boundary, rebuild/redeploy ⇒ Deployment fails.

  6. You can repeat everything at the method level in the Boundary class by uncommenting there ⇒ everything works.

About

Demonstrates a Bug in Weld

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages