[
https://issues.apache.org/jira/browse/OWB-810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Struberg resolved OWB-810.
-------------------------------
Resolution: Fixed
Fix Version/s: 1.5.0
Assignee: Mark Struberg
> (public or protected) Observer methods don't get intercepted in the first
> firing of the event
> ---------------------------------------------------------------------------------------------
>
> Key: OWB-810
> URL: https://issues.apache.org/jira/browse/OWB-810
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Events
> Affects Versions: 1.1.7
> Environment: JRE 1.7
> Reporter: Taha Ghasemi
> Assignee: Mark Struberg
> Fix For: 1.5.0
>
>
> If an observer method has an interceptor, the interceptor isn't called by OWB
> in the first firing of the event. While this is expected for private observer
> methods (as they can't be proxied), for public or protected methods this is a
> bug.
> Apparently, the root problem is in ObserverMethodImpl:notify which decides a
> method is private or not based on this code:
> boolean isPrivateMethod = !observerMethod.isAccessible() ;
> And then make the method accessible if it is not. By default, all reflected
> objects are inaccessible so even public methods in the first time treated as
> private and thus the obtained object is not a proxy.
> In addition, with the above code, the private methods are detected properly
> in the first time, but in the next times they treated as non-private methods
> which is wrong.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)