Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
2.0.0.SP1
-
None
Description
When trying to add a qualifier to the list of observed qualifiers
void processObserverMethod(@Observes ProcessObserverMethod<? extends ConfigurableEvent<?>, ?> observerMethod) {
ObserverMethod<?> method = observerMethod.getObserverMethod();
Set<Annotation> qualifiers = method.getObservedQualifiers();
qualifiers.add(new AnnotationLiteral<SynchronousEvent>() {});
I get the following exception
Exception while loading the app : CDI definition failure:Exception List with 1 exceptions:
Exception 0 :
java.lang.UnsupportedOperationException
at java.util.AbstractCollection.add(AbstractCollection.java:252)
at ...EventExtension.processObserverMethod(EventExtension.java:36)
Same code works with Weld 1.1 on glassfish3 and jboss AS 7.2.0