Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340659 - Potential NPE in RuntimeLog.log if no listeners are available
Summary: Potential NPE in RuntimeLog.log if no listeners are available
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 10:00 EDT by Thomas Watson CLA
Modified: 2011-03-22 10:03 EDT (History)
0 users

See Also:


Attachments
possible fix (4.29 KB, patch)
2011-03-22 10:01 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2011-03-22 10:00:35 EDT
In practice this does not happen in an OSGi environment as long as common is activated.  But there is a potential NPE in the RuntimeLog.log method if the writer is not set and there are no listeners available.  The code used to queue messages is broken and should be fixed.

There is also improvements that should be made to the LogFilter implementation to avoid logging when there are no listeners available.
Comment 1 Thomas Watson CLA 2011-03-22 10:01:46 EDT
Created attachment 191679 [details]
possible fix
Comment 2 Thomas Watson CLA 2011-03-22 10:03:18 EDT
Patch released.