diff options
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/MethodDelegateTypeMunger.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/MethodDelegateTypeMunger.java b/weaver/src/org/aspectj/weaver/MethodDelegateTypeMunger.java index 26ae5b21d..e7bc20d3b 100644 --- a/weaver/src/org/aspectj/weaver/MethodDelegateTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/MethodDelegateTypeMunger.java @@ -58,7 +58,7 @@ public class MethodDelegateTypeMunger extends ResolvedTypeMunger { break; } } - if (field == null) { + if (field == null) { throw new RuntimeException("Should not happen: aspect field not found for @DeclareParents delegate"); } else { aspectFieldDelegate = field; diff --git a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java index 1389d78c6..7717915f1 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java @@ -243,7 +243,16 @@ public abstract class ResolvedTypeMunger { } throw new BCException("bad kind: " + key); } - } + + public String toString() { + // we want MethodDelegate to appear as Method in WeaveInfo messages + if (MethodDelegate.getName().equals(getName())) { + return Method.toString(); + } else { + return super.toString(); + } + } + } // ---- fields |