incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickcha...@apache.org
Subject svn commit: rev 10069 - incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sandbox/chalko
Date Fri, 16 Apr 2004 23:47:58 GMT
Author: nickchalko
Date: Fri Apr 16 16:47:57 2004
New Revision: 10069

Modified:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sandbox/chalko/UpdateFileSet.java
Log:
Fixed error were initilize was swallowing exceptions.

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sandbox/chalko/UpdateFileSet.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sandbox/chalko/UpdateFileSet.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sandbox/chalko/UpdateFileSet.java
Fri Apr 16 16:47:57 2004
@@ -1,20 +1,22 @@
-/* ========================================================================
+/*
+ * ========================================================================
  * Copyright 2004 The Apache Software Foundation
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
  * ========================================================================
  */
 package org.apache.depot.update.ant.sandbox.chalko;
+import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.FileScanner;
 import org.apache.tools.ant.Project;
@@ -26,11 +28,9 @@
 	private final UpdateSet updateSet;
 	private boolean initialized = false;
 	private FileScanner scanner;
-
 	UpdateFileSet(UpdateSet updateSet) {
 		this.updateSet = updateSet;
 	}
-
 	private synchronized void initialize() {
 		if (!initialized) {
 			try {
@@ -38,15 +38,14 @@
 				scanner.getIncludedFiles();
 				setDir(scanner.getBasedir());
 				setupDirectoryScanner(scanner, updateSet.getProject());
-
+			} catch (BuildException e) {
+				throw e;
 			} catch (Exception e) {
-				e.printStackTrace();
+				throw new BuildException("error initializing " + getDataTypeName(), e);
 			}
-
 		}
 		initialized = true;
 	}
-
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -56,7 +55,6 @@
 		initIfNeeded();
 		return super.getDirectoryScanner(p);
 	}
-
 	/**
 	 *  
 	 */
@@ -65,4 +63,4 @@
 			initialize();
 		}
 	}
-}
+}
\ No newline at end of file

Mime
View raw message