logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41186] - AsyncAppender in 1.2.14 DiscardSummary events create NullPointerExceptions in layouts
Date Sat, 21 Apr 2007 03:37:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41186>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41186





------- Additional Comments From carnold@apache.org  2007-04-20 20:36 -------
The underlying problem, a NullPointerException on a call to LoggingEvent.getLocationInformation()

when FQCN is null was also reported in Chainsaw running on log4j 1.2.  The initial suggestion
was to 
backport a log4j 1.3 change so that getLocationInfo() would return null.  However, the log4j
1.2 pattern 
layout does not check for a null when calling getLocationInformation() and only making that
change 
(and reverting the previous change) will just move the NPE to a slightly different place in
the test case.

I added a new unit test that calls getLocationInformation() when FQCN is null and checks that
all the 
accessors return "?".  The behavior should be identical to passing a bogus class name.  The
change 
committed in rev 530974 is sufficient to pass the unit tests for the original reported bug
without the 
earlier change to AsyncAppender.  However, think it is safer to leave the bogus FQCN in 
AsyncAppender.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message