coherence-community / oracle-bedrock

Oracle Bedrock
Other
55 stars 31 forks source link

Warn users when attempting to use invoking(...) with a final method #210

Closed brianoliver closed 8 years ago

brianoliver commented 9 years ago

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.

brianoliver commented 8 years ago

This issue was imported from JIRA ORACLETOOLS-210

brianoliver commented 9 years ago

Reported by @brianoliver

brianoliver commented 8 years ago

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.