]> source.dussan.org Git - aspectj.git/commitdiff
Minor code cosmetics
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Sat, 13 Apr 2024 09:02:03 +0000 (11:02 +0200)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Sat, 13 Apr 2024 11:03:06 +0000 (13:03 +0200)
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/JavaClass.java
bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
org.aspectj.matcher/src/main/java/org/aspectj/weaver/AbstractReferenceTypeDelegate.java
weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java

index 7eff83fbaa687ba56c9637a122bdafb30ce7c90a..b98c540982cc672d4b8d7f59febb940784070e70 100644 (file)
@@ -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;
index 4f5e6067b83cc10f6a9a9e9650aaae0170f9552c..5d04ace404cd8c457aa2d4833c88e0f4104479f4 100644 (file)
@@ -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();
                                }
index 9165fa5144b9fa7cb5c3eff4edd74db6dfb0fbb5..9dadc200786c2273a86712f47fc35a3dd9e60e82 100644 (file)
@@ -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() {
index 408b49870e1b67f6dbde3215d8980af1a16dc8cc..fc1e2c25f2328855345645f959cbb8ec1689fcd8 100644 (file)
@@ -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();