diff options
author | aclement <aclement> | 2005-04-13 11:47:07 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-04-13 11:47:07 +0000 |
commit | be14796f5643358760951c0650b6c879e29e73e7 (patch) | |
tree | 9765d890d35d6d5d76a2ef92a2fd685bae34d1be /weaver | |
parent | b81d25a13abfb9a0a5a5eddff79b1a36d982a036 (diff) | |
download | aspectj-be14796f5643358760951c0650b6c879e29e73e7.tar.gz aspectj-be14796f5643358760951c0650b6c879e29e73e7.zip |
Fix for: Bugzilla Bug 91090: declare warning with staticinitialization matching an aspect doesn't appear correctly. Ensured staticinitialization shadow source locations are always the type declaration line (including offset where we can).
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelShadow.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index b015f6d3f..675286b16 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -2722,7 +2722,11 @@ public class BcelShadow extends Shadow { // System.err.println(this + ": " + range); return getEnclosingClass().getType().getSourceLocation(); } else { - return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine); + // For staticinitialization, if we have a nice offset, don't build a new source loc + if (getKind()==Shadow.StaticInitialization && getEnclosingClass().getType().getSourceLocation().getOffset()!=0) + return getEnclosingClass().getType().getSourceLocation(); + else + return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine); } } |