diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-04-13 11:02:03 +0200 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-04-13 13:03:06 +0200 |
commit | b48e5d71a9f8141ca4fb275a7e4bb99b389c5d37 (patch) | |
tree | ac96e7e5cf3ba5ed663da9b339d3994dd2073a26 | |
parent | afc826197736d3246e87b5b8fe4286ce3553e692 (diff) | |
download | aspectj-b48e5d71a9f8141ca4fb275a7e4bb99b389c5d37.tar.gz aspectj-b48e5d71a9f8141ca4fb275a7e4bb99b389c5d37.zip |
Minor code cosmetics
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
4 files changed, 7 insertions, 9 deletions
diff --git a/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/JavaClass.java b/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/JavaClass.java index 7eff83fba..b98c54098 100644 --- a/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/JavaClass.java +++ b/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/JavaClass.java @@ -402,7 +402,7 @@ public class JavaClass extends Modifiers implements Cloneable, Node { } /** - * @return sbsolute path to file where this class was read from + * @return absolute path to file where this class was read from */ public String getSourceFileName() { return sourcefileName; diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java index 4f5e6067b..5d04ace40 100644 --- a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java +++ b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java @@ -827,7 +827,7 @@ public class MessageUtil { for (Iterator<ISourceLocation> iter = message.getExtraSourceLocations().iterator(); iter.hasNext();) { ISourceLocation element = iter.next(); if (element != null) { - writer.print("\tsee also: " + element.toString()); + writer.print("\tsee also: " + element); if (iter.hasNext()) { writer.println(); } diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/AbstractReferenceTypeDelegate.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/AbstractReferenceTypeDelegate.java index 9165fa514..9dadc2007 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/AbstractReferenceTypeDelegate.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/AbstractReferenceTypeDelegate.java @@ -75,17 +75,15 @@ public abstract class AbstractReferenceTypeDelegate implements ReferenceTypeDele public final void setSourcefilename(String sourceFileName) { sourcefilename = sourceFileName; - if (sourceFileName != null && sourceFileName.equals(AbstractReferenceTypeDelegate.UNKNOWN_SOURCE_FILE)) { + if (AbstractReferenceTypeDelegate.UNKNOWN_SOURCE_FILE.equals(sourceFileName)) sourcefilename = "Type '" + getResolvedTypeX().getName() + "' (no debug info available)"; - } else { + else { String pname = getResolvedTypeX().getPackageName(); - if (pname != null) { + if (pname != null) sourcefilename = pname.replace('.', '/') + '/' + sourceFileName; - } } - if (sourcefilename != null && sourceContext instanceof SourceContextImpl) { + if (sourcefilename != null && sourceContext instanceof SourceContextImpl) ((SourceContextImpl) sourceContext).setSourceFileName(sourcefilename); - } } public ISourceLocation getSourceLocation() { diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java index 408b49870..fc1e2c25f 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java @@ -273,7 +273,7 @@ public class BcelWorld extends World implements Repository { } // if it's a binary file then also want to give the file name if (isl.getSourceFileName() != null) { - nice.append("(from " + isl.getSourceFileName() + ")"); + nice.append("(from ").append(isl.getSourceFileName()).append(")"); } } return nice.toString(); |