diff options
author | aclement <aclement> | 2005-01-04 13:15:57 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-01-04 13:15:57 +0000 |
commit | 98976598593e8a1f89e9628e8fc11c7822b8e3d4 (patch) | |
tree | 30e0ea7e81e896be0ffca52b61ca5a210d9c219b /weaver/src | |
parent | c6e8e5a0d522eb5fc0f402c97d42d456516bfc6a (diff) | |
download | aspectj-98976598593e8a1f89e9628e8fc11c7822b8e3d4.tar.gz aspectj-98976598593e8a1f89e9628e8fc11c7822b8e3d4.zip |
Fix for Bug 82062: WeaveMessage should provide more information
(Bug and fix from Martin Lippert)
Diffstat (limited to 'weaver/src')
-rw-r--r-- | weaver/src/org/aspectj/weaver/Advice.java | 1 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/Shadow.java | 15 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 7 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWorld.java | 2 |
4 files changed, 17 insertions, 8 deletions
diff --git a/weaver/src/org/aspectj/weaver/Advice.java b/weaver/src/org/aspectj/weaver/Advice.java index 1c8c92b98..11b8f69c7 100644 --- a/weaver/src/org/aspectj/weaver/Advice.java +++ b/weaver/src/org/aspectj/weaver/Advice.java @@ -17,7 +17,6 @@ import java.util.Collections; import java.util.List; import org.aspectj.bridge.IMessage; -import org.aspectj.bridge.ISourceLocation; import org.aspectj.weaver.patterns.AndPointcut; import org.aspectj.weaver.patterns.PerClause; import org.aspectj.weaver.patterns.Pointcut; diff --git a/weaver/src/org/aspectj/weaver/Shadow.java b/weaver/src/org/aspectj/weaver/Shadow.java index c7c3309a6..07e32fc23 100644 --- a/weaver/src/org/aspectj/weaver/Shadow.java +++ b/weaver/src/org/aspectj/weaver/Shadow.java @@ -22,8 +22,11 @@ import java.util.List; import java.util.Set; import org.aspectj.asm.IRelationship; -import org.aspectj.bridge.*; +import org.aspectj.bridge.IMessage; +import org.aspectj.bridge.ISourceLocation; +import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; +import org.aspectj.bridge.WeaveMessage; import org.aspectj.lang.JoinPoint; import org.aspectj.util.PartialOrder; import org.aspectj.util.TypeSafeEnum; @@ -416,14 +419,18 @@ public abstract class Shadow { msg = WeaveMessage.constructWeavingMessage( WeaveMessage.WEAVEMESSAGE_SOFTENS, new String[]{advisedType,beautifyLocation(getSourceLocation()), - advisingType,beautifyLocation(munger.getSourceLocation())}); + advisingType,beautifyLocation(munger.getSourceLocation())}, + advisedType, + advisingType); } else { boolean runtimeTest = ((BcelAdvice)advice).hasDynamicTests(); msg = WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES, - new String[]{ advisedType, beautifyLocation(getSourceLocation()), + new String[]{ advisedType, beautifyLocation(getSourceLocation()), description, advisingType,beautifyLocation(munger.getSourceLocation()), - (runtimeTest?" [with runtime test]":"")}); + (runtimeTest?" [with runtime test]":"")}, + advisedType, + advisingType); // Boolean.toString(runtimeTest)}); } getIWorld().getMessageHandler().handleMessage(msg); diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 219c91fc4..4d5e68be3 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -110,7 +110,8 @@ public class BcelTypeMunger extends ConcreteTypeMunger { if (parentTM.getNewParent().isInterface()) { weaver.getWorld().getMessageHandler().handleMessage(WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSIMPLEMENTS, new String[]{weaver.getLazyClassGen().getType().getName(), - tName,parentTM.getNewParent().getName(),fName})); + tName,parentTM.getNewParent().getName(),fName}, + weaver.getLazyClassGen().getClassName(), getAspectType().getName())); } else { System.err.println("BANG, you need to fix this. BcelTypeMunger"); } @@ -119,7 +120,8 @@ public class BcelTypeMunger extends ConcreteTypeMunger { new String[]{weaver.getLazyClassGen().getType().getName(), tName,munger.getKind().toString().toLowerCase(), getAspectType().getName(), - fName+":'"+munger.getSignature()+"'"})); + fName+":'"+munger.getSignature()+"'"}, + weaver.getLazyClassGen().getClassName(), getAspectType().getName())); // ??? If only type mungers knew their originating line numbers ... } } @@ -769,3 +771,4 @@ public class BcelTypeMunger extends ConcreteTypeMunger { } } } +
\ No newline at end of file diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index 43d86f992..d4e425b05 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -209,7 +209,7 @@ public class BcelWorld extends World implements Repository { } } - private BcelObjectType makeBcelObjectType(ResolvedTypeX.Name resolvedTypeX, JavaClass jc, boolean exposedToWeaver) { + protected BcelObjectType makeBcelObjectType(ResolvedTypeX.Name resolvedTypeX, JavaClass jc, boolean exposedToWeaver) { BcelObjectType ret = new BcelObjectType(resolvedTypeX, jc, exposedToWeaver); resolvedTypeX.setDelegate(ret); return ret; |