Closed brianoliver closed 8 years ago
This issue was imported from JIRA ORACLETOOLS-210
Reported by @brianoliver
Unfortunately it's not possible to detect or intercept when final methods are being used with invoking(...), so there's no way (yet) in Java (or cglib/asm etc) to work around this challenge.
When a developer uses invoking(...) with a final method, it may fail silently and/or produce a strange exception.
We need to warn users that it's not possible to use invoking(...) with a final method, or work out a way to make it possible.
One way would be to identify if the method is actually defined as part of an interface and then create a proxy of that, instead of the underlying final method.