]
Pete Muir closed WELD-535.
--------------------------
Assignee: Pete Muir
Fix Version/s: (was: 1.0.2.CR1)
Resolution: Duplicate Issue
Injection does not occur into a normal scoped observer bean if
@Observes method is private
------------------------------------------------------------------------------------------
Key: WELD-535
URL:
https://jira.jboss.org/browse/WELD-535
Project: Weld
Issue Type: Bug
Components: Events
Affects Versions: 1.0.1.Final
Reporter: Dan Allen
Assignee: Pete Muir
If the observer method of a bean is private, and the bean which contains it has a scope
(it's proxied), then injection into the bean does not occur.
For example, the injection points are null when the following observer is invoked:
@SessionScoped
public class SampleObserver implements Serializable {
@Inject SampleHelper helper;
private void observes(@Observes final SampleBean bean) {
System.out.println("Did injection occur? " + (helper = null ?
"no" : "yes"));
}
}
Prints:
Did injection occur? no
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: