diff options
author | acolyer <acolyer> | 2005-09-01 18:40:31 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-01 18:40:31 +0000 |
commit | c6bc7a2b2ee30b7647d3cb17fc323ebf96768fef (patch) | |
tree | 5f3a5f06d35f49ebe6dd8277989abc1acc6b1ae9 | |
parent | d8442e7f2a1af534dddc827134d970e9812c881b (diff) | |
download | aspectj-c6bc7a2b2ee30b7647d3cb17fc323ebf96768fef.tar.gz aspectj-c6bc7a2b2ee30b7647d3cb17fc323ebf96768fef.zip |
fix and test updates for enh 102459 - provide more detail in showWeaveInfo messages.
9 files changed, 51 insertions, 50 deletions
diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.nodebug.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.nodebug.txt index 31f2d7418..f9bda86e0 100644 --- a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.nodebug.txt +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.nodebug.txt @@ -1,13 +1,13 @@ -Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) -Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) -Type 'Simple' (no debug info available) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) [with runtime test] -Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (no debug info available) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) [with runtime test] +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.txt index adeff41f9..03d6c4574 100644 --- a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.txt +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.txt @@ -1,13 +1,13 @@ -Type 'Simple' (Simple.java:5) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (Simple.java:5) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (Simple.java:5) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (Simple.java:5) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) -Type 'Simple' (Simple.java:9) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (Simple.java:9) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (Simple.java:9) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (Simple.java:9) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) -Type 'Simple' (Simple.java:13) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) [with runtime test] -Type 'Simple' (Simple.java:17) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (Simple.java:17) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (Simple.java:17) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (Simple.java:17) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (Simple.java:13) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) [with runtime test] +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.txt index adeff41f9..03d6c4574 100644 --- a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.txt +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.txt @@ -1,13 +1,13 @@ -Type 'Simple' (Simple.java:5) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (Simple.java:5) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (Simple.java:5) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (Simple.java:5) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) -Type 'Simple' (Simple.java:9) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (Simple.java:9) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (Simple.java:9) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (Simple.java:9) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) -Type 'Simple' (Simple.java:13) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) [with runtime test] -Type 'Simple' (Simple.java:17) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) -Type 'Simple' (Simple.java:17) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) -Type 'Simple' (Simple.java:17) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) -Type 'Simple' (Simple.java:17) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (Simple.java:13) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) [with runtime test] +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.nodebug.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.nodebug.txt index 02e006e29..d64a942e3 100644 --- a/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.nodebug.txt +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.nodebug.txt @@ -1,2 +1,2 @@ -Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:6) Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:4) +Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:6) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/itd.nodebug.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.nodebug.txt index 49bf89d69..0664ed4e0 100644 --- a/ajde/testdata/WeaveInfoMessagesTest/expected/itd.nodebug.txt +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.nodebug.txt @@ -1,4 +1,4 @@ -Type 'Simple' (no debug info available) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()') -Type 'Simple' (no debug info available) has intertyped method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()') -Type 'Simple' (no debug info available) has intertyped field from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.fieldstring') Type 'Simple' (no debug info available) has intertyped field from 'AspectITD' (AspectITD.aj:'int Simple.fieldint') +Type 'Simple' (no debug info available) has intertyped field from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.fieldstring') +Type 'Simple' (no debug info available) has intertyped method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()') +Type 'Simple' (no debug info available) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()') diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/itd.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.txt index eaaa311e1..eeb84247e 100644 --- a/ajde/testdata/WeaveInfoMessagesTest/expected/itd.txt +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.txt @@ -1,4 +1,4 @@ -Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()') -Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()') -Type 'Simple' (Simple.java) has intertyped field from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.fieldstring') Type 'Simple' (Simple.java) has intertyped field from 'AspectITD' (AspectITD.aj:'int Simple.fieldint') +Type 'Simple' (Simple.java) has intertyped field from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.fieldstring') +Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()') +Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()') diff --git a/bridge/src/org/aspectj/bridge/WeaveMessage.java b/bridge/src/org/aspectj/bridge/WeaveMessage.java index 3ddb6de00..122820d45 100644 --- a/bridge/src/org/aspectj/bridge/WeaveMessage.java +++ b/bridge/src/org/aspectj/bridge/WeaveMessage.java @@ -22,9 +22,9 @@ public class WeaveMessage extends Message { public static WeaveMessageKind WEAVEMESSAGE_ITD = new WeaveMessageKind(2,"Type '%1' (%2) has intertyped %3 from '%4' (%5)"); - // %6 is information like "[with runtime test]" + // %7 is information like "[with runtime test]" public static WeaveMessageKind WEAVEMESSAGE_ADVISES = - new WeaveMessageKind(3,"Type '%1' (%2) advised by %3 advice from '%4' (%5)%6"); + new WeaveMessageKind(3,"Join point '%1' in Type '%2' (%3) advised by %4 advice from '%5' (%6)%7"); public static WeaveMessageKind WEAVEMESSAGE_DECLAREPARENTSEXTENDS = new WeaveMessageKind(4,"Setting superclass of type '%1' (%2) to '%3' (%4)"); diff --git a/tests/java5/ataspectj/ataspectj/ltwlog/MainVerboseAndShow.java b/tests/java5/ataspectj/ataspectj/ltwlog/MainVerboseAndShow.java index 232f1ab31..0034cc264 100644 --- a/tests/java5/ataspectj/ataspectj/ltwlog/MainVerboseAndShow.java +++ b/tests/java5/ataspectj/ataspectj/ltwlog/MainVerboseAndShow.java @@ -25,7 +25,7 @@ public class MainVerboseAndShow { new MainVerboseAndShow().target(); if (!MessageHolder.startsAs(Arrays.asList(new String[]{ "info weaving 'ataspectj/ltwlog/MainVerboseAndShow'", - "weaveinfo Type 'ataspectj.ltwlog.MainVerboseAndShow' (MainVerboseAndShow.java:22) advised by before advice from 'ataspectj.ltwlog.Aspect1' (Aspect1.java)", + "weaveinfo Join point 'method-execution(void ataspectj.ltwlog.MainVerboseAndShow.target())' in Type 'ataspectj.ltwlog.MainVerboseAndShow' (MainVerboseAndShow.java:22) advised by before advice from 'ataspectj.ltwlog.Aspect1' (Aspect1.java)", "info weaving 'ataspectj/ltwlog/Aspect1'"}))) { MessageHolder.dump(); throw new RuntimeException("failed"); diff --git a/weaver/src/org/aspectj/weaver/Shadow.java b/weaver/src/org/aspectj/weaver/Shadow.java index 86785f2d4..c31dfbf46 100644 --- a/weaver/src/org/aspectj/weaver/Shadow.java +++ b/weaver/src/org/aspectj/weaver/Shadow.java @@ -462,8 +462,9 @@ public abstract class Shadow { advisingType); } else { boolean runtimeTest = ((BcelAdvice)advice).hasDynamicTests(); + String joinPointDescription = this.toString(); msg = WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES, - new String[]{ advisedType, beautifyLocation(getSourceLocation()), + new String[]{ joinPointDescription, advisedType, beautifyLocation(getSourceLocation()), description, advisingType,beautifyLocation(munger.getSourceLocation()), (runtimeTest?" [with runtime test]":"")}, |