I found a strange behavior while handling events by private methods. First event was processed successfully, but the next ones not.
Look at the
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();