coherence-community / oracle-bedrock

Oracle Bedrock
Other
55 stars 31 forks source link

invoking(...) should allow proxy creation of a specific interface #198

Closed brianoliver closed 9 years ago

brianoliver commented 9 years ago

In cases where developers attempt to use invoking(...) against instances that are final, they will see an exception stating that we can't sub-class a final class.

As we can't sub-class final classes and developers are typically calling methods on specific interfaces of the final class, we should allow developers to specify the interface the proxy should use, instead of the final class.

eg:

Eventually.assertThat(invoking(myServer, MBeanServer.class).isRegistered(...), ...);

This means that Oracle Tools will treat the "myServer" as an MBeanServer, instead of what ever final class myServer represents.

brianoliver commented 8 years ago

This issue was imported from JIRA ORACLETOOLS-198

brianoliver commented 9 years ago

Reported by @brianoliver

brianoliver commented 9 years ago

Marked as fixed by @brianoliver on Thursday, November 20th 2014, 1:53:11 pm