aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-09 16:18:13 +0000
committeraclement <aclement>2005-11-09 16:18:13 +0000
commit0f7cb310b399fe3ab9b9ed4fb228752beba00975 (patch)
treeba5a69b1a6019811ae4e265d38de9205dd60a38b /weaver
parent9af74082a57c07fc22f9cba3bb4601b5b78674aa (diff)
downloadaspectj-0f7cb310b399fe3ab9b9ed4fb228752beba00975.tar.gz
aspectj-0f7cb310b399fe3ab9b9ed4fb228752beba00975.zip
fixes for pr91859
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java1
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java37
2 files changed, 16 insertions, 22 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
index 0bc377fd4..6f92b5c03 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
@@ -103,6 +103,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
changed = mungeNewParent(weaver, (NewParentTypeMunger)munger);
} else if (munger.getKind() == ResolvedTypeMunger.AnnotationOnType) {
changed = mungeNewAnnotationOnType(weaver,(AnnotationOnTypeMunger)munger);
+ worthReporting=false;
} else {
throw new RuntimeException("unimplemented");
}
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index fc35718cb..c2049533b 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -1362,29 +1362,8 @@ public class BcelWeaver implements IWeaver {
boolean didSomething = false;
if (decA.matches(onType)) {
- // FIXME asc important this should be guarded by the 'already has annotation' check below but isn't since the compiler is producing classfiles with deca affected things in...
- AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decA.getSourceLocation(),onType.getSourceLocation());
-
- // FIXME asc same comment above applies here
- // TAG: WeavingMessage
- if (!getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)){
- getWorld().getMessageHandler().handleMessage(
- WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ANNOTATES,
- new String[]{
- onType.toString(),
- Utility.beautifyLocation(onType.getSourceLocation()),
- decA.getAnnotationString(),
- "type",
- decA.getAspect().toString(),
- Utility.beautifyLocation(decA.getSourceLocation())
- }));
- }
-
-
if (onType.hasAnnotation(decA.getAnnotationX().getSignature())) {
-// FIXME asc Could put out a lint here for an already annotated type - the problem is that it may have
-// picked up the annotation during 'source weaving' in which case the message is misleading. Leaving it
-// off for now...
+ // Could put out a lint here for an already annotated type ...
// if (reportProblems) {
// world.getLint().elementAlreadyAnnotated.signal(
// new String[]{onType.toString(),decA.getAnnotationTypeX().toString()},
@@ -1399,6 +1378,20 @@ public class BcelWeaver implements IWeaver {
boolean problemReported = verifyTargetIsOK(decA, onType, annoX,reportProblems);
if (!problemReported) {
+ AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decA.getSourceLocation(),onType.getSourceLocation());
+ // TAG: WeavingMessage
+ if (!getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)){
+ getWorld().getMessageHandler().handleMessage(
+ WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ANNOTATES,
+ new String[]{
+ onType.toString(),
+ Utility.beautifyLocation(onType.getSourceLocation()),
+ decA.getAnnotationString(),
+ "type",
+ decA.getAspect().toString(),
+ Utility.beautifyLocation(decA.getSourceLocation())
+ }));
+ }
didSomething = true;
ResolvedTypeMunger newAnnotationTM = new AnnotationOnTypeMunger(annoX);
newAnnotationTM.setSourceLocation(decA.getSourceLocation());