Hi there.
I would like to understand the expected result of a concat step that
'finds' no source files.
I believe that prior to version 1.7.1 the resultant file could include
header and footer even if the no other files went in.
With 1.7.1, class :-
src/main/org/apache/tools/ant/taskdefs/Concat.java
checks for zero source and returns.
I would like to have a file produced if I specify a header or footer,
but I can see this might cause other people problems if they are
expecting no file at all to be produced in this situation, although this
was the result with 1.7.0.
Should I be checking that a file is produced out of concat, instead of
assuming there will be one (my next step is a copy which fails if the
cancat target is not created)?
The following patch would make it work for me, but is this a reasonable
change to suggest?
Index: src/main/org/apache/tools/ant/taskdefs/Concat.java
===================================================================
--- src/main/org/apache/tools/ant/taskdefs/Concat.java (revision 704405)
+++ src/main/org/apache/tools/ant/taskdefs/Concat.java (working copy)
@@ -733,7 +733,7 @@
log(destinationFile + " is up-to-date.", Project.MSG_VERBOSE);
return;
}
- if (c.size() == 0) {
+ if (c.size() == 0 && header == null && footer == null) {
return;
}
OutputStream out;
--
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]