[
https://issues.jboss.org/browse/JBIDE-11867?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich commented on JBIDE-11867:
-----------------------------------------------
It seems I implemented it the other way around. I followed the item
"10.2. Observer resolution:
An event is delivered to an observer method if:
...
The observer method has all the event qualifiers.
..."
I concluded from this, that if a fired event has a qualifier, then an observer needs to
have it too, in order to receive the event; but that observer is free to have more
qualifiers and they will not prevent the event from being delivered.
However, now reading in the beginning of chapter 10:
"An observer method will be notified of an event if the event object is assignable to
the observed event type, and if all the observed event qualifiers are event qualifiers of
the event.", I see that it is opposite to what I draw from 10.2.
Can it be that 10.2 contradicts to other statements, or is it my misunderstanding?
Tooling for CDI Event identifies invalid observer
-------------------------------------------------
Key: JBIDE-11867
URL:
https://issues.jboss.org/browse/JBIDE-11867
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: CDI
Affects Versions: 3.3.0.Beta2
Environment: Eclipse Version: Indigo Service Release 2 Build id: 20120216-1857
JBoss Tools Nightly
Context and Dependency Injection
Tools 1.2.0.v20120508-1258-H1103-CR1 org.jboss.tools.cdi.feature.feature.group JBoss by
Red Hat
Reporter: Cody Lerum
Assignee: Viacheslav Kabanovich
Fix For: 3.3.0.CR1
Attachments: cdi_event.png
With the following event
{code}
@Inject
private Event<EventLog> eventLog;
{code}
Tooling suggests that the following is a valid observer which it is not because it
specifics an additional qualifier. Additionally it should show a warning that no observer
exists to receive this event.
{code}
public void log(@Observes @Now EventLog eventLog) {
...
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira