Bug 45364 - LocationInformation Incorrectly Parses Location when Similar Named Classes Exist in Stack Trace
Summary: LocationInformation Incorrectly Parses Location when Similar Named Classes Ex...
Status: RESOLVED DUPLICATE of bug 44888
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.2
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-08 06:17 UTC by Michael Wooten
Modified: 2008-07-11 22:46 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wooten 2008-07-08 06:17:54 UTC
I uncovered this issue when testing a logging wrapper class using JUnit. The issue occurs when the logging wrapper class I created (called "com.somecompany.util.Logger") is called from the test class (called "com.somecompany.util.LoggerTest"). The wrapper class appropriately passes its fully qualified class name (FQCN) to Log4J, and this name is used to search the stack trace for the last instance of the class. Unfortunately, because com.somecompany.util.LoggerTest includes the substring com.somecompany.util.Logger and appears earlier in the stack trace, its stack frame is being used as the one for the FQCN and the wrong location information is being populated.
Comment 1 Curt Arnold 2008-07-11 22:46:06 UTC

*** This bug has been marked as a duplicate of bug 44888 ***