Skip to content

Commit

Permalink
Minor code cosmetics
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Kriegisch <[email protected]>
  • Loading branch information
kriegaex committed Apr 13, 2024
1 parent afc8261 commit b48e5d7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public int getMinor() {
}

/**
* @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;
Expand Down
2 changes: 1 addition & 1 deletion bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ public static String addExtraSourceLocations(IMessage message, String baseMessag
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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,15 @@ public final String getSourcefilename() {

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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private String beautifyLocation(ISourceLocation isl) {
}
// 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();
Expand Down

0 comments on commit b48e5d7

Please sign in to comment.