kward       2002/06/09 19:06:15

  Modified:    java/scratchpad/src/org/apache/xindice/server/rpc/messages
                        GetCollectionConfiguration.java
  Log:
  added parameter checking
  
  Revision  Changes    Path
  1.2       +6 -1      
xml-xindice/java/scratchpad/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java
  
  Index: GetCollectionConfiguration.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/scratchpad/src/org/apache/xindice/server/rpc/messages/GetCollectionConfiguration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GetCollectionConfiguration.java   2 Apr 2002 22:57:05 -0000       1.1
  +++ GetCollectionConfiguration.java   10 Jun 2002 02:06:15 -0000      1.2
  @@ -56,7 +56,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - * $Id: GetCollectionConfiguration.java,v 1.1 2002/04/02 22:57:05 kstaken 
Exp $
  + * $Id: GetCollectionConfiguration.java,v 1.2 2002/06/10 02:06:15 kward Exp $
    */
   
   import java.util.Hashtable;
  @@ -74,6 +74,11 @@
   public class GetCollectionConfiguration extends RPCDefaultMessage {   
      
      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) );
   
         // TODO: figure out what goes here.
  
  
  

Reply via email to