V L created OWB-1043:
------------------------
Summary: Private method observer is not working properly while
processing second and next events
Key: OWB-1043
URL: https://issues.apache.org/jira/browse/OWB-1043
Project: OpenWebBeans
Issue Type: Bug
Components: Events
Affects Versions: 1.1.8
Reporter: V L
I found a strange behavior while handling events by private methods. First
event was processed successfully, but the next ones not.
Look at the
/org/apache/webbeans/event/ObserverMethodImpl.java:216
isPrivateMethod is true, then accessible flag sets to true. This means that
next time isPrivateMethod will be false even observer method has a private
qualifier. Invocation of such method will be the same as invocation of public
methods, but invocation handler won't be invoked for private fields.
In this situation proxy instance's method will be invoked, but not a method of
the contextual bean instance.
In my case I get a NPE when calling any injected bean methods (each injected
beans are null inside assist proxy)
Seems that this code should be changed:
boolean isPrivateMethod = !observerMethod.isAccessible();
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)