vgritsenko    2003/12/24 06:17:41

  Modified:    java/src/org/apache/xindice/server XindiceServlet.java
  Log:
  getAttribute will return default value if attribute value is empty or null
  
  Revision  Changes    Path
  1.27      +3 -10     
xml-xindice/java/src/org/apache/xindice/server/XindiceServlet.java
  
  Index: XindiceServlet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/src/org/apache/xindice/server/XindiceServlet.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XindiceServlet.java       22 Dec 2003 14:03:38 -0000      1.26
  +++ XindiceServlet.java       24 Dec 2003 14:17:41 -0000      1.27
  @@ -217,15 +217,8 @@
               if (xmlRpcConfiguration != null) {
                   Configuration xmlRpcDriverConfiguration = 
xmlRpcConfiguration.getChild("driver");
                   if (xmlRpcDriverConfiguration != null) {
  +                    // xmlrpcDriver will have non-empty value, guaranteed by 
providing default value
                       xmlrpcDriver = 
xmlRpcDriverConfiguration.getAttribute("name", DEFAULT_XMLRPC_DRIVER);
  -                    if (xmlrpcDriver == null || xmlrpcDriver.equals("")) { 
// this will probably never happen due to the default.
  -
  -                        throw new ConfigurationException(
  -                                "The xml-rpc configuration (in '"
  -                                + 
servletConfig.getInitParameter(Xindice.PROP_XINDICE_CONFIGURATION)
  -                                + "' contains a malformed 'driver' element."
  -                                + "  The 'driver' element must have a 'name' 
attribute specifying the driver (XML-RPC terminology for SAX parser)  to use.");
  -                    }
                   }
               }
   
  
  
  

Reply via email to