From cd466ddf6c6ab04afb63921f8ae25817e9a914a3 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Thu, 11 Mar 2004 11:22:10 +0000 Subject: [PATCH] exec task outputted two redundant trailing newlines PR: 27546 Reported by: marcel at schutte dot com Obtained from: Martijn Kruithof git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276221 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 4 ++++ src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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(); + } }