Index: main/org/apache/tools/ant/taskdefs/Get.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java,v
retrieving revision 1.5
diff -u -r1.5 Get.java
--- main/org/apache/tools/ant/taskdefs/Get.java	2000/07/24 13:23:29	1.5
+++ main/org/apache/tools/ant/taskdefs/Get.java	2000/09/16 17:48:47
@@ -80,11 +80,29 @@
      * @exception BuildException Thrown in unrecoverable error.
      */
     public void execute() throws BuildException {
-	try {
+        if (source == null) {
+            throw new BuildException("src attribute is required", location);
+        }
 
+        if (dest == null) {
+            throw new BuildException("dest attribute is required", location);
+        }
+
+        if (dest.exists() && dest.isDirectory()) { 
+            throw new BuildException("The specified destination is a directory",
+                                     location);
+        }
+
+        if (dest.exists() && !dest.canWrite()) { 
+            throw new BuildException("Can't write to " + dest.getAbsolutePath(),
+                                     location);
+        }
+
+        try {
+
 	    log("Getting: " + source);
 
-	    	//set the timestamp to the file date.
+	    //set the timestamp to the file date.
 	    long timestamp=0;
 
             boolean hasTimestamp=false;
