From c17483a6ebcfd5a32bdb5b53739d6b74edc02d85 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 18 Feb 2003 14:29:56 +0000 Subject: [PATCH] destdir is required. PR: 16483 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274124 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/taskdefs/optional/jsp/JspC.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java index ea60802c3..ac7c313b8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java @@ -400,7 +400,14 @@ public class JspC extends MatchingTask { */ public void execute() throws BuildException { - if (destDir != null && !destDir.isDirectory()) { + + // make sure that we've got a destdir + if (destDir == null) { + throw new BuildException("destdir attribute must be set!", + getLocation()); + } + + if (!destDir.isDirectory()) { throw new BuildException("destination directory \"" + destDir + "\" does not exist or is not a directory",