Pārlūkot izejas kodu

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).

tags/PRE_ANDY
aclement pirms 19 gadiem
vecāks
revīzija
be14796f56
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5
    1
      weaver/src/org/aspectj/weaver/bcel/BcelShadow.java

+ 5
- 1
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java Parādīt failu

@@ -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);
}
}


Notiek ielāde…
Atcelt
Saglabāt