ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/util DelayedFileOutputStream.java
Date Tue, 26 Aug 2003 13:44:06 GMT
On 26 Aug 2003, <bodewig@apache.org> wrote:

>   DelayedFileOutputStream.java

is probably a bad name.  It is a class that wraps around a
FileOutputStream but doesn't open the file before you actually write
to it.

This one will now be used in Redirector instead of a plain
FileOutputStream, the effects I see

(1) If your <mapper> pointed to the outfile, <apply> would have always
skipped the execution as the output file had just been opened
microseconds ago when the timestamp comparison kicked in.  So it
enables a feature in <apply>

(2) You won't end up with any output file at all when Ant fails to
execute the command in <exec>, <apply> or <java> with fork=true.

(3) If the executable doesn't produce any output, no output-file will
be created.

(2) and (3) are not backwards compatible but would be easy to fix
(DelayedFileOutputStream has an explicit open() that could be used
after the command has been executed).  I'm just not sure whether we
really want to fix (2) at all - and maybe we want to control the
behavior of (3) with a flag.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message