[ 
https://issues.apache.org/jira/browse/OWB-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Struberg resolved OWB-1043.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 1.1.9

Hi!

Txs for the bug report! I've fixed this in the 1.1.x trunk and added a unit 
test to the owb-1.2.x and 1.5.x branches.

> 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
>            Assignee: Mark Struberg
>             Fix For: 1.1.9
>
>
> 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 
> access . Invocation of such method will be the same as invocation of public 
> methods, but invocation handler won't be invoked for private methods.
> 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)

Reply via email to