diff options
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java index 7a40ed542..973d61b37 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java @@ -159,10 +159,19 @@ public class BcelObjectType extends AbstractReferenceTypeDelegate { // the only class in Java-1.4 with no superclasses isObject = (javaClass.getSuperclassNameIndex() == 0); ensureAspectJAttributesUnpacked(); - // if (sourceContext instanceof SourceContextImpl) { - // ((SourceContextImpl)sourceContext).setSourceFileName(javaClass. - // getSourceFileName()); - // } + + // Experimental code leading to undesired ripple effects elsewhere, requiring more rework + /* + final String fileName = javaClass.getFileName(); + final String sourceFileName = javaClass.getSourceFileName(); + if (fileName == null || !fileName.endsWith(".class")) + setSourcefilename(sourceFileName); + else if (sourceFileName == null || sourceFileName.isEmpty() || sourceFileName.endsWith(".class")) + setSourcefilename(fileName); + else + setSourcefilename(fileName + " (from " + sourceFileName + ")"); + */ + setSourcefilename(javaClass.getSourceFileName()); } |