]> source.dussan.org Git - aspectj.git/commitdiff
Oops! Now skips advice/etc when looking for matches for dec @method/@ctor
authoraclement <aclement>
Fri, 11 Mar 2005 17:31:18 +0000 (17:31 +0000)
committeraclement <aclement>
Fri, 11 Mar 2005 17:31:18 +0000 (17:31 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java

index 2eff5161258c0c2cba044679b4af91a91e7294d6..0581840eb4f91b0e833ccd6ac6bb8de46eb2b25f 100644 (file)
@@ -423,7 +423,7 @@ class BcelClassWeaver implements IClassWeaver {
           // go through all the fields
           for (int memberCounter = 0;memberCounter<members.size();memberCounter++) {
             LazyMethodGen mg = (LazyMethodGen)members.get(memberCounter);
-            
+            if (!mg.getName().startsWith(NameMangler.PREFIX)) {
             // Single first pass
             List worthRetrying = new ArrayList();
             boolean modificationOccured = false;
@@ -454,7 +454,7 @@ class BcelClassWeaver implements IClassWeaver {
                                if (decaM.matches(mg.getMemberView(),world)) {
                                        if (doesAlreadyHaveAnnotation(mg.getMemberView(),decaM,false)) continue; // skip this one...
                                        mg.addAnnotation(decaM.getAnnotationX());
-                                       AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaM.getSourceLocation(),mg.getSourceLocation());
+                                       AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaM.getSourceLocation(),clazz.getName(),mg.getMethod());
                                        isChanged = true;
                                        modificationOccured = true;
                                        forRemoval.add(decaM);
@@ -462,6 +462,7 @@ class BcelClassWeaver implements IClassWeaver {
                          }
                          worthRetrying.removeAll(forRemoval);
             }
+            }
           }
         }
                return isChanged;
@@ -504,7 +505,7 @@ class BcelClassWeaver implements IClassWeaver {
           // go through all the fields
           for (int fieldCounter = 0;fieldCounter<fields.length;fieldCounter++) {
             BcelField aBcelField = new BcelField(clazz.getBcelObjectType(),fields[fieldCounter]);
-           
+                       if (!aBcelField.getName().startsWith(NameMangler.PREFIX)) {
             // Single first pass
             List worthRetrying = new ArrayList();
             boolean modificationOccured = false;
@@ -541,6 +542,7 @@ class BcelClassWeaver implements IClassWeaver {
                          }
                          worthRetrying.removeAll(forRemoval);
             }
+                       }
           }
         }
                return isChanged;