Преглед на файлове

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 преди 19 години
родител
ревизия
be14796f56
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5
    1
      weaver/src/org/aspectj/weaver/bcel/BcelShadow.java

+ 5
- 1
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);
}
}


Loading…
Отказ
Запис