]> source.dussan.org Git - aspectj.git/commitdiff
integrated head into extensions branch
authoraclement <aclement>
Fri, 2 Mar 2007 08:23:41 +0000 (08:23 +0000)
committeraclement <aclement>
Fri, 2 Mar 2007 08:23:41 +0000 (08:23 +0000)
weaver/src/org/aspectj/weaver/MemberImpl.java
weaver/src/org/aspectj/weaver/ResolvedType.java
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java

index 8b4635157c5353f131ee255802090fa5e42970fe..615f523dd476485754dfa14643f7d139af1852fd 100644 (file)
@@ -991,4 +991,4 @@ public class MemberImpl implements Comparable, AnnotatedElement,Member {
     }
 
 }
-   
\ No newline at end of file
+   
index 598b403f1a91b17baea2615bc45d8198f12a7a16..c60a24f7f0503eda5204f4759ba6c0146b7e440b 100644 (file)
@@ -286,7 +286,9 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
             boolean shouldSkip = false;
             for (int j = 0; j < rtx.interTypeMungers.size(); j++) {
                 ConcreteTypeMunger munger = (ConcreteTypeMunger) rtx.interTypeMungers.get(j);
-                if (munger.getMunger()!=null && munger.getMunger().getKind() == ResolvedTypeMunger.Parent) {
+                if (munger.getMunger()!=null && munger.getMunger().getKind() == ResolvedTypeMunger.Parent 
+                               && ((NewParentTypeMunger)munger.getMunger()).getNewParent().equals(iface) // pr171953
+                               ) {
                     shouldSkip = true;
                     break;
                 }
index a8e7b6332710e63a38942bf7429cee83f534a731..9fb3d75da8d7a65694971740cfe19a710a42a319 100644 (file)
@@ -2402,7 +2402,17 @@ public class BcelShadow extends Shadow {
                        extraParamOffset += thisJoinPointVar.getType().getSize();
                }
         
-        Type[] adviceParameterTypes = adviceMethod.getArgumentTypes();
+               // We use the munger signature here because it allows for any parameterization of the mungers pointcut that
+               // may have occurred ie. if the pointcut is p(T t) in the super aspect and that has become p(Foo t) in the sub aspect
+               // then here the munger signature will have 'Foo' as an argument in it whilst the adviceMethod argument type will be 'Object' - since
+               // it represents the advice method in the superaspect which uses the erasure of the type variable p(Object t) - see pr174449.
+               
+        Type[] adviceParameterTypes = 
+          BcelWorld.makeBcelTypes(munger.getSignature().getParameterTypes());
+//        adviceMethod.getArgumentTypes();
+        adviceMethod.getArgumentTypes(); // forces initialization ... dont like this but seems to be required for some tests to pass, I think that means 
+                                         // there is a LazyMethodGen method that is not correctly setup to call initialize() when it is invoked - but I dont have
+                                         // time right now to discover which
         Type[] extractedMethodParameterTypes = extractedMethod.getArgumentTypes();
                Type[] parameterTypes =
                        new Type[extractedMethodParameterTypes.length
index 0a392cc26874e1f9b915db19816c126a8c099806..016bf8a683e2c69ba45a37177a9ac30d487b6882 100644 (file)
@@ -520,8 +520,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
                                return true;
                                //throw new BCException("no match for " + member + " in " + gen);
                        } else if (member.getKind() == Member.STATIC_INITIALIZATION) {
-                               gen.forcePublic();
-                               return true;
+                               return gen.forcePublic();
                        } else {
                                throw new RuntimeException("unimplemented");
                        }
index 6f6743f4716beeed95d73f52e9e3bd8b9dd4b561..8f414f8483f3f6ecaab154275843c5273806c9fa 100644 (file)
@@ -1321,8 +1321,10 @@ public final class LazyClassGen {
        }
        
        
-       public void forcePublic() {
+       public boolean forcePublic() {
+               if (myGen.isPublic()) return false;
                myGen.setAccessFlags(Utility.makePublic(myGen.getAccessFlags()));
+               return true;
        }