kward 2002/06/09 19:08:13
Modified: java/scratchpad/src/org/apache/xindice/server/rpc/messages
RemoveCollection.java
Log:
added parameter checking
Revision Changes Path
1.2 +7 -2
xml-xindice/java/scratchpad/src/org/apache/xindice/server/rpc/messages/RemoveCollection.java
Index: RemoveCollection.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/scratchpad/src/org/apache/xindice/server/rpc/messages/RemoveCollection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RemoveCollection.java 2 Apr 2002 22:57:05 -0000 1.1
+++ RemoveCollection.java 10 Jun 2002 02:08:13 -0000 1.2
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: RemoveCollection.java,v 1.1 2002/04/02 22:57:05 kstaken Exp $
+ * $Id: RemoveCollection.java,v 1.2 2002/06/10 02:08:13 kward Exp $
*/
import java.util.Hashtable;
@@ -73,8 +73,13 @@
*/
public class RemoveCollection extends RPCDefaultMessage {
// TODO: should have a simple way to validate params.
-
+
public Hashtable execute(Hashtable message) throws Exception {
+
+ if(!message.containsKey(COLLECTION)) {
+ throw new Exception("Collection parameter not specified");
+ }
+
Collection col = getCollection( (String) message.get(COLLECTION) );
col.dropCollection( col );