]> source.dussan.org Git - aspectj.git/commitdiff
pr173729: test and fixes committed. Modify the bcel delegate at compile time alongsi...
authoraclement <aclement>
Tue, 6 Nov 2007 15:28:58 +0000 (15:28 +0000)
committeraclement <aclement>
Tue, 6 Nov 2007 15:28:58 +0000 (15:28 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java

index 72626eacdacba783f3b178dca4b1e6d358943ff9..1ca6a5dac30dd5bb1b8ad3875bcc34a2314c7703 100644 (file)
@@ -1035,6 +1035,17 @@ public class BcelWeaver implements IWeaver {
                }
           }
 
+       // Go through the types and ensure any 'damaged' during compile time are repaired prior to weaving
+       for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {
+            UnwovenClassFile classFile = (UnwovenClassFile)i.next();
+            String className = classFile.getClassName();
+            ResolvedType theType = world.resolve(className);
+            if (theType!=null) {
+                   BcelObjectType classType = BcelWorld.getBcelObjectType(theType);
+                   if (classType!=null) classType.ensureDelegateConsistent();
+            }
+       }
+
         // special case for AtAspectJMungerOnly - see #113587
         if (input.isApplyAtAspectJMungersOnly()) {
             ContextToken atAspectJMungersOnly = CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.PROCESSING_ATASPECTJTYPE_MUNGERS_ONLY, "");