bodewig 2003/02/18 06:30:26
Modified: src/main/org/apache/tools/ant/taskdefs/optional/jsp Tag:
ANT_15_BRANCH JspC.java
Log:
Merge fix for 16483 from HEAD
Revision Changes Path
No revision
No revision
1.16.2.6 +9 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
Index: JspC.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java,v
retrieving revision 1.16.2.5
retrieving revision 1.16.2.6
diff -u -r1.16.2.5 -r1.16.2.6
--- JspC.java 10 Feb 2003 14:25:12 -0000 1.16.2.5
+++ JspC.java 18 Feb 2003 14:30:26 -0000 1.16.2.6
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -403,7 +403,14 @@
*/
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",