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 CallMethodRule.java
Date Wed, 14 Nov 2001 18:57:01 GMT
craigmcc    01/11/14 10:57:01

  Modified:    digester/src/java/org/apache/commons/digester
                        CallMethodRule.java
  Log:
  Avoid an NPE in debugging messages in CallMethodRule as well.
  
  Revision  Changes    Path
  1.10      +8 -5      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CallMethodRule.java	2001/08/25 20:30:16	1.9
  +++ CallMethodRule.java	2001/11/14 18:57:01	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v
1.9 2001/08/25 20:30:16 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/08/25 20:30:16 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v
1.10 2001/11/14 18:57:01 craigmcc Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/11/14 18:57:01 $
    *
    * ====================================================================
    *
  @@ -77,7 +77,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.9 $ $Date: 2001/08/25 20:30:16 $
  + * @version $Revision: 1.10 $ $Date: 2001/11/14 18:57:01 $
    */
   
   public class CallMethodRule extends Rule {
  @@ -284,7 +284,10 @@
   	Object top = digester.peek();
   	if (digester.getDebug() >= 1) {
   	    StringBuffer sb = new StringBuffer("Call ");
  -	    sb.append(top.getClass().getName());
  +            if (top == null)
  +                sb.append("[NULL TOP]");
  +            else
  +                sb.append(top.getClass().getName());
   	    sb.append(".");
   	    sb.append(methodName);
   	    sb.append("(");
  
  
  

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