diff --git a/WHATSNEW b/WHATSNEW index 9309a9a54..5d3caad94 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -71,6 +71,10 @@ Fixed bugs: * if the basedir contained .. or . dirs, and the build file name contained .. or ., the basedir was set incorrectly. Bugzilla Report 26765. + +* regression from ant 1.5, exec task outputted two redundant trailing newlines. + Bugzilla Report 27546. + Other changes: -------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java b/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java index 082beb90f..8b78e5f2e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java +++ b/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java @@ -85,7 +85,9 @@ public class LogOutputStream extends OutputStream { * Flush this log stream */ public void flush() { - processBuffer(); + if (buffer.size() > 0) { + processBuffer(); + } }