commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester SetNextRule.java SetTopRule.java
Date Wed, 14 Nov 2001 18:54:19 GMT
craigmcc    01/11/14 10:54:19

  Modified:    digester/src/java/org/apache/commons/digester
                        SetNextRule.java SetTopRule.java
  Log:
  Add some better debugging log messages when the parent is mistakenly
  missing in SetNextRule and SetTopRule.
  
  Revision  Changes    Path
  1.7       +12 -7     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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SetNextRule.java	2001/08/20 18:28:40	1.6
  +++ SetNextRule.java	2001/11/14 18:54:19	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v
1.6 2001/08/20 18:28:40 craigmcc Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/08/20 18:28:40 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetNextRule.java,v
1.7 2001/11/14 18:54:19 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/11/14 18:54:19 $
    *
    * ====================================================================
    *
  @@ -75,7 +75,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.6 $ $Date: 2001/08/20 18:28:40 $
  + * @version $Revision: 1.7 $ $Date: 2001/11/14 18:54:19 $
    */
   
   public class SetNextRule extends Rule {
  @@ -145,9 +145,14 @@
   	// Identify the objects to be used
   	Object child = digester.peek(0);
   	Object parent = digester.peek(1);
  -	if (digester.getDebug() >= 1)
  -	    digester.log("Call " + parent.getClass().getName() + "." +
  -	      methodName + "(" + child + ")");
  +	if (digester.getDebug() >= 1) {
  +            if (parent == null)
  +                digester.log("Call [NULL PARENT]." +
  +                             methodName + "(" + child + ")");
  +            else
  +                digester.log("Call " + parent.getClass().getName() + "." +
  +                             methodName + "(" + child + ")");
  +        }
   
   	// Call the specified method
   	Class paramTypes[] = new Class[1];
  
  
  
  1.7       +12 -7     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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SetTopRule.java	2001/08/20 18:28:40	1.6
  +++ SetTopRule.java	2001/11/14 18:54:19	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v
1.6 2001/08/20 18:28:40 craigmcc Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/08/20 18:28:40 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/SetTopRule.java,v
1.7 2001/11/14 18:54:19 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/11/14 18:54:19 $
    *
    * ====================================================================
    *
  @@ -74,7 +74,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.6 $ $Date: 2001/08/20 18:28:40 $
  + * @version $Revision: 1.7 $ $Date: 2001/11/14 18:54:19 $
    */
   
   public class SetTopRule extends Rule {
  @@ -144,9 +144,14 @@
   	// Identify the objects to be used
   	Object child = digester.peek(1);
   	Object parent = digester.peek(0);
  -	if (digester.getDebug() >= 1)
  -	    digester.log("Call " + parent.getClass().getName() + "." +
  -	      methodName + "(" + child + ")");
  +	if (digester.getDebug() >= 1) {
  +            if (parent == null)
  +                digester.log("Call [NULL PARENT]." +
  +                             methodName + "(" + child + ")");
  +            else
  +                digester.log("Call " + parent.getClass().getName() + "." +
  +                             methodName + "(" + child + ")");
  +        }
   
   	// Call the specified method
   	Class paramTypes[] = new Class[1];
  
  
  

--
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