提交 9e32311e 编写于 作者: D Dave Brosius

use %n for new lines in format strings

上级 3c952fc7
......@@ -1033,7 +1033,7 @@ public class Util {
listener.getLogger().println(String.format("ln -s %s %s failed: %d %s",targetPath, symlinkFile, r, errmsg));
} catch (IOException e) {
PrintStream log = listener.getLogger();
log.printf("ln %s %s failed\n",targetPath, new File(baseDir, symlinkPath));
log.printf("ln %s %s failed%n",targetPath, new File(baseDir, symlinkPath));
Util.displayIOException(e,listener);
e.printStackTrace( log );
}
......
......@@ -60,7 +60,7 @@ public class ListChangesCommand extends AbstractBuildRangeCommand {
for (AbstractBuild build : builds) {
ChangeLogSet<?> cs = build.getChangeSet();
for (Entry e : cs) {
stdout.printf("%s,%s\n",
stdout.printf("%s,%s%n",
QuotedStringTokenizer.quote(e.getAuthor().getId()),
QuotedStringTokenizer.quote(e.getMsg()));
}
......@@ -70,7 +70,7 @@ public class ListChangesCommand extends AbstractBuildRangeCommand {
for (AbstractBuild build : builds) {
ChangeLogSet<?> cs = build.getChangeSet();
for (Entry e : cs) {
stdout.printf("%s\t%s\n",e.getAuthor(),e.getMsg());
stdout.printf("%s\t%s%n",e.getAuthor(),e.getMsg());
for (String p : e.getAffectedPaths())
stdout.println(" "+p);
}
......
......@@ -220,7 +220,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
}
if (p.getTouchStoneResultCondition() != null && r.isWorseThan(p.getTouchStoneResultCondition())) {
logger.printf("Touchstone configurations resulted in %s, so aborting...\n", r);
logger.printf("Touchstone configurations resulted in %s, so aborting...%n", r);
return r;
}
......
......@@ -170,8 +170,8 @@ public final class TestResult extends MetaTabulatedResult {
File f = new File(baseDir,includedFiles[0]);
throw new AbortException(
String.format(
"Test reports were found but none of them are new. Did tests run? \n"+
"For example, %s is %s old\n", f,
"Test reports were found but none of them are new. Did tests run? %n"+
"For example, %s is %s old%n", f,
Util.getTimeSpanString(buildTime-f.lastModified())));
}
}
......
......@@ -103,8 +103,8 @@ public abstract class DefaultTestResultParserImpl extends TestResultParser imple
// none of the files were new
throw new AbortException(
String.format(
"Test reports were found but none of them are new. Did tests run? \n"+
"For example, %s is %s old\n", paths[0].getRemote(),
"Test reports were found but none of them are new. Did tests run? %n"+
"For example, %s is %s old%n", paths[0].getRemote(),
Util.getTimeSpanString(localBuildTime-paths[0].lastModified())));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册