-1 David,
On June 2nd you wrote in the thread, "Re: another weaving problem", "I'm going to try removing the final modifier from the generated synthetic methods and restore the OWB code. If you have any concerns please speak up :-)" These methods should be final: It's an unsafe and undesirable change to remove that modifier. On June 3rd , Richard Ellis, one of the two authors of this code, wrote "I'm not going to comment on whether final methods perform better or not, but the other reason the methods are marked final is to stop people overriding them when they shouldn't. There is no reason for another proxy (or anything outside of Aries) to override the methods added by the Aries proxy. The methods are (and should) only be called by the Aries code when it needs to perform proxy actions." Tim Ward followed up stating, "Richard and I chose to make these implementations final for three main reasons. 1. To ensure we weren't adding the methods multiple times 2. To make it less likely someone would accidentally start adding the methods multiple times when maintaining the proxy code 3. Because it improves performance" Richard has also re-emphasized the need to prevent these methods being subsequently overridden. On June 3rd you wrote, "Please discuss this on the owb dev list or in comments to https://issues.apache.org/jira/browse/OWB-579 The problem in owb is that although the actual proxy building code has no problems with the final synthetic methods, there's an excessively naive check for proxyability that just looks at all declared methods and checks they aren't final. Based on this example, I think there may be a lot of existing code with similar errors that works fine in most situations but will not work with aries. I'll commit a fix to owb too so everyone is unhappy. if you folks can convince the owb folks that the methods should be final I'll put the final back in aries." Now that you've made changes to the Web Beans code, please undo the changes made in https://issues.apache.org/jira/browse/ARIES-668. Thank you. Regards, Mark On 3 June 2011 07:42, <[email protected]> wrote: > Author: djencks > Date: Fri Jun 3 06:42:06 2011 > New Revision: 1130914 > > URL: http://svn.apache.org/viewvc?rev=1130914&view=rev > Log: > ARIES-668 don't mark synthetic methods final > > Modified: > > > aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/weaving/AbstractWovenProxyAdapter.java > > Modified: > aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/weaving/AbstractWovenProxyAdapter.java > URL: > http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/weaving/AbstractWovenProxyAdapter.java?rev=1130914&r1=1130913&r2=1130914&view=diff > > ============================================================================== > --- > aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/weaving/AbstractWovenProxyAdapter.java > (original) > +++ > aries/trunk/proxy/proxy-impl/src/main/java/org/apache/aries/proxy/impl/weaving/AbstractWovenProxyAdapter.java > Fri Jun 3 06:42:06 2011 > @@ -64,8 +64,7 @@ abstract class AbstractWovenProxyAdapter > .getLogger(AbstractWovenProxyAdapter.class); > > /** Access modifier for a public generated method */ > - private static final int PUBLIC_GENERATED_METHOD_ACCESS = ACC_PUBLIC | > ACC_FINAL > - | ACC_SYNTHETIC; > + private static final int PUBLIC_GENERATED_METHOD_ACCESS = ACC_PUBLIC | > ACC_SYNTHETIC; > /** The internal name for Throwable */ > static final String THROWABLE_INAME = > Type.getInternalName(Throwable.class); > /** A UUID for adding to our method names */ > > >
