From dd4954b1b6357b3fb5473c21d703a426fec8ab87 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Tue, 18 Feb 2003 13:19:45 +0000 Subject: [PATCH] Turn warning about input = output into an exception. Filling up your disk is not a good behaviour. PR: 17154 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274117 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Concat.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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]);