Skip to content

Commit b48e5d7

Browse files
committed
Minor code cosmetics
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
1 parent afc8261 commit b48e5d7

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/JavaClass.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public int getMinor() {
402402
}
403403

404404
/**
405-
* @return sbsolute path to file where this class was read from
405+
* @return absolute path to file where this class was read from
406406
*/
407407
public String getSourceFileName() {
408408
return sourcefileName;

bridge/src/main/java/org/aspectj/bridge/MessageUtil.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ public static String addExtraSourceLocations(IMessage message, String baseMessag
827827
for (Iterator<ISourceLocation> iter = message.getExtraSourceLocations().iterator(); iter.hasNext();) {
828828
ISourceLocation element = iter.next();
829829
if (element != null) {
830-
writer.print("\tsee also: " + element.toString());
830+
writer.print("\tsee also: " + element);
831831
if (iter.hasNext()) {
832832
writer.println();
833833
}

org.aspectj.matcher/src/main/java/org/aspectj/weaver/AbstractReferenceTypeDelegate.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,15 @@ public final String getSourcefilename() {
7575

7676
public final void setSourcefilename(String sourceFileName) {
7777
sourcefilename = sourceFileName;
78-
if (sourceFileName != null && sourceFileName.equals(AbstractReferenceTypeDelegate.UNKNOWN_SOURCE_FILE)) {
78+
if (AbstractReferenceTypeDelegate.UNKNOWN_SOURCE_FILE.equals(sourceFileName))
7979
sourcefilename = "Type '" + getResolvedTypeX().getName() + "' (no debug info available)";
80-
} else {
80+
else {
8181
String pname = getResolvedTypeX().getPackageName();
82-
if (pname != null) {
82+
if (pname != null)
8383
sourcefilename = pname.replace('.', '/') + '/' + sourceFileName;
84-
}
8584
}
86-
if (sourcefilename != null && sourceContext instanceof SourceContextImpl) {
85+
if (sourcefilename != null && sourceContext instanceof SourceContextImpl)
8786
((SourceContextImpl) sourceContext).setSourceFileName(sourcefilename);
88-
}
8987
}
9088

9189
public ISourceLocation getSourceLocation() {

weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ private String beautifyLocation(ISourceLocation isl) {
273273
}
274274
// if it's a binary file then also want to give the file name
275275
if (isl.getSourceFileName() != null) {
276-
nice.append("(from " + isl.getSourceFileName() + ")");
276+
nice.append("(from ").append(isl.getSourceFileName()).append(")");
277277
}
278278
}
279279
return nice.toString();

0 commit comments

Comments
 (0)