commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <skitch...@apache.org>
Subject Re: Digester push(null)
Date Sun, 02 Jul 2006 21:52:53 GMT
Hi Joachim,

On Wed, 2006-06-28 at 14:37 +0200, Joachim Fuchs wrote:
> Hi,
> 
> I found this code in Tomcat's ContextConfig.java:
> 
> <code>
> webDigester.clear();
> webDigester.push(context);
> webDigester.parse(is);
> webDigester.push(null);
> </code>
> 
> My question is what happens with the digester when pushing a null reference?
> I expect a null pointer expetion to be thrown, so what is this good for?

There won't necessarily be a null pointer exception. That would only
happen if some rule is executed that tries to invoke a method on that
object on the stack.

However it does look rather odd. I can't think of a good reason for
pushing a null onto the stack, particularly *after* parsing is complete.

Can you provide the full package name for this class (and tomcat
version) so I can have a look at the tomcat code for myself?

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message