From 2d623e1c0ac093f53795c77e5d57cfb3045178a3 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 6 Nov 2007 15:28:58 +0000 Subject: [PATCH] pr173729: test and fixes committed. Modify the bcel delegate at compile time alongside the eclipse delegate then undo it prior to proper weaving. --- weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index 72626eacd..1ca6a5dac 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -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, ""); -- 2.39.5