diff --git a/src/main/org/apache/tools/ant/taskdefs/Concat.java b/src/main/org/apache/tools/ant/taskdefs/Concat.java index b5d553c41..b5ff925ee 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Concat.java +++ b/src/main/org/apache/tools/ant/taskdefs/Concat.java @@ -355,8 +355,9 @@ public class Concat extends Task { // Make sure input != output. if (destinationFile != null && destinationFile.getAbsolutePath().equals(input[i])) { - log(destinationFile.getName() + ": input file is " + - "output file.", Project.MSG_WARN); + throw new BuildException("Input file \"" + + destinationFile.getName() + + "\" is the same as the output file."); } is = new FileInputStream(input[i]);