commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sand...@apache.org
Subject cvs commit: jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules DigesterLoaderTest.java DigesterLoaderTestSuite.java DigesterPatternStackTest.java TestDigesterRulesSource.java TestObject.java
Date Wed, 09 Jan 2002 20:22:51 GMT
sanders     02/01/09 12:22:51

  Modified:    digester/src/java/org/apache/commons/digester
                        AbstractObjectCreationFactory.java
                        BeanPropertySetterRule.java CallMethodRule.java
                        CallParamRule.java Digester.java
                        ExtendedBaseRules.java FactoryCreateRule.java
                        ObjectCreateRule.java ObjectCreationFactory.java
                        Rule.java RuleSet.java RuleSetBase.java Rules.java
                        RulesBase.java SetNextRule.java
                        SetPropertiesRule.java SetPropertyRule.java
                        SetTopRule.java
               digester/src/java/org/apache/commons/digester/rss
                        Channel.java Image.java Item.java RSSDigester.java
                        TextInput.java
               digester/src/java/org/apache/commons/digester/xmlrules
                        CircularIncludeException.java DigesterLoader.java
                        DigesterLoadingException.java
                        DigesterRuleParser.java DigesterRulesSource.java
                        FromXmlRuleSet.java XmlLoadException.java
               digester/src/test/org/apache/commons/digester Address.java
                        BeanPropertySetterRuleTestCase.java
                        DigesterTestCase.java EBRTestCase.java
                        Employee.java RuleTestCase.java
                        RulesBaseTestCase.java SimpleTestBean.java
                        TestBean.java TestRule.java TestRuleSet.java
               digester/src/test/org/apache/commons/digester/xmlrules
                        DigesterLoaderTest.java
                        DigesterLoaderTestSuite.java
                        DigesterPatternStackTest.java
                        TestDigesterRulesSource.java TestObject.java
  Log:
  Cosmetic changes only (copyright and formatting to standards)
  
  Revision  Changes    Path
  1.3       +4 -4      jakarta-commons/digester/src/java/org/apache/commons/digester/AbstractObjectCreationFactory.java
  
  Index: AbstractObjectCreationFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/AbstractObjectCreationFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractObjectCreationFactory.java	22 Sep 2001 18:36:35 -0000	1.2
  +++ AbstractObjectCreationFactory.java	9 Jan 2002 20:22:49 -0000	1.3
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -59,6 +59,7 @@
   
   
   import java.lang.ClassLoader;
  +
   import org.xml.sax.Attributes;
   
   /**
  @@ -66,10 +67,9 @@
    * implementations.</p>
    *
    * @author Robert Burrell Donkin
  - * @version $Revision: 1.2 $ $Date: 2001/09/22 18:36:35 $
  + * @version $Revision: 1.3 $ $Date: 2002/01/09 20:22:49 $
    */
  -abstract public class  AbstractObjectCreationFactory implements ObjectCreationFactory
  -{
  +abstract public class AbstractObjectCreationFactory implements ObjectCreationFactory {
   
   
       // ----------------------------------------------------- Instance Variables
  
  
  
  1.4       +46 -42    jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java
  
  Index: BeanPropertySetterRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BeanPropertySetterRule.java	4 Jan 2002 05:32:11 -0000	1.3
  +++ BeanPropertySetterRule.java	9 Jan 2002 20:22:49 -0000	1.4
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java,v 1.3 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/BeanPropertySetterRule.java,v 1.4 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -63,12 +63,13 @@
   package org.apache.commons.digester;
   
   import java.util.HashMap;
  +
   import org.xml.sax.Attributes;
   import org.apache.commons.beanutils.BeanUtils;
   
   
   /**
  - * <p> Rule implements sets a bean property on the top object 
  + * <p> Rule implements sets a bean property on the top object
    * to the body text.</p>
    *
    * <p> The property set:</p>
  @@ -80,7 +81,7 @@
    * on the parent object.</p>
    *
    * @author Robert Burrell Donkin
  - * @version $Revision: 1.3 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.4 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class BeanPropertySetterRule extends Rule {
  @@ -89,22 +90,22 @@
       // ----------------------------------------------------------- Constructors
   
   
  -    /** 
  +    /**
        * <p>Construct rule that sets the given property from the body text.</p>
  -     * 
  +     *
        * @param digester associated <code>Digester</code>
  -     * @param propertyName name of property to set 
  +     * @param propertyName name of property to set
        */
       public BeanPropertySetterRule(Digester digester, String propertyName) {
  -            
  -            super(digester);
  -            this.propertyName=propertyName;
  +
  +        super(digester);
  +        this.propertyName = propertyName;
   
       }
   
  -    /** 
  +    /**
        * <p>Construct rule that automatically sets a property from the body text.
  -     * 
  +     *
        * <p> This construct creates a rule that sets the property
        * on the top object named the same as the current element.
        *
  @@ -112,10 +113,10 @@
        */
       public BeanPropertySetterRule(Digester digester) {
   
  -            this(digester, null);
  +        this(digester, null);
   
       }
  - 
  +
   
       // ----------------------------------------------------- Instance Variables
   
  @@ -142,12 +143,13 @@
        */
       public void body(String bodyText) throws Exception {
   
  -            // log some debugging information
  -            if (digester.log.isDebugEnabled())
  -                digester.log.debug("[BeanPropertySetterRule] Called with text " +
  -                             bodyText);
  +        // log some debugging information
  +        if (digester.log.isDebugEnabled()) {
  +            digester.log.debug("[BeanPropertySetterRule] Called with text " +
  +                    bodyText);
  +        }
   
  -	    this.bodyText = bodyText.trim();
  +        this.bodyText = bodyText.trim();
   
       }
   
  @@ -156,42 +158,44 @@
        * Process the end of this element.
        */
       public void end() throws Exception {
  -        
  -        String property=propertyName;    
   
  -        if (property==null) {
  +        String property = propertyName;
  +
  +        if (property == null) {
               // If we don't have a specific property name,
               // use the element name.
               String match = digester.match;
               int slash = match.lastIndexOf('/');
  -            if (slash >= 0)
  -                match = match.substring(slash+1);
  -                
  -            property=match;
  -            
  -	}
  +            if (slash >= 0) {
  +                match = match.substring(slash + 1);
  +            }
  +
  +            property = match;
  +
  +        }
   
           // log some debugging information
           digester.log.info("[BeanPropertySetterRule] setting property " +
  -                         property + " with text " + bodyText);
  +                property + " with text " + bodyText);
   
           // going to use beanutils so need to specify property using map
  -        HashMap map=new HashMap();
  -        map.put(property,bodyText);
  -        
  +        HashMap map = new HashMap();
  +        map.put(property, bodyText);
  +
           // examine top object
  -        Object top=digester.peek();
  -        if (top==null) {
  +        Object top = digester.peek();
  +        if (top == null) {
               // don't try to set property if null
               // just log and return
  -            if (digester.log.isDebugEnabled())
  +            if (digester.log.isDebugEnabled()) {
                   digester.log.debug("[BeanPropertySetterRule] Top object is null.");
  +            }
               return;
           }
  -        
  +
           // populate property on top object
  -        BeanUtils.populate(top,map);
  -        
  +        BeanUtils.populate(top, map);
  +
       }
   
   
  @@ -200,7 +204,7 @@
        */
       public void finish() throws Exception {
   
  -	bodyText = null;
  +        bodyText = null;
   
       }
   
  @@ -209,7 +213,7 @@
        * Render a printable version of this Rule.
        */
       public String toString() {
  -        
  +
           StringBuffer sb = new StringBuffer("BeanPropertySetterRule[");
           sb.append("propertyName=");
           sb.append(propertyName);
  
  
  
  1.13      +78 -67    jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java
  
  Index: CallMethodRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CallMethodRule.java	4 Jan 2002 05:32:11 -0000	1.12
  +++ CallMethodRule.java	9 Jan 2002 20:22:49 -0000	1.13
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v 1.12 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.12 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v 1.13 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.13 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,6 +65,7 @@
   
   import java.lang.reflect.Method;
   import java.lang.ClassLoader;
  +
   import org.xml.sax.Attributes;
   import org.apache.commons.beanutils.ConvertUtils;
   import org.apache.commons.beanutils.MethodUtils;
  @@ -78,7 +79,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.12 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.13 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class CallMethodRule extends Rule {
  @@ -97,9 +98,9 @@
        *  zero for a single argument from the body of this element.
        */
       public CallMethodRule(Digester digester, String methodName,
  -    			  int paramCount) {
  +                          int paramCount) {
   
  -	this(digester, methodName, paramCount, (Class[]) null);
  +        this(digester, methodName, paramCount, (Class[]) null);
   
       }
   
  @@ -119,19 +120,20 @@
       public CallMethodRule(Digester digester, String methodName,
                             int paramCount, String paramTypes[]) {
   
  -	super(digester);
  -	this.methodName = methodName;
  -	this.paramCount = paramCount;
  -	if (paramTypes == null) {
  +        super(digester);
  +        this.methodName = methodName;
  +        this.paramCount = paramCount;
  +        if (paramTypes == null) {
               this.paramTypes = new Class[paramCount];
  -            for (int i = 0; i < this.paramTypes.length; i++)
  +            for (int i = 0; i < this.paramTypes.length; i++) {
                   this.paramTypes[i] = "abc".getClass();
  +            }
           } else {
               this.paramTypes = new Class[paramTypes.length];
               for (int i = 0; i < this.paramTypes.length; i++) {
                   try {
                       this.paramTypes[i] =
  -                        digester.getClassLoader().loadClass(paramTypes[i]);
  +                            digester.getClassLoader().loadClass(paramTypes[i]);
                   } catch (ClassNotFoundException e) {
                       this.paramTypes[i] = null; // Will cause NPE later
                   }
  @@ -157,17 +159,19 @@
       public CallMethodRule(Digester digester, String methodName,
                             int paramCount, Class paramTypes[]) {
   
  -	super(digester);
  -	this.methodName = methodName;
  -	this.paramCount = paramCount;
  -	if (paramTypes == null) {
  +        super(digester);
  +        this.methodName = methodName;
  +        this.paramCount = paramCount;
  +        if (paramTypes == null) {
               this.paramTypes = new Class[paramCount];
  -            for (int i = 0; i < this.paramTypes.length; i++)
  +            for (int i = 0; i < this.paramTypes.length; i++) {
                   this.paramTypes[i] = "abc".getClass();
  +            }
           } else {
               this.paramTypes = new Class[paramTypes.length];
  -            for (int i = 0; i < this.paramTypes.length; i++)
  +            for (int i = 0; i < this.paramTypes.length; i++) {
                   this.paramTypes[i] = paramTypes[i];
  +            }
           }
   
       }
  @@ -182,7 +186,6 @@
       protected String bodyText = null;
   
   
  -
       /**
        * The method name to call on the parent object.
        */
  @@ -213,12 +216,13 @@
        */
       public void begin(Attributes attributes) throws Exception {
   
  -	// Push an array to capture the parameter values if necessary
  -	if (paramCount > 0) {
  -	    String parameters[] = new String[paramCount];
  -	    for (int i = 0; i < parameters.length; i++)
  -	        parameters[i] = null;
  -	    digester.pushParams(parameters);
  +        // Push an array to capture the parameter values if necessary
  +        if (paramCount > 0) {
  +            String parameters[] = new String[paramCount];
  +            for (int i = 0; i < parameters.length; i++) {
  +                parameters[i] = null;
  +            }
  +            digester.pushParams(parameters);
           }
   
       }
  @@ -231,8 +235,9 @@
        */
       public void body(String bodyText) throws Exception {
   
  -	if (paramCount == 0)
  -	    this.bodyText = bodyText.trim();
  +        if (paramCount == 0) {
  +            this.bodyText = bodyText.trim();
  +        }
   
       }
   
  @@ -242,11 +247,11 @@
        */
       public void end() throws Exception {
   
  -	// Retrieve or construct the parameter values array
  -	String parameters[] = null;
  -	if (paramCount > 0) {
  -         
  -	    parameters = (String[]) digester.popParams();
  +        // Retrieve or construct the parameter values array
  +        String parameters[] = null;
  +        if (paramCount > 0) {
  +
  +            parameters = (String[]) digester.popParams();
   
               // In the case where the parameter for the method
               // is taken from an attribute, and that attribute
  @@ -254,7 +259,7 @@
               // skip the method call
               if (paramCount == 1 && parameters[0] == null) {
                   return;
  -            }             
  +            }
   
           } else {
   
  @@ -266,8 +271,8 @@
                   return;
               }
   
  -	    parameters = new String[1];
  -	    parameters[0] = bodyText;
  +            parameters = new String[1];
  +            parameters[0] = bodyText;
               if (paramTypes.length == 0) {
                   paramTypes = new Class[1];
                   paramTypes[0] = "abc".getClass();
  @@ -275,41 +280,46 @@
   
           }
   
  -	// Construct the parameter values array we will need
  -	Object paramValues[] = new Object[paramTypes.length];
  -	for (int i = 0; i < paramTypes.length; i++)
  -	    paramValues[i] =
  -	      ConvertUtils.convert(parameters[i], paramTypes[i]);
  -
  -	// Invoke the required method on the top object
  -	Object top = digester.peek();
  -	if (digester.log.isDebugEnabled()) {
  -	    StringBuffer sb = new StringBuffer("Call ");
  -            if (top == null)
  +        // Construct the parameter values array we will need
  +        Object paramValues[] = new Object[paramTypes.length];
  +        for (int i = 0; i < paramTypes.length; i++) {
  +            paramValues[i] =
  +                    ConvertUtils.convert(parameters[i], paramTypes[i]);
  +        }
  +
  +        // Invoke the required method on the top object
  +        Object top = digester.peek();
  +        if (digester.log.isDebugEnabled()) {
  +            StringBuffer sb = new StringBuffer("Call ");
  +            if (top == null) {
                   sb.append("[NULL TOP]");
  -            else
  +            } else {
                   sb.append(top.getClass().getName());
  -	    sb.append(".");
  -	    sb.append(methodName);
  -	    sb.append("(");
  -	    for (int i = 0; i < paramValues.length; i++) {
  -		if (i > 0)
  -		    sb.append(",");
  -		if (paramValues[i] == null)
  -		    sb.append("null");
  -		else
  -		    sb.append(paramValues[i].toString());
  +            }
  +            sb.append(".");
  +            sb.append(methodName);
  +            sb.append("(");
  +            for (int i = 0; i < paramValues.length; i++) {
  +                if (i > 0) {
  +                    sb.append(",");
  +                }
  +                if (paramValues[i] == null) {
  +                    sb.append("null");
  +                } else {
  +                    sb.append(paramValues[i].toString());
  +                }
                   sb.append("/");
  -                if (paramTypes[i] == null)
  +                if (paramTypes[i] == null) {
                       sb.append("null");
  -                else
  +                } else {
                       sb.append(paramTypes[i].getName());
  -	    }
  -	    sb.append(")");
  -	    digester.log.debug(sb.toString());
  -	}
  +                }
  +            }
  +            sb.append(")");
  +            digester.log.debug(sb.toString());
  +        }
           MethodUtils.invokeExactMethod(top, methodName,
  -                                      paramValues, paramTypes);
  +                paramValues, paramTypes);
   
       }
   
  @@ -319,7 +329,7 @@
        */
       public void finish() throws Exception {
   
  -	bodyText = null;
  +        bodyText = null;
   
       }
   
  @@ -337,8 +347,9 @@
           sb.append(", paramTypes={");
           if (paramTypes != null) {
               for (int i = 0; i < paramTypes.length; i++) {
  -                if (i > 0)
  +                if (i > 0) {
                       sb.append(", ");
  +                }
                   sb.append(paramTypes[i].getName());
               }
           }
  
  
  
  1.6       +20 -17    jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java
  
  Index: CallParamRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CallParamRule.java	20 Aug 2001 19:18:42 -0000	1.5
  +++ CallParamRule.java	9 Jan 2002 20:22:49 -0000	1.6
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java,v 1.5 2001/08/20 19:18:42 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/08/20 19:18:42 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallParamRule.java,v 1.6 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -64,6 +64,7 @@
   
   
   import java.lang.reflect.Method;
  +
   import org.xml.sax.Attributes;
   
   
  @@ -73,7 +74,7 @@
    * by a surrounding CallMethodRule rule.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/08/20 19:18:42 $
  + * @version $Revision: 1.6 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class CallParamRule extends Rule {
  @@ -91,7 +92,7 @@
        */
       public CallParamRule(Digester digester, int paramIndex) {
   
  -	this(digester, paramIndex, null);
  +        this(digester, paramIndex, null);
   
       }
   
  @@ -105,11 +106,11 @@
        * @param attributeName The name of the attribute to save
        */
       public CallParamRule(Digester digester, int paramIndex,
  -    			 String attributeName) {
  +                         String attributeName) {
   
  -	super(digester);
  -	this.paramIndex = paramIndex;
  -	this.attributeName = attributeName;
  +        super(digester);
  +        this.paramIndex = paramIndex;
  +        this.attributeName = attributeName;
   
       }
   
  @@ -145,8 +146,9 @@
        */
       public void begin(Attributes attributes) throws Exception {
   
  -	if (attributeName != null)
  -	    bodyText = attributes.getValue(attributeName);
  +        if (attributeName != null) {
  +            bodyText = attributes.getValue(attributeName);
  +        }
   
       }
   
  @@ -158,8 +160,9 @@
        */
       public void body(String bodyText) throws Exception {
   
  -	if (attributeName == null)
  -	    this.bodyText = bodyText.trim();
  +        if (attributeName == null) {
  +            this.bodyText = bodyText.trim();
  +        }
   
       }
   
  @@ -169,8 +172,8 @@
        */
       public void end() throws Exception {
   
  -	String parameters[] = (String[]) digester.peekParams();
  -	parameters[paramIndex] = bodyText;
  +        String parameters[] = (String[]) digester.peekParams();
  +        parameters[paramIndex] = bodyText;
   
       }
   
  @@ -180,7 +183,7 @@
        */
       public void finish() throws Exception {
   
  -	bodyText = null;
  +        bodyText = null;
   
       }
   
  
  
  
  1.38      +53 -31    jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java
  
  Index: Digester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Digester.java	9 Jan 2002 02:04:13 -0000	1.37
  +++ Digester.java	9 Jan 2002 20:22:49 -0000	1.38
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v 1.37 2002/01/09 02:04:13 sanders Exp $
  - * $Revision: 1.37 $
  - * $Date: 2002/01/09 02:04:13 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v 1.38 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.38 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -79,6 +79,7 @@
   import java.util.Map;
   import javax.xml.parsers.SAXParser;
   import javax.xml.parsers.SAXParserFactory;
  +
   import org.apache.commons.collections.ArrayStack;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogSource;
  @@ -111,7 +112,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.37 $ $Date: 2002/01/09 02:04:13 $
  + * @version $Revision: 1.38 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class Digester extends DefaultHandler {
  @@ -321,8 +322,9 @@
       public String findNamespaceURI(String prefix) {
   
           ArrayStack stack = (ArrayStack) namespaces.get(prefix);
  -        if (stack == null)
  +        if (stack == null) {
               return (null);
  +        }
           try {
               return ((String) stack.peek());
           } catch (EmptyStackException e) {
  @@ -344,13 +346,15 @@
        */
       public ClassLoader getClassLoader() {
   
  -        if (this.classLoader != null)
  +        if (this.classLoader != null) {
               return (this.classLoader);
  +        }
           if (this.useContextClassLoader) {
               ClassLoader classLoader =
                       Thread.currentThread().getContextClassLoader();
  -            if (classLoader != null)
  +            if (classLoader != null) {
                   return (classLoader);
  +            }
           }
           return (this.getClass().getClassLoader());
   
  @@ -388,8 +392,9 @@
   
           String elementName = match;
           int lastSlash = elementName.lastIndexOf('/');
  -        if (lastSlash >= 0)
  +        if (lastSlash >= 0) {
               elementName = elementName.substring(lastSlash + 1);
  +        }
           return (elementName);
   
       }
  @@ -539,14 +544,16 @@
       public SAXParser getParser() {
   
           // Return the parser we already created (if any)
  -        if (parser != null)
  +        if (parser != null) {
               return (parser);
  +        }
   
           // Create and return a new parser
           synchronized (this) {
               try {
  -                if (factory == null)
  +                if (factory == null) {
                       factory = SAXParserFactory.newInstance();
  +                }
                   factory.setNamespaceAware(namespaceAware);
                   factory.setValidating(validating);
                   parser = factory.newSAXParser();
  @@ -705,8 +712,9 @@
               }
           }
   
  -        while (getCount() > 1)
  +        while (getCount() > 1) {
               pop();
  +        }
   
           // Fire "finish" events for all defined rules
           Iterator rules = getRules().rules().iterator();
  @@ -760,8 +768,9 @@
               for (int i = 0; i < rules.size(); i++) {
                   try {
                       Rule rule = (Rule) rules.get(i);
  -                    if (debug)
  +                    if (debug) {
                           log.debug("  Fire body() for " + rule);
  +                    }
                       rule.body(bodyText);
                   } catch (Exception e) {
                       log.error("Body event threw exception", e);
  @@ -772,14 +781,16 @@
                   }
               }
           } else {
  -            if (debug)
  +            if (debug) {
                   log.debug("  No rules found matching '" + match + "'.");
  +            }
           }
   
           // Recover the body text from the surrounding element
           bodyText = (StringBuffer) bodyTexts.pop();
  -        if (debug)
  +        if (debug) {
               log.debug("  Popping body text '" + bodyText.toString() + "'");
  +        }
   
           // Fire "end" events for all relevant rules in reverse order
           if (rules != null) {
  @@ -787,8 +798,9 @@
                   int j = (rules.size() - i) - 1;
                   try {
                       Rule rule = (Rule) rules.get(j);
  -                    if (debug)
  +                    if (debug) {
                           log.debug("  Fire end() for " + rule);
  +                    }
                       rule.end();
                   } catch (Exception e) {
                       log.error("End event threw exception", e);
  @@ -802,10 +814,11 @@
   
           // Recover the previous match expression
           int slash = match.lastIndexOf('/');
  -        if (slash >= 0)
  +        if (slash >= 0) {
               match = match.substring(0, slash);
  -        else
  +        } else {
               match = "";
  +        }
   
       }
   
  @@ -825,8 +838,9 @@
   
           // Deregister this prefix mapping
           ArrayStack stack = (ArrayStack) namespaces.get(prefix);
  -        if (stack == null)
  +        if (stack == null) {
               return;
  +        }
           try {
               stack.pop();
               if (stack.empty())
  @@ -964,12 +978,14 @@
   
           // Compute the current matching rule
           StringBuffer sb = new StringBuffer(match);
  -        if (match.length() > 0)
  +        if (match.length() > 0) {
               sb.append('/');
  -        if ((localName == null) || (localName.length() < 1))
  +        }
  +        if ((localName == null) || (localName.length() < 1)) {
               sb.append(qName);
  -        else
  +        } else {
               sb.append(localName);
  +        }
           match = sb.toString();
           if (debug) {
               log.debug("  New match='" + match + "'");
  @@ -1090,8 +1106,9 @@
   
           // Has this system identifier been registered?
           String dtdURL = null;
  -        if (publicId != null)
  +        if (publicId != null) {
               dtdURL = (String) dtds.get(publicId);
  +        }
           if (dtdURL == null) {
               if (debug) {
                   log.debug(" Not registered, use system identifier");
  @@ -1130,8 +1147,9 @@
           log.error("Parse Error at line " + exception.getLineNumber() +
                   " column " + exception.getColumnNumber() + ": " +
                   exception.getMessage(), exception);
  -        if (errorHandler != null)
  +        if (errorHandler != null) {
               errorHandler.error(exception);
  +        }
   
       }
   
  @@ -1149,8 +1167,9 @@
           log.error("Parse Fatal Error at line " + exception.getLineNumber() +
                   " column " + exception.getColumnNumber() + ": " +
                   exception.getMessage(), exception);
  -        if (errorHandler != null)
  +        if (errorHandler != null) {
               errorHandler.fatalError(exception);
  +        }
   
       }
   
  @@ -1168,8 +1187,9 @@
           log.error("Parse Warning at line " + exception.getLineNumber() +
                   " column " + exception.getColumnNumber() + ": " +
                   exception.getMessage(), exception);
  -        if (errorHandler != null)
  +        if (errorHandler != null) {
               errorHandler.warning(exception);
  +        }
   
       }
   
  @@ -1203,7 +1223,6 @@
       }
   
   
  -
       /**
        * Parse the content of the specified file using this Digester.  Returns
        * the root element from the object stack (if any).
  @@ -1337,10 +1356,11 @@
           String oldNamespaceURI = getRuleNamespaceURI();
           String newNamespaceURI = ruleSet.getNamespaceURI();
           if (log.isDebugEnabled()) {
  -            if (newNamespaceURI == null)
  +            if (newNamespaceURI == null) {
                   log.debug("addRuleSet() with no namespace URI");
  -            else
  +            } else {
                   log.debug("addRuleSet() with namespace URI " + newNamespaceURI);
  +            }
           }
           setRuleNamespaceURI(newNamespaceURI);
           ruleSet.addRuleInstances(this);
  @@ -1784,8 +1804,9 @@
        */
       public void push(Object object) {
   
  -        if (stack.size() == 0)
  +        if (stack.size() == 0) {
               root = object;
  +        }
           stack.push(object);
   
       }
  @@ -1805,8 +1826,9 @@
       protected void configure() {
   
           // Do not configure more than once
  -        if (configured)
  +        if (configured) {
               return;
  +        }
   
           // Perform lazy configuration as needed
           ; // Nothing required by default
  
  
  
  1.2       +131 -154  jakarta-commons/digester/src/java/org/apache/commons/digester/ExtendedBaseRules.java
  
  Index: ExtendedBaseRules.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ExtendedBaseRules.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExtendedBaseRules.java	20 Sep 2001 20:42:04 -0000	1.1
  +++ ExtendedBaseRules.java	9 Jan 2002 20:22:49 -0000	1.2
  @@ -1,12 +1,12 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ExtendedBaseRules.java,v 1.1 2001/09/20 20:42:04 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/09/20 20:42:04 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ExtendedBaseRules.java,v 1.2 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:49 $
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -71,10 +71,10 @@
   import java.util.Comparator;
   
   
  -/** 
  +/**
    * <p>Extension of {@link RulesBase} for complex schema.</p>
    *
  - * <p>This is an extension of the basic pattern matching scheme 
  + * <p>This is an extension of the basic pattern matching scheme
    * intended to improve support for mapping complex xml-schema.
    * It is intended to be a minimal extension of the standard rules
    * big enough to support complex schema but without the full generality
  @@ -84,13 +84,13 @@
    *
    * <p>These rules are complex and slower but offer more functionality.
    * The <code>RulesBase</code> matching set allows interaction between patterns.
  - * This allows sophisticated matching schema to be created 
  - * but it also means that it can be hard to create and debug mappings 
  + * This allows sophisticated matching schema to be created
  + * but it also means that it can be hard to create and debug mappings
    * for complex schema.
    * This extension introduces <em>universal</em> versions of these patterns
    * that always act independently.</p>
    *
  - * <p>Another three kinds of matching pattern are also introduced. 
  + * <p>Another three kinds of matching pattern are also introduced.
    * The parent matchs allow common method to be easily called for children.
    * The wildcard match allows rules to be specified for all elements.</p>
    *
  @@ -133,30 +133,30 @@
    *
    * <h4>Using The Extended Rules</h4>
    *
  - * <p>The most important thing to remember 
  - * when using the extended rules is that universal 
  - * and non-universal patterns are completely independent. 
  - * Universal patterns are never effected by the addition of new patterns 
  - * or the removal of existing ones. 
  - * Non-universal patterns are never effected 
  - * by the addition of new <em>universal</em> patterns 
  - * or the removal of existing <em>universal</em> patterns.   
  + * <p>The most important thing to remember
  + * when using the extended rules is that universal
  + * and non-universal patterns are completely independent.
  + * Universal patterns are never effected by the addition of new patterns
  + * or the removal of existing ones.
  + * Non-universal patterns are never effected
  + * by the addition of new <em>universal</em> patterns
  + * or the removal of existing <em>universal</em> patterns.
    * As in the basic matching rules, non-universal (basic) patterns
    * <strong>can</strong> be effected
  - * by the addition of new <em>non-universal</em> patterns 
  + * by the addition of new <em>non-universal</em> patterns
    * or the removal of existing <em>non-universal</em> patterns.
  - * <p> This means that you can use universal patterns 
  - * to build up the simple parts of your structure 
  - * - for example defining universal creation and property setting rules. 
  - * More sophisticated and complex mapping will require non-universal patterns 
  + * <p> This means that you can use universal patterns
  + * to build up the simple parts of your structure
  + * - for example defining universal creation and property setting rules.
  + * More sophisticated and complex mapping will require non-universal patterns
    * and this might mean that some of the universal rules will need to be
  - * replaced by a series of 
  + * replaced by a series of
    * special cases using non-universal rules.
  - * But by using universal rules as your backbone, 
  + * But by using universal rules as your backbone,
    * these additions should not break your existing rules.</p>
    *
    * @author Robert Burrell Donkin <robertdonkin@mac.com>
  - * @version $Revision: 1.1 $ $Date: 2001/09/20 20:42:04 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:49 $
    */
   
   
  @@ -168,8 +168,8 @@
       /**
        * Counts the entry number for the rules.
        */
  -    private int counter=0;
  -    
  +    private int counter = 0;
  +
   
       /**
        * The decision algorithm used (unfortunately) doesn't preserve the entry
  @@ -178,7 +178,7 @@
        * before it's returned.
        * This map stores the entry number keyed by the rule.
        */
  -    private Map order=new HashMap();
  +    private Map order = new HashMap();
   
   
       // --------------------------------------------------------- Public Methods
  @@ -191,9 +191,9 @@
        * @param rule Rule instance to be registered
        */
       public void add(String pattern, Rule rule) {
  -        super.add(pattern,rule);
  +        super.add(pattern, rule);
           counter++;
  -        order.put(rule,new Integer(counter));
  +        order.put(rule, new Integer(counter));
       }
   
   
  @@ -206,135 +206,123 @@
        *
        * @param pattern Nesting pattern to be matched
        */
  -    public List match(String namespace,String pattern) {
  -        
  +    public List match(String namespace, String pattern) {
  +
           // calculate the pattern of the parent
           // (if the element has one)
  -        String parentPattern="";
  -        int lastIndex=pattern.lastIndexOf('/');
  -        
  -        boolean hasParent=true;
  -        if (lastIndex==-1)
  -        {	
  +        String parentPattern = "";
  +        int lastIndex = pattern.lastIndexOf('/');
  +
  +        boolean hasParent = true;
  +        if (lastIndex == -1) {
               // element has no parent
  -            hasParent=false;
  -            
  +            hasParent = false;
  +
           } else {
               // calculate the pattern of the parent
  -            parentPattern=pattern.substring(0,lastIndex);
  +            parentPattern = pattern.substring(0, lastIndex);
   
           }
  -        
  -        
  +
  +
           // we keep the list of universal matches separate
  -        List universalList=new ArrayList(counter);
  -        
  +        List universalList = new ArrayList(counter);
  +
           // Universal all wildards ('!*')
           // These are always matched so always add them
           List tempList = (List) this.cache.get("!*");
  -        if (tempList!=null)
  -        {
  +        if (tempList != null) {
               universalList.addAll(tempList);
           }
  -        
  -        // Universal exact parent match 
  +
  +        // Universal exact parent match
           // need to get this now since only wildcards are considered later
           tempList = (List) this.cache.get("!" + parentPattern + "/?");
  -        if (tempList!=null)
  -        {
  +        if (tempList != null) {
               universalList.addAll(tempList);
           }
  -        
  -        
  +
  +
           // base behaviour means that if we certain matches, we don't continue
           // but we just have a single combined loop and so we have to set
           // a variable
  -        boolean ignoreBasicMatches=false;
  -        
  -        
  +        boolean ignoreBasicMatches = false;
  +
  +
           // see if we have an exact basic pattern match
           List rulesList = (List) this.cache.get(pattern);
  -	if (rulesList != null)
  -        {
  +        if (rulesList != null) {
               // we have a match!
               // so ignore all basic matches from now on
  -            ignoreBasicMatches=true;
  -            
  +            ignoreBasicMatches = true;
  +
           } else {
  -            
  +
               // see if we have an exact child match
  -            if (hasParent)
  -            {
  +            if (hasParent) {
                   // matching children takes preference
                   rulesList = (List) this.cache.get(parentPattern + "/?");
  -                if (rulesList != null)
  -                {
  +                if (rulesList != null) {
                       // we have a match!
                       // so ignore all basic matches from now on
  -                    ignoreBasicMatches=true; 
  +                    ignoreBasicMatches = true;
                   }
               }
           }
   
   
           // OK - we're ready for the big loop!
  -        // Unlike the basic rules case, 
  +        // Unlike the basic rules case,
           // we have to go through for all those universal rules in all cases.
  -        
  +
           // Find the longest key, ie more discriminant
           String longKey = "";
           Iterator keys = this.cache.keySet().iterator();
           while (keys.hasNext()) {
               String key = (String) keys.next();
  -            
  +
               // find out if it's a univeral pattern
               // set a flag
  -            boolean isUniversal=key.startsWith("!");
  -            if (isUniversal)
  -            {
  +            boolean isUniversal = key.startsWith("!");
  +            if (isUniversal) {
                   // and find the underlying key
  -                key=key.substring(1,key.length());
  +                key = key.substring(1, key.length());
               }
  -            
  -            
  +
  +
               // don't need to check exact matches
               if (key.startsWith("*/")) {
  -        
  -                boolean parentMatched=false;
  -                boolean basicMatched=false;
  -                if (key.endsWith("/?")) 
  -                {
  +
  +                boolean parentMatched = false;
  +                boolean basicMatched = false;
  +                if (key.endsWith("/?")) {
                       // try for a parent match
  -                    parentMatched=parentMatch(key,pattern,parentPattern);
  -                
  +                    parentMatched = parentMatch(key, pattern, parentPattern);
  +
                   } else {
                       // try for a base match
  -                    basicMatched=basicMatch(key,pattern);
  +                    basicMatched = basicMatch(key, pattern);
                   }
  -                
  +
                   if (parentMatched || basicMatched) {
  -                    if (isUniversal)
  -                    {	
  +                    if (isUniversal) {
                           // universal rules go straight in
                           // (no longest matching rule)
  -                        tempList=(List) this.cache.get("!" + key);
  -                        if (tempList!=null)
  -                        {
  +                        tempList = (List) this.cache.get("!" + key);
  +                        if (tempList != null) {
                               universalList.addAll(tempList);
                           }
  -                    
  +
                       } else {
  -                        if (!ignoreBasicMatches)
  -                        {
  +                        if (!ignoreBasicMatches) {
                               // ensure that all parent matches are SHORTER
                               // than rules with same level of matching
  -                            int keyLength=key.length();
  -                            if (parentMatched)
  -                            {
  +                            int keyLength = key.length();
  +                            if (parentMatched) {
                                   keyLength--;
                               }
  -                            
  -                            
  +
  +
                               if (keyLength > longKey.length()) {
                                   rulesList = (List) this.cache.get(key);
                                   longKey = key;
  @@ -348,86 +336,75 @@
   
           // '*' works in practice as a default matching
           // (this is because anything is a deeper match!)
  -        if (rulesList==null)
  -        {
  -            rulesList=(List) this.cache.get("*");
  +        if (rulesList == null) {
  +            rulesList = (List) this.cache.get("*");
           }
  -        
  +
           // if we've matched a basic pattern, then add to the universal list
  -        if (rulesList!=null)
  -        {
  +        if (rulesList != null) {
               universalList.addAll(rulesList);
           }
  -        
  -        
  +
  +
           // don't filter if namespace is null
  -        if (namespace!=null)
  -        {
  +        if (namespace != null) {
               // remove invalid namespaces
  -            Iterator it=universalList.iterator();
  -            while (it.hasNext())
  -            {	
  -                Rule rule=(Rule)it.next();
  -                String ns_uri=rule.getNamespaceURI();
  -                if (ns_uri!=null && !ns_uri.equals(namespace))
  -                {
  +            Iterator it = universalList.iterator();
  +            while (it.hasNext()) {
  +                Rule rule = (Rule) it.next();
  +                String ns_uri = rule.getNamespaceURI();
  +                if (ns_uri != null && !ns_uri.equals(namespace)) {
                       it.remove();
                   }
               }
           }
  -        
  -        
  +
  +
           // need to make sure that the collection is sort in the order
           // of addition.  We use a custom comparator for this
  -	Collections.sort(
  -            universalList,
  -            new Comparator ()
  -            {
  -                
  -                public int compare(Object o1,Object o2) throws ClassCastException
  -                {
  -                    // Get the entry order from the map
  -                    Integer i1=(Integer)order.get(o1);
  -                    Integer i2=(Integer)order.get(o2);
  -                    
  -                    // and use that to perform the comparison
  -                    if (i1==null)
  -                    {
  -                        if (i2==null)
  -                        {
  -                        
  -                            return 0;
  -                        
  -                        } else {
  -                            
  -                            return -1;
  -                            
  +        Collections.sort(
  +                universalList,
  +                new Comparator() {
  +
  +                    public int compare(Object o1, Object o2) throws ClassCastException {
  +                        // Get the entry order from the map
  +                        Integer i1 = (Integer) order.get(o1);
  +                        Integer i2 = (Integer) order.get(o2);
  +
  +                        // and use that to perform the comparison
  +                        if (i1 == null) {
  +                            if (i2 == null) {
  +
  +                                return 0;
  +
  +                            } else {
  +
  +                                return -1;
  +
  +                            }
  +                        } else if (i2 == null) {
  +                            return 1;
                           }
  -                    } else if (i2==null) {
  -                        return 1;
  +
  +                        return (i1.intValue() - i2.intValue());
                       }
  -                    
  -                    return (i1.intValue()-i2.intValue());
  -                }
  -            });
  -        
  +                });
  +
           return universalList;
       }
  -    
  -    /** 
  +
  +    /**
        * Matching parent.
        */
  -    private boolean parentMatch(String key,String pattern,String parentPattern)
  -    {
  -        return parentPattern.endsWith(key.substring(1,key.length()-2));
  +    private boolean parentMatch(String key, String pattern, String parentPattern) {
  +        return parentPattern.endsWith(key.substring(1, key.length() - 2));
       }
  -        
  +
       /**
        * Standard match.
        * Matches the end of the pattern to the key.
        */
  -    private boolean basicMatch(String key,String pattern)
  -    {
  +    private boolean basicMatch(String key, String pattern) {
           return pattern.endsWith(key.substring(1));
       }
   
  
  
  
  1.7       +12 -7     jakarta-commons/digester/src/java/org/apache/commons/digester/FactoryCreateRule.java
  
  Index: FactoryCreateRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/FactoryCreateRule.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FactoryCreateRule.java	4 Jan 2002 05:32:11 -0000	1.6
  +++ FactoryCreateRule.java	9 Jan 2002 20:22:49 -0000	1.7
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -73,7 +73,7 @@
    * in a call to either a factory method or to a non-empty constructor.
    *
    * @author Robert Burrell Donkin
  - * @version $Revision: 1.6 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.7 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class FactoryCreateRule extends Rule {
  @@ -203,8 +203,9 @@
       public void begin(Attributes attributes) throws Exception {
   
           Object instance = getFactory(attributes).createObject(attributes);
  -        if (digester.log.isDebugEnabled())
  +        if (digester.log.isDebugEnabled()) {
               digester.log.debug("New " + instance.getClass().getName());
  +        }
           digester.push(instance);
   
       }
  @@ -216,8 +217,9 @@
       public void end() throws Exception {
   
           Object top = digester.pop();
  -        if (digester.log.isDebugEnabled())
  +        if (digester.log.isDebugEnabled()) {
               digester.log.debug("Pop " + top.getClass().getName());
  +        }
   
       }
   
  @@ -227,8 +229,9 @@
        */
       public void finish() throws Exception {
   
  -        if (attributeName != null)
  +        if (attributeName != null) {
               creationFactory = null;
  +        }
   
       }
   
  @@ -271,11 +274,13 @@
               String realClassName = className;
               if (attributeName != null) {
                   String value = attributes.getValue(attributeName);
  -                if (value != null)
  +                if (value != null) {
                       realClassName = value;
  +                }
               }
  -            if (digester.log.isDebugEnabled())
  +            if (digester.log.isDebugEnabled()) {
                   digester.log.debug("New factory " + realClassName);
  +            }
               Class clazz = digester.getClassLoader().loadClass(realClassName);
               creationFactory = (ObjectCreationFactory)
                       clazz.newInstance();
  
  
  
  1.10      +11 -8     jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java
  
  Index: ObjectCreateRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ObjectCreateRule.java	5 Jan 2002 19:48:39 -0000	1.9
  +++ ObjectCreateRule.java	9 Jan 2002 20:22:49 -0000	1.10
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java,v 1.9 2002/01/05 19:48:39 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/01/05 19:48:39 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreateRule.java,v 1.10 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -73,7 +73,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.9 $ $Date: 2002/01/05 19:48:39 $
  + * @version $Revision: 1.10 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class ObjectCreateRule extends Rule {
  @@ -174,11 +174,13 @@
           String realClassName = className;
           if (attributeName != null) {
               String value = attributes.getValue(attributeName);
  -            if (value != null)
  +            if (value != null) {
                   realClassName = value;
  +            }
           }
  -        if (digester.log.isDebugEnabled())
  +        if (digester.log.isDebugEnabled()) {
               digester.log.debug("New " + realClassName);
  +        }
   
           // Instantiate the new object and push it on the context stack
           Class clazz = digester.getClassLoader().loadClass(realClassName);
  @@ -194,8 +196,9 @@
       public void end() throws Exception {
   
           Object top = digester.pop();
  -        if (digester.log.isDebugEnabled())
  +        if (digester.log.isDebugEnabled()) {
               digester.log.debug("Pop " + top.getClass().getName());
  +        }
   
       }
   
  
  
  
  1.4       +5 -5      jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreationFactory.java
  
  Index: ObjectCreationFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/ObjectCreationFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ObjectCreationFactory.java	22 Sep 2001 18:36:35 -0000	1.3
  +++ ObjectCreationFactory.java	9 Jan 2002 20:22:49 -0000	1.4
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -59,6 +59,7 @@
   
   
   import java.lang.ClassLoader;
  +
   import org.xml.sax.Attributes;
   
   /**
  @@ -68,14 +69,13 @@
    * whenever it is matched.</p>
    *
    * <p> {@link AbstractObjectCreationFactory} is an abstract
  - * implementation suitable for creating anonymous 
  + * implementation suitable for creating anonymous
    * <code>ObjectCreationFactory</code> implementations.
    *
    * @author Robert Burrell Donkin
  - * @version $Revision: 1.3 $ $Date: 2001/09/22 18:36:35 $
  + * @version $Revision: 1.4 $ $Date: 2002/01/09 20:22:49 $
    */
  -public interface ObjectCreationFactory
  -{
  +public interface ObjectCreationFactory {
   
       /**
        * <p>Factory method called by {@link FactoryCreateRule} to supply an
  
  
  
  1.5       +11 -12    jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java
  
  Index: Rule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Rule.java	26 Aug 2001 22:13:44 -0000	1.4
  +++ Rule.java	9 Jan 2002 20:22:49 -0000	1.5
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java,v 1.4 2001/08/26 22:13:44 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/08/26 22:13:44 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rule.java,v 1.5 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -71,7 +71,7 @@
    * a corresponding nested pattern of XML elements has been matched.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/08/26 22:13:44 $
  + * @version $Revision: 1.5 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public abstract class Rule {
  @@ -87,8 +87,8 @@
        */
       public Rule(Digester digester) {
   
  -	super();
  -	this.digester = digester;
  +        super();
  +        this.digester = digester;
   
       }
   
  @@ -155,7 +155,7 @@
        */
       public void begin(Attributes attributes) throws Exception {
   
  -	;	// The default implementation does nothing
  +        ;	// The default implementation does nothing
   
       }
   
  @@ -169,7 +169,7 @@
        */
       public void body(String text) throws Exception {
   
  -	;	// The default implementation does nothing
  +        ;	// The default implementation does nothing
   
       }
   
  @@ -180,19 +180,18 @@
        */
       public void end() throws Exception {
   
  -	;	// The default implementation does nothing
  +        ;	// The default implementation does nothing
   
       }
   
   
  -
       /**
        * This method is called after all parsing methods have been
        * called, to allow Rules to remove temporary data.
        */
       public void finish() throws Exception {
   
  -	;	// The default implementation does nothing
  +        ;	// The default implementation does nothing
   
       }
   
  
  
  
  1.2       +5 -5      jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSet.java
  
  Index: RuleSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RuleSet.java	26 Aug 2001 22:13:44 -0000	1.1
  +++ RuleSet.java	9 Jan 2002 20:22:49 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSet.java,v 1.1 2001/08/26 22:13:44 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/08/26 22:13:44 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSet.java,v 1.2 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -80,7 +80,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/08/26 22:13:44 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public interface RuleSet {
  
  
  
  1.2       +5 -5      jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSetBase.java
  
  Index: RuleSetBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSetBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RuleSetBase.java	26 Aug 2001 22:13:44 -0000	1.1
  +++ RuleSetBase.java	9 Jan 2002 20:22:49 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSetBase.java,v 1.1 2001/08/26 22:13:44 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/08/26 22:13:44 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RuleSetBase.java,v 1.2 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -69,7 +69,7 @@
    * logic in the <code>addRuleSet()</code> implementation.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/08/26 22:13:44 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public abstract class RuleSetBase implements RuleSet {
  
  
  
  1.4       +5 -7      jakarta-commons/digester/src/java/org/apache/commons/digester/Rules.java
  
  Index: Rules.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rules.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Rules.java	22 Sep 2001 18:36:35 -0000	1.3
  +++ Rules.java	9 Jan 2002 20:22:49 -0000	1.4
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rules.java,v 1.3 2001/09/22 18:36:35 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/09/22 18:36:35 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Rules.java,v 1.4 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -73,7 +73,7 @@
    * during parsing.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/09/22 18:36:35 $
  + * @version $Revision: 1.4 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public interface Rules {
  @@ -161,7 +161,6 @@
       public List match(String namespaceURI, String pattern);
   
   
  -
       /**
        * Return a List of all registered Rule instances, or a zero-length List
        * if there are no registered Rule instances.  If more than one Rule
  @@ -170,7 +169,6 @@
        * method.
        */
       public List rules();
  -
   
   
   }
  
  
  
  1.7       +21 -19    jakarta-commons/digester/src/java/org/apache/commons/digester/RulesBase.java
  
  Index: RulesBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RulesBase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RulesBase.java	5 Sep 2001 18:52:37 -0000	1.6
  +++ RulesBase.java	9 Jan 2002 20:22:49 -0000	1.7
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RulesBase.java,v 1.6 2001/09/05 18:52:37 craigmcc Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/09/05 18:52:37 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/RulesBase.java,v 1.7 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -86,7 +86,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/09/05 18:52:37 $
  + * @version $Revision: 1.7 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class RulesBase implements Rules {
  @@ -194,8 +194,9 @@
           }
           list.add(rule);
           rules.add(rule);
  -        if (this.namespaceURI != null)
  +        if (this.namespaceURI != null) {
               rule.setNamespaceURI(this.namespaceURI);
  +        }
   
       }
   
  @@ -244,26 +245,27 @@
   
           // List rulesList = (List) this.cache.get(pattern);
           List rulesList = lookup(namespaceURI, pattern);
  -	if ((rulesList == null) || (rulesList.size() < 1)) {
  +        if ((rulesList == null) || (rulesList.size() < 1)) {
               // Find the longest key, ie more discriminant
               String longKey = "";
  -	    Iterator keys = this.cache.keySet().iterator();
  -	    while (keys.hasNext()) {
  -	        String key = (String) keys.next();
  -		if (key.startsWith("*/")) {
  -		    if (pattern.endsWith(key.substring(1))) {
  +            Iterator keys = this.cache.keySet().iterator();
  +            while (keys.hasNext()) {
  +                String key = (String) keys.next();
  +                if (key.startsWith("*/")) {
  +                    if (pattern.endsWith(key.substring(1))) {
                           if (key.length() > longKey.length()) {
                               // rulesList = (List) this.cache.get(key);
                               rulesList = lookup(namespaceURI, key);
                               longKey = key;
                           }
  -		    }
  -		}
  -	    }
  -	}
  -        if (rulesList == null)
  +                    }
  +                }
  +            }
  +        }
  +        if (rulesList == null) {
               rulesList = new ArrayList();
  -	return (rulesList);
  +        }
  +        return (rulesList);
   
       }
   
  @@ -311,7 +313,7 @@
           while (items.hasNext()) {
               Rule item = (Rule) items.next();
               if ((namespaceURI.equals(item.getNamespaceURI())) ||
  -                (item.getNamespaceURI() == null)) {
  +                    (item.getNamespaceURI() == null)) {
                   results.add(item);
               }
           }
  
  
  
  1.10      +27 -24    jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java
  
  Index: SetNextRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SetNextRule.java	4 Jan 2002 05:32:11 -0000	1.9
  +++ SetNextRule.java	9 Jan 2002 20:22:49 -0000	1.10
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.9 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.10 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,6 +65,7 @@
   
   import java.lang.ClassLoader;
   import java.lang.reflect.Method;
  +
   import org.xml.sax.Attributes;
   import org.apache.commons.beanutils.MethodUtils;
   
  @@ -76,7 +77,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.9 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.10 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class SetNextRule extends Rule {
  @@ -95,7 +96,7 @@
        */
       public SetNextRule(Digester digester, String methodName) {
   
  -	this(digester, methodName, null);
  +        this(digester, methodName, null);
   
       }
   
  @@ -113,9 +114,9 @@
       public SetNextRule(Digester digester, String methodName,
                          String paramType) {
   
  -	super(digester);
  -	this.methodName = methodName;
  -	this.paramType = paramType;
  +        super(digester);
  +        this.methodName = methodName;
  +        this.paramType = paramType;
   
       }
   
  @@ -143,27 +144,29 @@
        */
       public void end() throws Exception {
   
  -	// Identify the objects to be used
  -	Object child = digester.peek(0);
  -	Object parent = digester.peek(1);
  -	if (digester.log.isDebugEnabled()) {
  -            if (parent == null)
  +        // Identify the objects to be used
  +        Object child = digester.peek(0);
  +        Object parent = digester.peek(1);
  +        if (digester.log.isDebugEnabled()) {
  +            if (parent == null) {
                   digester.log.debug("Call [NULL PARENT]." +
  -                             methodName + "(" + child + ")");
  -            else
  +                        methodName + "(" + child + ")");
  +            } else {
                   digester.log.debug("Call " + parent.getClass().getName() + "." +
  -                             methodName + "(" + child + ")");
  +                        methodName + "(" + child + ")");
  +            }
           }
   
  -	// Call the specified method
  -	Class paramTypes[] = new Class[1];
  -	if (paramType != null)
  +        // Call the specified method
  +        Class paramTypes[] = new Class[1];
  +        if (paramType != null) {
               paramTypes[0] =
  -                digester.getClassLoader().loadClass(paramType);
  -        else
  -	    paramTypes[0] = child.getClass();
  +                    digester.getClassLoader().loadClass(paramType);
  +        } else {
  +            paramTypes[0] = child.getClass();
  +        }
           MethodUtils.invokeExactMethod(parent, methodName,
  -                                      new Object[] { child }, paramTypes);
  +                new Object[]{ child }, paramTypes);
   
       }
   
  
  
  
  1.6       +26 -22    jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java
  
  Index: SetPropertiesRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SetPropertiesRule.java	4 Jan 2002 05:32:11 -0000	1.5
  +++ SetPropertiesRule.java	9 Jan 2002 20:22:49 -0000	1.6
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java,v 1.5 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertiesRule.java,v 1.6 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -64,6 +64,7 @@
   
   
   import java.util.HashMap;
  +
   import org.xml.sax.Attributes;
   import org.apache.commons.beanutils.BeanUtils;
   
  @@ -73,7 +74,7 @@
    * stack, based on attributes with corresponding names.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.5 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.6 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class SetPropertiesRule extends Rule {
  @@ -89,7 +90,7 @@
        */
       public SetPropertiesRule(Digester digester) {
   
  -	super(digester);
  +        super(digester);
   
       }
   
  @@ -105,24 +106,27 @@
        */
       public void begin(Attributes attributes) throws Exception {
   
  -	// Build a set of attribute names and corresponding values
  -	HashMap values = new HashMap();
  -	for (int i = 0; i < attributes.getLength(); i++) {
  -	    String name = attributes.getLocalName(i);
  -            if ("".equals(name))
  +        // Build a set of attribute names and corresponding values
  +        HashMap values = new HashMap();
  +        for (int i = 0; i < attributes.getLength(); i++) {
  +            String name = attributes.getLocalName(i);
  +            if ("".equals(name)) {
                   name = attributes.getQName(i);
  -	    String value = attributes.getValue(i);
  -            if (digester.log.isDebugEnabled())
  +            }
  +            String value = attributes.getValue(i);
  +            if (digester.log.isDebugEnabled()) {
                   digester.log.debug("  Setting property '" + name + "' to '" +
  -                             value + "'");
  -	    values.put(name, value);
  -	}
  -
  -	// Populate the corresponding properties of the top object
  -	Object top = digester.peek();
  -	if (digester.log.isDebugEnabled())
  -	    digester.log.debug("Set " + top.getClass().getName() + " properties");
  -	BeanUtils.populate(top, values);
  +                        value + "'");
  +            }
  +            values.put(name, value);
  +        }
  +
  +        // Populate the corresponding properties of the top object
  +        Object top = digester.peek();
  +        if (digester.log.isDebugEnabled()) {
  +            digester.log.debug("Set " + top.getClass().getName() + " properties");
  +        }
  +        BeanUtils.populate(top, values);
   
   
       }
  
  
  
  1.6       +33 -29    jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java
  
  Index: SetPropertyRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SetPropertyRule.java	4 Jan 2002 05:32:11 -0000	1.5
  +++ SetPropertyRule.java	9 Jan 2002 20:22:49 -0000	1.6
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java,v 1.5 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetPropertyRule.java,v 1.6 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -64,6 +64,7 @@
   
   
   import java.util.HashMap;
  +
   import org.xml.sax.Attributes;
   import org.apache.commons.beanutils.BeanUtils;
   
  @@ -73,7 +74,7 @@
    * top of the stack, based on attributes with specified names.
    *
    * @author Craig McClanahan
  - * @version $Revision: 1.5 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.6 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class SetPropertyRule extends Rule {
  @@ -94,9 +95,9 @@
        */
       public SetPropertyRule(Digester digester, String name, String value) {
   
  -	super(digester);
  -	this.name = name;
  -	this.value = value;
  +        super(digester);
  +        this.name = name;
  +        this.value = value;
   
       }
   
  @@ -127,28 +128,31 @@
        */
       public void begin(Attributes attributes) throws Exception {
   
  -	// Identify the actual property name and value to be used
  -	String actualName = null;
  -	String actualValue = null;
  -	HashMap values = new HashMap();
  -	for (int i = 0; i < attributes.getLength(); i++) {
  -	    String name = attributes.getLocalName(i);
  -            if ("".equals(name))
  +        // Identify the actual property name and value to be used
  +        String actualName = null;
  +        String actualValue = null;
  +        HashMap values = new HashMap();
  +        for (int i = 0; i < attributes.getLength(); i++) {
  +            String name = attributes.getLocalName(i);
  +            if ("".equals(name)) {
                   name = attributes.getQName(i);
  -	    String value = attributes.getValue(i);
  -	    if (name.equals(this.name))
  -		actualName = value;
  -	    else if (name.equals(this.value))
  -		actualValue = value;
  -	}
  -	values.put(actualName, actualValue);
  -
  -	// Populate the corresponding property of the top object
  -	Object top = digester.peek();
  -	if (digester.log.isDebugEnabled())
  -	    digester.log.debug("Set " + top.getClass().getName() + " property " +
  -			 actualName + " to " + actualValue);
  -	BeanUtils.populate(top, values);
  +            }
  +            String value = attributes.getValue(i);
  +            if (name.equals(this.name)) {
  +                actualName = value;
  +            } else if (name.equals(this.value)) {
  +                actualValue = value;
  +            }
  +        }
  +        values.put(actualName, actualValue);
  +
  +        // Populate the corresponding property of the top object
  +        Object top = digester.peek();
  +        if (digester.log.isDebugEnabled()) {
  +            digester.log.debug("Set " + top.getClass().getName() + " property " +
  +                    actualName + " to " + actualValue);
  +        }
  +        BeanUtils.populate(top, values);
   
       }
   
  
  
  
  1.10      +27 -24    jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java
  
  Index: SetTopRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SetTopRule.java	4 Jan 2002 05:32:11 -0000	1.9
  +++ SetTopRule.java	9 Jan 2002 20:22:49 -0000	1.10
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v 1.9 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v 1.10 2002/01/09 20:22:49 sanders Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/01/09 20:22:49 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,6 +65,7 @@
   
   import java.lang.ClassLoader;
   import java.lang.reflect.Method;
  +
   import org.xml.sax.Attributes;
   import org.apache.commons.beanutils.MethodUtils;
   
  @@ -75,7 +76,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.9 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.10 $ $Date: 2002/01/09 20:22:49 $
    */
   
   public class SetTopRule extends Rule {
  @@ -94,7 +95,7 @@
        */
       public SetTopRule(Digester digester, String methodName) {
   
  -	this(digester, methodName, null);
  +        this(digester, methodName, null);
   
       }
   
  @@ -110,11 +111,11 @@
        *  for a <code>boolean</code> parameter)
        */
       public SetTopRule(Digester digester, String methodName,
  -                         String paramType) {
  +                      String paramType) {
   
  -	super(digester);
  -	this.methodName = methodName;
  -	this.paramType = paramType;
  +        super(digester);
  +        this.methodName = methodName;
  +        this.paramType = paramType;
   
       }
   
  @@ -142,27 +143,29 @@
        */
       public void end() throws Exception {
   
  -	// Identify the objects to be used
  -	Object child = digester.peek(1);
  -	Object parent = digester.peek(0);
  -	if (digester.log.isDebugEnabled()) {
  -            if (parent == null)
  +        // Identify the objects to be used
  +        Object child = digester.peek(1);
  +        Object parent = digester.peek(0);
  +        if (digester.log.isDebugEnabled()) {
  +            if (parent == null) {
                   digester.log.debug("Call [NULL PARENT]." +
  -                             methodName + "(" + child + ")");
  -            else
  +                        methodName + "(" + child + ")");
  +            } else {
                   digester.log.debug("Call " + parent.getClass().getName() + "." +
  -                             methodName + "(" + child + ")");
  +                        methodName + "(" + child + ")");
  +            }
           }
   
  -	// Call the specified method
  -	Class paramTypes[] = new Class[1];
  -	if (paramType != null)
  +        // Call the specified method
  +        Class paramTypes[] = new Class[1];
  +        if (paramType != null) {
               paramTypes[0] =
  -                digester.getClassLoader().loadClass(paramType);
  -        else
  +                    digester.getClassLoader().loadClass(paramType);
  +        } else {
               paramTypes[0] = child.getClass();
  +        }
           MethodUtils.invokeExactMethod(parent, methodName,
  -                                      new Object[] { child }, paramTypes);
  +                new Object[]{ child }, paramTypes);
   
       }
   
  
  
  
  1.3       +9 -8      jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Channel.java
  
  Index: Channel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Channel.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Channel.java	14 Sep 2001 19:22:52 -0000	1.2
  +++ Channel.java	9 Jan 2002 20:22:50 -0000	1.3
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Channel.java,v 1.2 2001/09/14 19:22:52 husted Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/09/14 19:22:52 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Channel.java,v 1.3 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -79,7 +79,7 @@
    *
    * @author Craig R. McClanahan
    * @author Ted Husted
  - * @version $Revision: 1.2 $ $Date: 2001/09/14 19:22:52 $
  + * @version $Revision: 1.3 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class Channel {
  @@ -467,13 +467,14 @@
        *  is not supported
        */
       public void render(OutputStream stream, String encoding)
  -        throws UnsupportedEncodingException {
  +            throws UnsupportedEncodingException {
   
           PrintWriter pw = null;
  -        if (encoding == null)
  +        if (encoding == null) {
               pw = new PrintWriter(stream);
  -        else
  +        } else {
               pw = new PrintWriter(new OutputStreamWriter(stream, encoding));
  +        }
           render(pw, encoding);
           pw.flush();
   
  
  
  
  1.2       +4 -4      jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Image.java
  
  Index: Image.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Image.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Image.java	22 May 2001 02:55:03 -0000	1.1
  +++ Image.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Image.java,v 1.1 2001/05/22 02:55:03 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/05/22 02:55:03 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Image.java,v 1.2 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -72,7 +72,7 @@
    * to further specialize its behavior.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/05/22 02:55:03 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class Image {
  
  
  
  1.2       +4 -4      jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Item.java
  
  Index: Item.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Item.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Item.java	22 May 2001 02:55:03 -0000	1.1
  +++ Item.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Item.java,v 1.1 2001/05/22 02:55:03 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/05/22 02:55:03 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/Item.java,v 1.2 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -72,7 +72,7 @@
    * to further specialize its behavior.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/05/22 02:55:03 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class Item {
  
  
  
  1.3       +22 -18    jakarta-commons/digester/src/java/org/apache/commons/digester/rss/RSSDigester.java
  
  Index: RSSDigester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/RSSDigester.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RSSDigester.java	4 Jan 2002 05:32:11 -0000	1.2
  +++ RSSDigester.java	9 Jan 2002 20:22:50 -0000	1.3
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/RSSDigester.java,v 1.2 2002/01/04 05:32:11 sanders Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/01/04 05:32:11 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/RSSDigester.java,v 1.3 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -67,6 +67,7 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.net.URL;
  +
   import org.apache.commons.digester.Digester;
   import org.apache.commons.logging.LogSource;
   import org.xml.sax.InputSource;
  @@ -87,7 +88,7 @@
    * example of using these classes.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2002/01/04 05:32:11 $
  + * @version $Revision: 1.3 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class RSSDigester extends Digester {
  @@ -171,7 +172,7 @@
        * implementation class.
        */
       protected String textInputClass =
  -        "org.apache.commons.digester.rss.TextInput";
  +            "org.apache.commons.digester.rss.TextInput";
   
       public String getTextInputClass() {
           return (this.textInputClass);
  @@ -268,14 +269,16 @@
        */
       protected void configure() {
   
  -        if (configured)
  +        if (configured) {
               return;
  +        }
   
           // Register local copies of the DTDs we understand
           for (int i = 0; i < registrations.length; i += 2) {
  -            URL url = this.getClass().getResource(registrations[i+1]);
  -            if (url != null)
  +            URL url = this.getClass().getResource(registrations[i + 1]);
  +            if (url != null) {
                   register(registrations[i], url.toString());
  +            }
           }
   
           // FIXME - validate the "version" attribute of the rss element?
  @@ -299,20 +302,20 @@
           // Add the rules for the Image object
           addObjectCreate("rss/channel/image", imageClass);
           addSetNext("rss/channel/image", "setImage",
  -                   "org.apache.commons.digester.rss.Image");
  +                "org.apache.commons.digester.rss.Image");
           addCallMethod("rss/channel/image/description", "setDescription", 0);
           addCallMethod("rss/channel/image/height", "setHeight", 0,
  -                      new Class[] { Integer.TYPE });
  +                new Class[]{ Integer.TYPE });
           addCallMethod("rss/channel/image/link", "setLink", 0);
           addCallMethod("rss/channel/image/title", "setTitle", 0);
           addCallMethod("rss/channel/image/url", "setURL", 0);
           addCallMethod("rss/channel/image/width", "setWidth", 0,
  -                      new Class[] { Integer.TYPE });
  +                new Class[]{ Integer.TYPE });
   
           // Add the rules for the Item object
           addObjectCreate("rss/channel/item", itemClass);
           addSetNext("rss/channel/item", "addItem",
  -                   "org.apache.commons.digester.rss.Item");
  +                "org.apache.commons.digester.rss.Item");
           addCallMethod("rss/channel/item/description", "setDescription", 0);
           addCallMethod("rss/channel/item/link", "setLink", 0);
           addCallMethod("rss/channel/item/title", "setTitle", 0);
  @@ -320,9 +323,9 @@
           // Add the rules for the TextInput object
           addObjectCreate("rss/channel/textinput", textInputClass);
           addSetNext("rss/channel/textinput", "setTextInput",
  -                   "org.apache.commons.digester.rss.TextInput");
  +                "org.apache.commons.digester.rss.TextInput");
           addCallMethod("rss/channel/textinput/description",
  -                      "setDescription", 0);
  +                "setDescription", 0);
           addCallMethod("rss/channel/textinput/link", "setLink", 0);
           addCallMethod("rss/channel/textinput/name", "setName", 0);
           addCallMethod("rss/channel/textinput/title", "setTitle", 0);
  @@ -348,11 +351,12 @@
               System.out.println("RSSDigester Test Program");
               System.out.println("Opening input stream ...");
               InputStream is = RSSDigester.class.getResourceAsStream
  -                ("/org/apache/commons/digester/rss/rss-example.xml");
  +                    ("/org/apache/commons/digester/rss/rss-example.xml");
               System.out.println("Creating new digester ...");
               RSSDigester digester = new RSSDigester();
  -            if ((args.length > 0) && (args[0].equals("-debug")))
  +            if ((args.length > 0) && (args[0].equals("-debug"))) {
                   digester.setLogger(LogSource.getInstance("RSSDigester"));
  +            }
               System.out.println("Parsing input stream ...");
               Channel channel = (Channel) digester.parse(is);
               System.out.println("Closing input stream ...");
  @@ -367,4 +371,4 @@
       }
   
   
  - }
  +}
  
  
  
  1.2       +4 -4      jakarta-commons/digester/src/java/org/apache/commons/digester/rss/TextInput.java
  
  Index: TextInput.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/TextInput.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TextInput.java	22 May 2001 02:55:03 -0000	1.1
  +++ TextInput.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/TextInput.java,v 1.1 2001/05/22 02:55:03 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/05/22 02:55:03 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/rss/TextInput.java,v 1.2 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -72,7 +72,7 @@
    * to further specialize its behavior.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/05/22 02:55:03 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class TextInput {
  
  
  
  1.2       +3 -3      jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/CircularIncludeException.java
  
  Index: CircularIncludeException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/CircularIncludeException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CircularIncludeException.java	4 Dec 2001 19:52:00 -0000	1.1
  +++ CircularIncludeException.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -60,7 +60,7 @@
   
   
   /**
  - * Thrown when parsing XML into Digester rules, if a circular inclusion occurred 
  + * Thrown when parsing XML into Digester rules, if a circular inclusion occurred
    * in the xml digester rules files.
    *
    * @author David H. Martin - Initial Contribution
  @@ -70,7 +70,7 @@
   public class CircularIncludeException extends XmlLoadException {
   
       /**
  -     * @param fileName the name of the XML file suspected of causing the 
  +     * @param fileName the name of the XML file suspected of causing the
        * circular inclusion
        */
       public CircularIncludeException(String fileName) {
  
  
  
  1.2       +22 -21    jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterLoader.java
  
  Index: DigesterLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DigesterLoader.java	4 Dec 2001 19:50:05 -0000	1.1
  +++ DigesterLoader.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -62,6 +62,7 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.net.URL;
  +
   import org.apache.commons.digester.RuleSet;
   import org.apache.commons.digester.Digester;
   import org.xml.sax.SAXException;
  @@ -76,7 +77,7 @@
    */
   
   public class DigesterLoader {
  -    
  +
       /**
        * Creates a new digester and initializes it from the specified XML file
        * @param rulesXml URL to the XML file defining the digester rules
  @@ -92,7 +93,7 @@
       /**
        * Given the digester rules XML file, a class loader, and an XML input file,
        * this method parses the input file into Java objects. The class loader
  -     * is used by the digester to create the Java objects. 
  +     * is used by the digester to create the Java objects.
        * @param digesterRules URL to the XML document defining the digester rules
        * @param classLoader the ClassLoader to register with the digester
        * @param fileURL URL to the XML file to parse into Java objects
  @@ -100,14 +101,14 @@
        * created by digesting fileURL
        */
       public static Object load(URL digesterRules, ClassLoader classLoader,
  -    URL fileURL) throws IOException, SAXException, DigesterLoadingException {
  +                              URL fileURL) throws IOException, SAXException, DigesterLoadingException {
           return load(digesterRules, classLoader, fileURL.openStream());
       }
  -    
  +
       /**
        * Given the digester rules XML file, a class loader, and an input stream,
        * this method parses the input into Java objects. The class loader
  -     * is used by the digester to create the Java objects. 
  +     * is used by the digester to create the Java objects.
        * @param digesterRules URL to the XML document defining the digester rules
        * @param classLoader the ClassLoader to register with the digester
        * @param input InputStream over the XML file to parse into Java objects
  @@ -115,43 +116,43 @@
        * created by digesting fileURL
        */
       public static Object load(URL digesterRules, ClassLoader classLoader,
  -    InputStream input) throws IOException, SAXException, DigesterLoadingException {
  +                              InputStream input) throws IOException, SAXException, DigesterLoadingException {
           Digester digester = createDigester(digesterRules);
           digester.setClassLoader(classLoader);
           try {
               return digester.parse(input);
           } catch (XmlLoadException ex) {
  -            // This is a runtime exception that can be thrown by 
  -            // FromXmlRuleSet#addRuleInstances, which is called by the Digester 
  +            // This is a runtime exception that can be thrown by
  +            // FromXmlRuleSet#addRuleInstances, which is called by the Digester
               // before it parses the file.
               throw new DigesterLoadingException(ex.getMessage(), ex);
           }
       }
  -    
  +
   
       /**
        * Given the digester rules XML file, a class loader, and an XML input file,
        * this method parses the input file into Java objects. The class loader
  -     * is used by the digester to create the Java objects. 
  +     * is used by the digester to create the Java objects.
        * @param digesterRules URL to the XML document defining the digester rules
        * @param classLoader the ClassLoader to register with the digester
        * @param fileURL URL to the XML file to parse into Java objects
        * @param rootObject an Object to push onto the digester's stack, prior
        * to parsing the input
  -     * @return an Object which is the root of the network of Java objects. 
  +     * @return an Object which is the root of the network of Java objects.
        * Usually, this will be the same object as rootObject
        * created by digesting fileURL
        */
       public static Object load(URL digesterRules, ClassLoader classLoader,
  -    URL fileURL, Object rootObject)  throws IOException, SAXException, 
  -    DigesterLoadingException {
  +                              URL fileURL, Object rootObject) throws IOException, SAXException,
  +            DigesterLoadingException {
           return load(digesterRules, classLoader, fileURL.openStream(), rootObject);
       }
  -    
  +
       /**
        * Given the digester rules XML file, a class loader, and an input stream,
        * this method parses the input into Java objects. The class loader
  -     * is used by the digester to create the Java objects. 
  +     * is used by the digester to create the Java objects.
        * @param digesterRules URL to the XML document defining the digester rules
        * @param classLoader the ClassLoader to register with the digester
        * @param input InputStream over the XML file to parse into Java objects
  @@ -161,19 +162,19 @@
        * created by digesting fileURL
        */
       public static Object load(URL digesterRules, ClassLoader classLoader,
  -    InputStream input, Object rootObject)  throws IOException, SAXException, 
  -    DigesterLoadingException {
  +                              InputStream input, Object rootObject) throws IOException, SAXException,
  +            DigesterLoadingException {
           Digester digester = createDigester(digesterRules);
           digester.setClassLoader(classLoader);
           digester.push(rootObject);
           try {
               return digester.parse(input);
           } catch (XmlLoadException ex) {
  -            // This is a runtime exception that can be thrown by 
  -            // FromXmlRuleSet#addRuleInstances, which is called by the Digester 
  +            // This is a runtime exception that can be thrown by
  +            // FromXmlRuleSet#addRuleInstances, which is called by the Digester
               // before it parses the file.
               throw new DigesterLoadingException(ex.getMessage(), ex);
           }
       }
  -    
  +
   }
  
  
  
  1.2       +3 -3      jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterLoadingException.java
  
  Index: DigesterLoadingException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterLoadingException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DigesterLoadingException.java	4 Dec 2001 19:52:00 -0000	1.1
  +++ DigesterLoadingException.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -78,7 +78,7 @@
       }
   
       /**
  -     * @param cause underlying exception that caused this to be thrown 
  +     * @param cause underlying exception that caused this to be thrown
        */
       public DigesterLoadingException(Throwable cause) {
           this(cause.getMessage());
  @@ -87,7 +87,7 @@
   
       /**
        * @param msg a String detailing the reason for the exception
  -     * @param cause underlying exception that caused this to be thrown 
  +     * @param cause underlying exception that caused this to be thrown
        */
       public DigesterLoadingException(String msg, Throwable cause) {
           this(msg);
  
  
  
  1.3       +68 -71    jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterRuleParser.java
  
  Index: DigesterRuleParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterRuleParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DigesterRuleParser.java	4 Jan 2002 05:32:11 -0000	1.2
  +++ DigesterRuleParser.java	9 Jan 2002 20:22:50 -0000	1.3
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -66,6 +66,7 @@
   import java.util.HashSet;
   import java.util.List;
   import java.util.Set;
  +
   import org.apache.commons.collections.ArrayStack;
   import org.apache.commons.digester.*;
   import org.xml.sax.Attributes;
  @@ -82,17 +83,17 @@
   
   public class DigesterRuleParser extends RuleSetBase {
   
  -    public static final String  DIGESTER_PUBLIC_ID = "-//Jakarta Apache //DTD digester-rules XML V1.0//EN";
  +    public static final String DIGESTER_PUBLIC_ID = "-//Jakarta Apache //DTD digester-rules XML V1.0//EN";
   
       /**
        * path to the DTD
        */
       private String digesterDtdUrl;
  -    
  +
       /**
        * This is the digester to which we are adding the rules that we parse
        * from the Rules XML document.
  -     */    
  +     */
       protected Digester targetDigester;
   
   
  @@ -115,7 +116,7 @@
               return str.toString();
           }
       }
  -    
  +
       /**
        * A stack used to maintain the current pattern. The Rules XML document
        * type allows nesting of patterns. If an element defines a matching
  @@ -136,7 +137,7 @@
       public DigesterRuleParser() {
           patternStack = new PatternStack();
       }
  -    
  +
       /**
        * Constructs a rule set for converting XML digester rule descriptions
        * into Rule objects, and adding them to the given Digester
  @@ -158,12 +159,12 @@
        * to any pattern parsed by this rule set.
        */
       private DigesterRuleParser(Digester targetDigester,
  -        PatternStack stack, Set includedFiles) {
  +                               PatternStack stack, Set includedFiles) {
           this.targetDigester = targetDigester;
           patternStack = stack;
           this.includedFiles = includedFiles;
       }
  -    
  +
       /**
        * Sets the digester into which to add the parsed rules
        * @param d the Digester to add the rules to
  @@ -171,7 +172,7 @@
       public void setTarget(Digester d) {
           targetDigester = d;
       }
  -    
  +
       /**
        * Sets the location of the digester rules DTD. This is the DTD used
        * to validate the rules XML file.
  @@ -179,18 +180,18 @@
       public void setDigesterRulesDTD(String dtdURL) {
           digesterDtdUrl = dtdURL;
       }
  -    
  +
       /**
        * Returns the location of the DTD used to validate the digester rules
        * XML document.
        */
       protected String getDigesterRulesDTD() {
           //ClassLoader classLoader = getClass().getClassLoader();
  -	//URL url = classLoader.getResource(DIGESTER_DTD_PATH);
  +        //URL url = classLoader.getResource(DIGESTER_DTD_PATH);
           //return url.toString();
           return digesterDtdUrl;
       }
  -        
  +
       /**
        * Adds a rule the the target digester. After a rule has been created by
        * parsing the XML, it is added to the digester by calling this method.
  @@ -201,23 +202,23 @@
       public void add(Rule rule) {
           targetDigester.addRule(patternStack.toString(), rule);
       }
  -    
  +
   
       /**
  -     * Add to the given digester the set of Rule instances used to parse an XML 
  +     * Add to the given digester the set of Rule instances used to parse an XML
        * document defining Digester rules. When the digester parses an XML file,
  -     * it will add the resulting rules & patterns to the 'target digester' 
  +     * it will add the resulting rules & patterns to the 'target digester'
        * that was passed in this RuleSet's constructor.<P>
        * If you extend this class to support additional rules, your implementation
  -     * should of this method should call this implementation first: i.e. 
  +     * should of this method should call this implementation first: i.e.
        * <code>super.addRuleInstances(digester);</code>
        */
       public void addRuleInstances(Digester digester) {
           final String ruleClassName = Rule.class.getName();
           digester.register(DIGESTER_PUBLIC_ID, getDigesterRulesDTD());
  -        
  +
           digester.addRule("*/pattern", new PatternRule(digester, "value"));
  -        
  +
           digester.addRule("*/include", new IncludeRule(digester));
   
           digester.addFactoryCreate("*/call-method-rule", new CallMethodRuleFactory());
  @@ -249,8 +250,7 @@
           digester.addSetNext("*/set-next-rule", "add", ruleClassName);
       }
   
  -    
  -    
  +
       /**
        * A rule for extracting the pattern matching strings from the rules XML.
        * In the digester-rules document type, a pattern can either be declared
  @@ -260,10 +260,10 @@
        * element.
        */
       private class PatternRule extends Rule {
  -	
  +
           private String attrName;
           private String pattern = null;
  -        
  +
           /**
            * @param digester the Digester used to parse the rules XML file
            * @param attrName The name of the attribute containing the pattern
  @@ -274,33 +274,33 @@
           }
   
           /**
  -         * If a pattern is defined for the attribute, push it onto the 
  +         * If a pattern is defined for the attribute, push it onto the
            * pattern stack.
            */
  -	public void begin(Attributes attributes) {
  +        public void begin(Attributes attributes) {
               pattern = attributes.getValue(attrName);
               if (pattern != null) {
                   patternStack.push(pattern);
               }
  -	}
  +        }
   
           /**
            * If there was a pattern for this element, pop it off the pattern
            * stack.
            */
  -	public void end() {
  +        public void end() {
               if (pattern != null) {
                   patternStack.pop();
               }
  -	}
  +        }
       }
  -	
  +
       /**
        * A rule for including one rules XML file within another. Included files
        * behave as if they are 'macro-expanded' within the includer. This means
        * that the values of the pattern stack are prefixed to every pattern
        * in the included rules. <p>This rule will detect 'circular' includes,
  -     * which would result in infinite recursion. It throws a 
  +     * which would result in infinite recursion. It throws a
        * CircularIncludeException when a cycle is detected, which will terminate
        * the parse.
        */
  @@ -308,7 +308,7 @@
           public IncludeRule(Digester digester) {
               super(digester);
           }
  -        
  +
           /**
            * To include a rules xml file, we instantiate another Digester, and
            * another DigesterRulesRuleSet. We pass the
  @@ -321,7 +321,7 @@
               if (fileName != null && fileName.length() > 0) {
                   includeXMLRules(fileName);
               }
  -            
  +
               // The class attribute gives the name of a class that implements
               // the DigesterRulesSource interface
               String className = attributes.getValue("class");
  @@ -329,13 +329,13 @@
                   includeProgrammaticRules(className);
               }
           }
  -        
  +
           /**
            * Creates another DigesterRuleParser, and uses it to extract the rules
            * out of the give XML file. The contents of the current pattern stack
            * will be prepended to all of the pattern strings parsed from the file.
            */
  -        private void includeXMLRules(String fileName) 
  +        private void includeXMLRules(String fileName)
                   throws IOException, SAXException, CircularIncludeException {
               URL fileURL = DigesterRuleParser.this.getClass().getClassLoader().getResource(fileName);
               if (fileURL == null) {
  @@ -356,7 +356,7 @@
               digester.parse(fileName);
               includedFiles.remove(fileName);
           }
  -        
  +
           /**
            * Creates an instance of the indicated class. The class must implement
            * the DigesterRulesSource interface. Passes the target digester to
  @@ -365,18 +365,18 @@
            * will be automatically prepended to all of the pattern strings added
            * by the DigesterRulesSource instance.
            */
  -        private void includeProgrammaticRules(String className) 
  -                throws ClassNotFoundException, ClassCastException, 
  +        private void includeProgrammaticRules(String className)
  +                throws ClassNotFoundException, ClassCastException,
                   InstantiationException, IllegalAccessException {
  -                    
  +
               Class cls = Class.forName(className);
  -            DigesterRulesSource rulesSource = (DigesterRulesSource)cls.newInstance();
  -            
  +            DigesterRulesSource rulesSource = (DigesterRulesSource) cls.newInstance();
  +
               // wrap the digester's Rules object, to prepend pattern
               Rules digesterRules = targetDigester.getRules();
  -            Rules prefixWrapper = 
  +            Rules prefixWrapper =
                       new RulesPrefixAdapter(patternStack.toString(), digesterRules);
  -            
  +
               targetDigester.setRules(prefixWrapper);
               try {
                   rulesSource.getRules(targetDigester);
  @@ -385,20 +385,20 @@
                   targetDigester.setRules(digesterRules);
               }
           }
  -        
  +
       }
  -    
  -    
  +
  +
       /**
        * Wraps a Rules object. Delegates all the Rules interface methods
        * to the underlying Rules object. Overrides the add method to prepend
        * a prefix to the pattern string.
        */
       private class RulesPrefixAdapter implements Rules {
  -    
  +
           private Rules delegate;
           private String prefix;
  -       
  +
           /**
            * @param patternPrefix the pattern string to prepend to the pattern
            * passed to the add method.
  @@ -409,7 +409,7 @@
               prefix = patternPrefix;
               delegate = rules;
           }
  -        
  +
           /**
            * Register a new Rule instance matching a pattern which is constructed
            * by concatenating the pattern prefix with the given pattern.
  @@ -417,56 +417,56 @@
           public void add(String pattern, Rule rule) {
               delegate.add(prefix + pattern, rule);
           }
  -        
  +
           /**
            * This method passes through to the underlying Rules object.
            */
           public void clear() {
               delegate.clear();
           }
  -        
  +
           /**
            * This method passes through to the underlying Rules object.
            */
           public Digester getDigester() {
               return delegate.getDigester();
           }
  -        
  +
           /**
            * This method passes through to the underlying Rules object.
            */
           public String getNamespaceURI() {
               return delegate.getNamespaceURI();
           }
  -        
  +
           /**
            * @deprecated Call match(namespaceURI,pattern) instead.
            */
           public List match(String pattern) {
               return delegate.match(pattern);
           }
  -        
  +
           /**
            * This method passes through to the underlying Rules object.
            */
           public List match(String namespaceURI, String pattern) {
               return delegate.match(namespaceURI, pattern);
           }
  -        
  +
           /**
            * This method passes through to the underlying Rules object.
            */
           public List rules() {
               return delegate.rules();
           }
  -        
  +
           /**
            * This method passes through to the underlying Rules object.
            */
           public void setDigester(Digester digester) {
               delegate.setDigester(digester);
           }
  -        
  +
           /**
            * This method passes through to the underlying Rules object.
            */
  @@ -474,13 +474,13 @@
               delegate.setNamespaceURI(namespaceURI);
           }
       }
  -    
  -    
  +
  +
       ///////////////////////////////////////////////////////////////////////
       // Classes beyond this point are ObjectCreationFactory implementations,
       // used to create Rule objects and initialize them from SAX attributes.
       ///////////////////////////////////////////////////////////////////////
  -    
  +
       /**
        * Factory for creating a CallMethodRule.
        */
  @@ -489,7 +489,7 @@
               int paramCount = Integer.parseInt(attributes.getValue("paramcount"));
               String methodName = attributes.getValue("methodname");
               Rule callMethodRule = new CallMethodRule(digester, methodName,
  -                                                     paramCount);
  +                    paramCount);
               return callMethodRule;
           }
       }
  @@ -504,7 +504,7 @@
               int paramNumber = Integer.parseInt(attributes.getValue("paramnumber"));
               String methodName = attributes.getValue("attrname");
               Rule callMethodRule = new CallMethodRule(targetDigester, methodName,
  -                                                     paramNumber);
  +                    paramNumber);
               return callMethodRule;
           }
       }
  @@ -517,9 +517,9 @@
               String className = attributes.getValue("classname");
               String attrName = attributes.getValue("attrname");
               return (attrName == null || attrName.length() == 0) ?
  -                new FactoryCreateRule(targetDigester, className)
  +                    new FactoryCreateRule(targetDigester, className)
                       :
  -                new FactoryCreateRule(targetDigester, className, attrName);
  +                    new FactoryCreateRule(targetDigester, className, attrName);
           }
       }
   
  @@ -531,9 +531,9 @@
               String className = attributes.getValue("classname");
               String attrName = attributes.getValue("attrname");
               return (attrName == null || attrName.length() == 0) ?
  -                new ObjectCreateRule(targetDigester, className)
  +                    new ObjectCreateRule(targetDigester, className)
                       :
  -                new ObjectCreateRule(targetDigester, className, attrName);
  +                    new ObjectCreateRule(targetDigester, className, attrName);
           }
       }
   
  @@ -565,9 +565,9 @@
               String methodName = attributes.getValue("methodname");
               String paramType = attributes.getValue("paramtype");
               return (paramType == null || paramType.length() == 0) ?
  -                new SetTopRule(targetDigester, methodName)
  +                    new SetTopRule(targetDigester, methodName)
                       :
  -                new SetTopRule(targetDigester, methodName, paramType);
  +                    new SetTopRule(targetDigester, methodName, paramType);
           }
       }
   
  @@ -579,14 +579,11 @@
               String methodName = attributes.getValue("methodname");
               String paramType = attributes.getValue("paramtype");
               return (paramType == null || paramType.length() == 0) ?
  -                new SetNextRule(targetDigester, methodName)
  +                    new SetNextRule(targetDigester, methodName)
                       :
  -                new SetNextRule(targetDigester, methodName, paramType);
  +                    new SetNextRule(targetDigester, methodName, paramType);
           }
       }
  -
  -    
  -
   
   
   }
  
  
  
  1.2       +2 -2      jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterRulesSource.java
  
  Index: DigesterRulesSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/DigesterRulesSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DigesterRulesSource.java	4 Dec 2001 19:51:05 -0000	1.1
  +++ DigesterRulesSource.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -77,6 +77,6 @@
        * @param digester the Digester to add the new Rule objects to
        */
       void getRules(Digester digester);
  -    
  +
   }
   
  
  
  
  1.3       +8 -7      jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/FromXmlRuleSet.java
  
  Index: FromXmlRuleSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/FromXmlRuleSet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FromXmlRuleSet.java	4 Jan 2002 05:32:11 -0000	1.2
  +++ FromXmlRuleSet.java	9 Jan 2002 20:22:50 -0000	1.3
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -72,6 +72,7 @@
   import java.util.Map;
   import java.util.Set;
   import java.util.Stack;
  +
   import org.apache.commons.digester.Digester;
   import org.apache.commons.digester.RuleSetBase;
   import org.xml.sax.InputSource;
  @@ -96,7 +97,7 @@
        * The rule set for parsing the Digester rules
        */
       private DigesterRuleParser parser;
  -    
  +
       /**
        * Constructs a FromXmlRuleSet using the default DigesterRuleParser
        * @param rulesXml the path to the XML document defining the Digester rules
  @@ -113,21 +114,21 @@
           xmlRules = rulesXml;
           this.parser = parser;
       }
  -    
  +
       /**
        * Adds to the digester the set of Rule instances defined in the
  -     * XML file for this rule set.  
  +     * XML file for this rule set.
        * @see org.apache.commons.digester.RuleSetBase
        */
       public void addRuleInstances(org.apache.commons.digester.Digester digester) throws XmlLoadException {
           URL dtdURL = getClass().getClassLoader().getResource(DIGESTER_DTD_PATH);
           if (dtdURL == null) {
  -            throw new XmlLoadException("Cannot find resource \"" + 
  -                DIGESTER_DTD_PATH + "\"");
  +            throw new XmlLoadException("Cannot find resource \"" +
  +                    DIGESTER_DTD_PATH + "\"");
           }
           parser.setDigesterRulesDTD(dtdURL.toString());
           parser.setTarget(digester);
  -        
  +
           Digester rulesDigester = new Digester();
           rulesDigester.addRuleSet(parser);
           rulesDigester.push(parser);
  
  
  
  1.2       +1 -1      jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/XmlLoadException.java
  
  Index: XmlLoadException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/xmlrules/XmlLoadException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XmlLoadException.java	4 Dec 2001 19:52:00 -0000	1.1
  +++ XmlLoadException.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.2       +9 -9      jakarta-commons/digester/src/test/org/apache/commons/digester/Address.java
  
  Index: Address.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/Address.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Address.java	20 Aug 2001 21:59:43 -0000	1.1
  +++ Address.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/Address.java,v 1.1 2001/08/20 21:59:43 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/08/20 21:59:43 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/Address.java,v 1.2 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
  - * 
  + *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
    * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -57,7 +57,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - */ 
  + */
   
   package org.apache.commons.digester;
   
  
  
  
  1.3       +1 -1      jakarta-commons/digester/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java
  
  Index: BeanPropertySetterRuleTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/BeanPropertySetterRuleTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BeanPropertySetterRuleTestCase.java	8 Jan 2002 23:46:01 -0000	1.2
  +++ BeanPropertySetterRuleTestCase.java	9 Jan 2002 20:22:50 -0000	1.3
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.8       +5 -5      jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java
  
  Index: DigesterTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DigesterTestCase.java	8 Jan 2002 23:46:01 -0000	1.7
  +++ DigesterTestCase.java	9 Jan 2002 20:22:50 -0000	1.8
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java,v 1.7 2002/01/08 23:46:01 sanders Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/01/08 23:46:01 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/DigesterTestCase.java,v 1.8 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -83,7 +83,7 @@
    * </p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.7 $ $Date: 2002/01/08 23:46:01 $
  + * @version $Revision: 1.8 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class DigesterTestCase extends TestCase {
  
  
  
  1.2       +61 -61    jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java
  
  Index: EBRTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EBRTestCase.java	20 Sep 2001 20:42:04 -0000	1.1
  +++ EBRTestCase.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java,v 1.1 2001/09/20 20:42:04 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/09/20 20:42:04 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/EBRTestCase.java,v 1.2 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -74,7 +74,7 @@
    * <p> Runs standard tests for RulesBase as well as tests of extensions.
    *
    * @author Robert Burrell Donkin <robertdonkin@mac.com>
  - * @version $Revision: 1.1 $ $Date: 2001/09/20 20:42:04 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:50 $
    */
   
   
  @@ -96,16 +96,16 @@
   
       // -------------------------------------------------- Overall Test Methods
   
  -    /** 
  +    /**
        * <p> This should be overriden by subclasses.
        *
        * @return the matching rules to be tested.
        */
       protected Rules createMatchingRulesForTest() {
  -    
  +
           return new ExtendedBaseRules();
       }
  -    
  +
   
       /**
        * Return the tests included in this test suite.
  @@ -115,8 +115,8 @@
           return (new TestSuite(EBRTestCase.class));
   
       }
  -    
  -    
  +
  +
       /**
        * Basic test of parent matching rules.
        * A parent match matches any child of a particular kind of parent.
  @@ -138,54 +138,54 @@
           digester.addRule("*/beta/gamma/epsilon", new TestRule(digester, "wild_child"));
           digester.addRule("alpha/beta/gamma/?", new TestRule(digester, "exact_parent"));
           digester.addRule("*/beta/gamma/?", new TestRule(digester, "wild_parent"));
  -        
  -        
  +
  +
           List list=null;
           Iterator it=null;
  -         
  +
           // this should match just the exact since this has presidence
           list=digester.getRules().match(null,"alpha/beta/gamma/delta");
  -        
  +
           // all three rules should match
           assertEquals("Testing basic parent mismatch (A)",1,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing basic parent mismatch (B)","exact",((TestRule)it.next()).getIdentifier());
  - 
  - 
  +
  +
           // we don't have an exact match for this child so we should get the exact parent
           list=digester.getRules().match(null,"alpha/beta/gamma/epsilon");
  -        
  +
           // all three rules should match
           assertEquals("Testing basic parent mismatch (C)",1,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing basic parent mismatch (D)","exact_parent",((TestRule)it.next()).getIdentifier());
  - 
  - 
  +
  +
           // wild child overrides wild parent
           list=digester.getRules().match(null,"alpha/omega/beta/gamma/epsilon");
  -        
  +
           // all three rules should match
           assertEquals("Testing basic parent mismatch (E)",1,list.size());
  -        
  +
           it=list.iterator();
  -        assertEquals("Testing basic parent mismatch (F)","wild_child",((TestRule)it.next()).getIdentifier()); 
  +        assertEquals("Testing basic parent mismatch (F)","wild_child",((TestRule)it.next()).getIdentifier());
   
   
  -        // nothing else matches so return wild parent 
  +        // nothing else matches so return wild parent
           list=digester.getRules().match(null,"alpha/omega/beta/gamma/zeta");
  -        
  +
           // all three rules should match
           assertEquals("Testing basic parent mismatch (G)",1,list.size());
  -        
  +
           it=list.iterator();
  -        assertEquals("Testing basic parent mismatch (H)","wild_parent",((TestRule)it.next()).getIdentifier()); 
  +        assertEquals("Testing basic parent mismatch (H)","wild_parent",((TestRule)it.next()).getIdentifier());
  +
   
  -        
           // clean up
           digester.getRules().clear();
  -   
  +
       }
   
   
  @@ -212,27 +212,27 @@
           digester.addRule("alpha/epsilon/beta/gamma/zeta", new TestRule(digester, "exact3"));
           digester.addRule("*/gamma/?", new TestRule(digester, "non_wildhead_child"));
           digester.addRule("!*/epsilon/beta/gamma/?", new TestRule(digester, "universal_wildhead_child"));
  -        
  -        
  -        
  +
  +
  +
           List list=null;
           Iterator it=null;
  -         
  +
           // test universal wild head
           list=digester.getRules().match(null,"alpha/beta/gamma");
  -        
  +
           assertEquals("Testing universal wildcard mismatch (A)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing universal wildcard mismatch (B)","exact",((TestRule)it.next()).getIdentifier());
           assertEquals("Testing universal wildcard mismatch (C)","universal_wild_head",((TestRule)it.next()).getIdentifier());
  - 
  - 
  +
  +
           // test universal parent
           list=digester.getRules().match(null,"alpha/beta/gamma/epsilon");
   
           assertEquals("Testing universal wildcard mismatch (D)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing universal wildcard mismatch (E)","universal_wild_child",((TestRule)it.next()).getIdentifier());
           assertEquals("Testing universal wildcard mismatch (F)","exact2",((TestRule)it.next()).getIdentifier());
  @@ -241,7 +241,7 @@
           list=digester.getRules().match(null,"alpha/beta/gamma/zeta");
   
           assertEquals("Testing universal wildcard mismatch (G)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing universal wildcard mismatch (H)","universal_wild_child",((TestRule)it.next()).getIdentifier());
           assertEquals("Testing universal wildcard mismatch (I)","non_wild_child",((TestRule)it.next()).getIdentifier());
  @@ -251,7 +251,7 @@
           list=digester.getRules().match(null,"alpha/epsilon/beta/gamma/alpha");
   
           assertEquals("Testing universal wildcard mismatch (J)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing universal wildcard mismatch (K)","non_wildhead_child",((TestRule)it.next()).getIdentifier());
           assertEquals("Testing universal wildcard mismatch (L)","universal_wildhead_child",((TestRule)it.next()).getIdentifier());
  @@ -260,18 +260,18 @@
           list=digester.getRules().match(null,"alpha/epsilon/beta/gamma/zeta");
   
           assertEquals("Testing universal wildcard mismatch (M)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing universal wildcard mismatch (M)","exact3",((TestRule)it.next()).getIdentifier());
           assertEquals("Testing universal wildcard mismatch (O)","universal_wildhead_child",((TestRule)it.next()).getIdentifier());
   
  -        
  +
           // clean up
           digester.getRules().clear();
  -   
  +
       }
   
  -    
  +
       /**
        * Basic test of wild matches.
        * A universal will match matches anything!
  @@ -293,44 +293,44 @@
           digester.addRule("alpha/beta/gamma/delta", new TestRule(digester, "exact"));
           digester.addRule("*/beta/gamma/?", new TestRule(digester, "wild_parent"));
   
  -        
  +
           List list=null;
           Iterator it=null;
  -         
  +
           // The universal wild will always match whatever else does
           list=digester.getRules().match(null,"alpha/beta/gamma/delta");
  -        
  +
           // all three rules should match
           assertEquals("Testing wild mismatch (A)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing wild mismatch (B)","universal_wild",((TestRule)it.next()).getIdentifier());
           assertEquals("Testing wild mismatch (C)","exact",((TestRule)it.next()).getIdentifier());
  - 
  -         
  +
  +
           // The universal wild will always match whatever else does
           list=digester.getRules().match(null,"alpha/beta/gamma/epsilon");
  -        
  +
           assertEquals("Testing wild mismatch (D)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing wild mismatch (E)","universal_wild",((TestRule)it.next()).getIdentifier());
  -        assertEquals("Testing wild mismatch (F)","wild_parent",((TestRule)it.next()).getIdentifier()); 
  - 
  -         
  +        assertEquals("Testing wild mismatch (F)","wild_parent",((TestRule)it.next()).getIdentifier());
  +
  +
           // The universal wild will always match whatever else does
           // we have no other non-universal matching so this will match the non-universal wild as well
           list=digester.getRules().match(null,"alpha/gamma");
  -        
  +
           assertEquals("Testing wild mismatch (G)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Testing wild mismatch (H)","basic_wild",((TestRule)it.next()).getIdentifier());
  -        assertEquals("Testing wild mismatch (I)","universal_wild",((TestRule)it.next()).getIdentifier()); 
  -        
  -        
  +        assertEquals("Testing wild mismatch (I)","universal_wild",((TestRule)it.next()).getIdentifier());
  +
  +
           // clean up
           digester.getRules().clear();
  -   
  +
       }
   }
  
  
  
  1.2       +9 -9      jakarta-commons/digester/src/test/org/apache/commons/digester/Employee.java
  
  Index: Employee.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/Employee.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Employee.java	20 Aug 2001 21:59:43 -0000	1.1
  +++ Employee.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/Employee.java,v 1.1 2001/08/20 21:59:43 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/08/20 21:59:43 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/Employee.java,v 1.2 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
  - * 
  + *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
    * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -57,7 +57,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - */ 
  + */
   
   package org.apache.commons.digester;
   
  
  
  
  1.7       +5 -5      jakarta-commons/digester/src/test/org/apache/commons/digester/RuleTestCase.java
  
  Index: RuleTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RuleTestCase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RuleTestCase.java	4 Jan 2002 02:34:08 -0000	1.6
  +++ RuleTestCase.java	9 Jan 2002 20:22:50 -0000	1.7
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RuleTestCase.java,v 1.6 2002/01/04 02:34:08 sanders Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/01/04 02:34:08 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RuleTestCase.java,v 1.7 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -75,7 +75,7 @@
    * XML documents to exercise the built-in rules.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2002/01/04 02:34:08 $
  + * @version $Revision: 1.7 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class RuleTestCase extends TestCase {
  
  
  
  1.3       +29 -29    jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java
  
  Index: RulesBaseTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RulesBaseTestCase.java	5 Sep 2001 18:52:37 -0000	1.2
  +++ RulesBaseTestCase.java	9 Jan 2002 20:22:50 -0000	1.3
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java,v 1.2 2001/09/05 18:52:37 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/09/05 18:52:37 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/RulesBaseTestCase.java,v 1.3 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -87,7 +87,7 @@
    * </p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/09/05 18:52:37 $
  + * @version $Revision: 1.3 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class RulesBaseTestCase extends TestCase {
  @@ -112,7 +112,7 @@
       public RulesBaseTestCase(String name) {
   
           super(name);
  -        
  +
       }
   
   
  @@ -129,7 +129,7 @@
   
       }
   
  -    /** 
  +    /**
        * <p> This should be overriden by subclasses.
        *
        * @return the matching rules to be tested.
  @@ -169,7 +169,7 @@
   
           // clear any existing rules
           digester.getRules().clear();
  -        
  +
           // perform tests
           List list = null;
   
  @@ -190,7 +190,7 @@
   
           // clean up
           digester.getRules().clear();
  -        
  +
       }
   
       /**
  @@ -239,11 +239,11 @@
   
           // clean up
           digester.getRules().clear();
  -        
  +
       }
  -    
  +
       /**
  -     * Test basic matchings involving namespaces. 
  +     * Test basic matchings involving namespaces.
        */
       public void testBasicNamespaceMatching() {
   
  @@ -260,44 +260,44 @@
           digester.addRule("alpha/beta/gamma", new TestRule(digester, "No-Namespace"));
           digester.addRule("alpha/beta/gamma", new TestRule(digester, "Euclidean-Namespace","euclidean"));
   
  -        
  -        list=digester.getRules().rules();        
  +
  +        list=digester.getRules().rules();
   
           // test that matching null namespace brings back namespace and non-namespace rules
           list=digester.getRules().match(null,"alpha/beta/gamma");
  -        
  +
           assertEquals("Null namespace match (A)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Null namespace match (B)","No-Namespace",((TestRule)it.next()).getIdentifier());
           assertEquals("Null namespace match (C)","Euclidean-Namespace",((TestRule)it.next()).getIdentifier());
   
  -        
  +
   
           // test that matching euclid namespace brings back namespace and non-namespace rules
           list=digester.getRules().match("euclidean","alpha/beta/gamma");
  -        
  +
           assertEquals("Matching namespace match (A)",2,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Matching namespace match (B)","No-Namespace",((TestRule)it.next()).getIdentifier());
           assertEquals("Matching namespace match (C)","Euclidean-Namespace",((TestRule)it.next()).getIdentifier());
  -        
  -        
  -        
  +
  +
  +
           // test that matching another namespace brings back only non-namespace rule
           list=digester.getRules().match("hyperbolic","alpha/beta/gamma");
  -        
  +
           assertEquals("Non matching namespace match (A)",1,list.size());
  -        
  +
           it=list.iterator();
           assertEquals("Non matching namespace match (B)","No-Namespace",((TestRule)it.next()).getIdentifier());
   
           // clean up
           digester.getRules().clear();
  -        
  +
       }
  -    
  +
       /**
        * Rules must always be returned in the correct order.
        */
  @@ -316,9 +316,9 @@
   
           // test that rules are returned in set order
           List list=digester.getRules().match(null,"alpha/beta/gamma");
  -        
  +
           assertEquals("Testing ordering mismatch (A)",3,list.size());
  -        
  +
           Iterator it=list.iterator();
           assertEquals("Testing ordering mismatch (B)","one",((TestRule)it.next()).getIdentifier());
           assertEquals("Testing ordering mismatch (C)","two",((TestRule)it.next()).getIdentifier());
  @@ -326,6 +326,6 @@
   
           // clean up
           digester.getRules().clear();
  -        
  +
       }
   }
  
  
  
  1.2       +8 -8      jakarta-commons/digester/src/test/org/apache/commons/digester/SimpleTestBean.java
  
  Index: SimpleTestBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/SimpleTestBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleTestBean.java	14 Nov 2001 19:54:05 -0000	1.1
  +++ SimpleTestBean.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,9 +65,9 @@
   public class SimpleTestBean {
   
       private String alpha;
  -    
  +
       private String beta;
  -    
  +
       private String gamma;
   
       public String getAlpha()
  @@ -84,22 +84,22 @@
       {
           return beta;
       }
  -    
  +
       public void setBeta(String beta)
       {
           this.beta=beta;
       }
  -    
  +
       public String getGamma()
       {
           return gamma;
       }
  -    
  +
       public void setGamma(String gamma)
       {
           this.gamma=gamma;
       }
  -    
  +
       public String toString()
       {
           StringBuffer sb = new StringBuffer("[SimpleTestBean]");
  @@ -109,7 +109,7 @@
           sb.append(beta);
           sb.append(" gamma=");
           sb.append(gamma);
  -        
  +
           return sb.toString();
       }
   }
  
  
  
  1.2       +4 -4      jakarta-commons/digester/src/test/org/apache/commons/digester/TestBean.java
  
  Index: TestBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestBean.java	20 Aug 2001 21:59:43 -0000	1.1
  +++ TestBean.java	9 Jan 2002 20:22:50 -0000	1.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestBean.java,v 1.1 2001/08/20 21:59:43 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/08/20 21:59:43 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestBean.java,v 1.2 2002/01/09 20:22:50 sanders Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/09 20:22:50 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -67,7 +67,7 @@
    * General purpose test bean for Digester tests.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2001/08/20 21:59:43 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class TestBean {
  
  
  
  1.5       +7 -7      jakarta-commons/digester/src/test/org/apache/commons/digester/TestRule.java
  
  Index: TestRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestRule.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestRule.java	20 Nov 2001 00:37:25 -0000	1.4
  +++ TestRule.java	9 Jan 2002 20:22:50 -0000	1.5
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -69,13 +69,13 @@
    * at the identifier.</p>
    *
    * @author Robert Burrell Donkin
  - * @revision $Revision: 1.4 $ $Date: 2001/11/20 00:37:25 $
  + * @revision $Revision: 1.5 $ $Date: 2002/01/09 20:22:50 $
    */
   
   public class TestRule extends Rule {
   
       // ----------------------------------------------------- Instance Variables
  -    
  +
   
       /** String identifing this particular <code>TestRule</code> */
       private String identifier;
  @@ -101,7 +101,7 @@
   	super(digester);
           this.identifier=identifier;
       }
  -    
  +
   
       /**
        * Constructor sets namespace URI.
  @@ -119,7 +119,7 @@
           setNamespaceURI(namespaceURI);
   
       }
  -    
  +
   
       // ------------------------------------------------ Rule Implementation
   
  @@ -150,7 +150,7 @@
   
   
       // ------------------------------------------------ Methods
  -    
  +
   
       /**
        * If a list has been set, append this to the list.
  @@ -193,7 +193,7 @@
       }
   
   
  -    /** 
  +    /**
        * Return the identifier.
        */
       public String toString() {
  
  
  
  1.3       +5 -5      jakarta-commons/digester/src/test/org/apache/commons/digester/TestRuleSet.java
  
  Index: TestRuleSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestRuleSet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestRuleSet.java	4 Jan 2002 02:34:08 -0000	1.2
  +++ TestRuleSet.java	9 Jan 2002 20:22:51 -0000	1.3
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestRuleSet.java,v 1.2 2002/01/04 02:34:08 sanders Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/01/04 02:34:08 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/TestRuleSet.java,v 1.3 2002/01/09 20:22:51 sanders Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/01/09 20:22:51 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -68,7 +68,7 @@
    * optionally associated with a particular namespace URI.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2002/01/04 02:34:08 $
  + * @version $Revision: 1.3 $ $Date: 2002/01/09 20:22:51 $
    */
   
   public class TestRuleSet extends RuleSetBase {
  
  
  
  1.3       +10 -10    jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/DigesterLoaderTest.java
  
  Index: DigesterLoaderTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/DigesterLoaderTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DigesterLoaderTest.java	4 Jan 2002 05:32:11 -0000	1.2
  +++ DigesterLoaderTest.java	9 Jan 2002 20:22:51 -0000	1.3
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -76,21 +76,21 @@
    */
   
   public class DigesterLoaderTest extends TestCase {
  -    
  +
       public DigesterLoaderTest(java.lang.String testName) {
           super(testName);
       }
  -    
  +
       public static void main(java.lang.String[] args) {
           junit.textui.TestRunner.run(suite());
       }
  -    
  +
       public static junit.framework.Test suite() {
           TestSuite suite = new TestSuite(DigesterLoaderTestSuite.class);
   
           return suite;
       }
  -    
  +
       /**
        * Tests the DigesterLoader.createDigester(), with multiple
        * included rule sources: testrules.xml includes another rules xml
  @@ -107,7 +107,7 @@
           assertEquals(root.toString(), "[foo1 baz1 foo2, foo3 foo4]");
           //System.out.println(root);
       }
  -    
  +
       /**
        * Tests the DigesterLoader.load(), with multiple included rule
        * sources: testrules.xml includes another rules xml file, and
  @@ -125,7 +125,7 @@
           }
           assertEquals(root.toString(), "[foo1 baz1 foo2, foo3 foo4]");
       }
  -    
  +
       /**
        * The same as testLoad1, exception the input file is passed to
        * DigesterLoader as an InputStream instead of a URL.
  @@ -139,7 +139,7 @@
           }
           assertEquals(root.toString(), "[foo1 baz1 foo2, foo3 foo4]");
       }
  - 
  +
   
       /**
        * Validates that circular includes are detected and result in an exception
  @@ -153,6 +153,6 @@
           }
           fail("Creating a digester with circular rules should have thrown CircularIncludeException.");
       }
  -        
  -        
  +
  +
   }
  
  
  
  1.2       +1 -1      jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/DigesterLoaderTestSuite.java
  
  Index: DigesterLoaderTestSuite.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/DigesterLoaderTestSuite.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DigesterLoaderTestSuite.java	4 Dec 2001 19:48:47 -0000	1.1
  +++ DigesterLoaderTestSuite.java	9 Jan 2002 20:22:51 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.2       +3 -3      jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/DigesterPatternStackTest.java
  
  Index: DigesterPatternStackTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/DigesterPatternStackTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DigesterPatternStackTest.java	4 Dec 2001 19:48:47 -0000	1.1
  +++ DigesterPatternStackTest.java	9 Jan 2002 20:22:51 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -75,10 +75,10 @@
       public static void main(java.lang.String[] args) {
           junit.textui.TestRunner.run(suite());
       }
  -    
  +
       public static junit.framework.Test suite() {
           TestSuite suite = new TestSuite(DigesterPatternStackTest.class);
  -        
  +
           return suite;
       }
   
  
  
  
  1.2       +3 -3      jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/TestDigesterRulesSource.java
  
  Index: TestDigesterRulesSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/TestDigesterRulesSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestDigesterRulesSource.java	4 Dec 2001 19:48:47 -0000	1.1
  +++ TestDigesterRulesSource.java	9 Jan 2002 20:22:51 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -63,7 +63,7 @@
   
   
   /**
  - * A test class, for validating FromXmlRuleSet's ability to 'include' 
  + * A test class, for validating FromXmlRuleSet's ability to 'include'
    * programmatically-created rules from within an XML rules file.
    *
    * @author David H. Martin - Initial Contribution
  @@ -80,5 +80,5 @@
           digester.addSetNext("/baz", "add", "java.lang.Object");
           digester.addSetProperties("/baz");
       }
  -    
  +
   }
  
  
  
  1.2       +5 -5      jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/TestObject.java
  
  Index: TestObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/test/org/apache/commons/digester/xmlrules/TestObject.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestObject.java	4 Dec 2001 19:48:47 -0000	1.1
  +++ TestObject.java	9 Jan 2002 20:22:51 -0000	1.2
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -69,12 +69,12 @@
   
       private ArrayList children = new ArrayList();
       private String value = "";
  -    
  +
       public TestObject() {
       }
   
       private static int idx = 0;
  -    
  +
       public String toString() {
           String str = value;
           for (Iterator i = children.iterator(); i.hasNext(); ) {
  @@ -82,11 +82,11 @@
           }
           return str;
       }
  -    
  +
       public void add(Object o) {
           children.add(o);
       }
  -    
  +
       public void setValue(String val) {
           value = val;
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message