Browse Source

Minor code cosmetics

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
pull/220/head
Alexander Kriegisch 1 month ago
parent
commit
e1d641cbef

+ 1
- 1
bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/JavaClass.java View File

} }


/** /**
* @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() { public String getSourceFileName() {
return sourcefileName; return sourcefileName;

+ 1
- 1
bridge/src/main/java/org/aspectj/bridge/MessageUtil.java View File

for (Iterator<ISourceLocation> iter = message.getExtraSourceLocations().iterator(); iter.hasNext();) { for (Iterator<ISourceLocation> iter = message.getExtraSourceLocations().iterator(); iter.hasNext();) {
ISourceLocation element = iter.next(); ISourceLocation element = iter.next();
if (element != null) { if (element != null) {
writer.print("\tsee also: " + element.toString());
writer.print("\tsee also: " + element);
if (iter.hasNext()) { if (iter.hasNext()) {
writer.println(); writer.println();
} }

+ 4
- 6
org.aspectj.matcher/src/main/java/org/aspectj/weaver/AbstractReferenceTypeDelegate.java View File



public final void setSourcefilename(String sourceFileName) { public final void setSourcefilename(String sourceFileName) {
sourcefilename = 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)"; sourcefilename = "Type '" + getResolvedTypeX().getName() + "' (no debug info available)";
} else {
else {
String pname = getResolvedTypeX().getPackageName(); String pname = getResolvedTypeX().getPackageName();
if (pname != null) {
if (pname != null)
sourcefilename = pname.replace('.', '/') + '/' + sourceFileName; sourcefilename = pname.replace('.', '/') + '/' + sourceFileName;
}
} }
if (sourcefilename != null && sourceContext instanceof SourceContextImpl) {
if (sourcefilename != null && sourceContext instanceof SourceContextImpl)
((SourceContextImpl) sourceContext).setSourceFileName(sourcefilename); ((SourceContextImpl) sourceContext).setSourceFileName(sourcefilename);
}
} }


public ISourceLocation getSourceLocation() { public ISourceLocation getSourceLocation() {

+ 1
- 1
weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java View File

} }
// if it's a binary file then also want to give the file name // if it's a binary file then also want to give the file name
if (isl.getSourceFileName() != null) { if (isl.getSourceFileName() != null) {
nice.append("(from " + isl.getSourceFileName() + ")");
nice.append("(from ").append(isl.getSourceFileName()).append(")");
} }
} }
return nice.toString(); return nice.toString();

Loading…
Cancel
Save