]> source.dussan.org Git - aspectj.git/commitdiff
232712: fix - remove native when creating bridge method
authoraclement <aclement>
Tue, 20 May 2008 18:30:38 +0000 (18:30 +0000)
committeraclement <aclement>
Tue, 20 May 2008 18:30:38 +0000 (18:30 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java

index 98e7314903652cd44461313adb1f9fcba8a2a38b..7d08cfeb2cdfd9782851b6b6ba732d3a9542d278 100644 (file)
@@ -398,7 +398,9 @@ class BcelClassWeaver implements IClassWeaver {
                                whatToBridgeToMethodGen.getSignature());
                }
                LazyMethodGen bridgeMethod = makeBridgeMethod(clazz,theBridgeMethod); // The bridge method in this type will have the same signature as the one in the supertype
-               bridgeMethod.setAccessFlags(bridgeMethod.getAccessFlags() | 0x00000040 /*BRIDGE    = 0x00000040*/ );
+               int newflags = bridgeMethod.getAccessFlags() | 0x00000040;/*BRIDGE    = 0x00000040*/
+               if ((newflags & 0x00000100) !=0) newflags = newflags - 0x100;/* NATIVE = 0x00000100 - need to clear it */
+               bridgeMethod.setAccessFlags(newflags );
                Type returnType   = BcelWorld.makeBcelType(theBridgeMethod.getReturnType());
                Type[] paramTypes = BcelWorld.makeBcelTypes(theBridgeMethod.getParameterTypes());
                Type[] newParamTypes=whatToBridgeToMethodGen.getArgumentTypes();