struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stanlick <stanl...@gmail.com>
Subject Changing log level generates NPE
Date Mon, 02 Feb 2009 16:41:23 GMT

I added a file appender last night and set all logging to DEBUG.  Today I
started getting a NullPointerException at runtime.  I isolated the bug to
the XWorkMapPropertyAccessor class where 

    public void setProperty(Map context, Object target, Object name, Object
value) throws OgnlException {
        if (LOG.isDebugEnabled()) {
     		LOG.debug("Entering
setProperty("+context+","+target+","+name+","+value+")");
     	}

does not test the concatenated args against null.  I can avoid the bug by
modifying my log4j.properties, but this was a real brainteaser to discover.

Peace,
Scott
-- 
View this message in context: http://www.nabble.com/Changing-log-level-generates-NPE-tp21793068p21793068.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message