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();
}
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() {
}
// 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();