Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340659

Summary: Potential NPE in RuntimeLog.log if no listeners are available
Product: [Eclipse Project] Equinox Reporter: Thomas Watson <tjwatson>
Component: ComponentsAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
possible fix none

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.