From 6d7fe804885d85fcce325a011289291a654ba052 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Fri, 20 Feb 2004 18:07:44 +0000 Subject: [PATCH] Fix occasionally thrown IOException when the stream has already been closed with alwaysCreate. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276130 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/util/LazyFileOutputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/util/LazyFileOutputStream.java b/src/main/org/apache/tools/ant/util/LazyFileOutputStream.java index e3887b2ee..f65750d8a 100644 --- a/src/main/org/apache/tools/ant/util/LazyFileOutputStream.java +++ b/src/main/org/apache/tools/ant/util/LazyFileOutputStream.java @@ -93,7 +93,7 @@ public class LazyFileOutputStream extends OutputStream { } public synchronized void close() throws IOException { - if (alwaysCreate) { + if (alwaysCreate && !closed) { ensureOpened(); } if (opened) {