Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340031 - NPE in org.eclipse.emf.facet.util.core.Logger#log
Summary: NPE in org.eclipse.emf.facet.util.core.Logger#log
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 340048
Blocks:
  Show dependency tree
 
Reported: 2011-03-15 10:32 EDT by Nicolas Bros CLA
Modified: 2020-05-01 11:26 EDT (History)
2 users (show)

See Also:
nicolas.bros: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-03-15 10:32:11 EDT
When the log() method is called with plugin == null, it uses Activator.getDefault(), which is the Plugin instance from org.eclipse.emf.facet.util.core. 

And it causes a NPE because Activator.plugin is not initialized (always null)
Comment 1 Nicolas Bros CLA 2011-03-15 10:52:23 EDT
And even after setting Activator#plugin in the Activator, Plugin#getBundle returns null which causes another NPE.
Comment 2 Nicolas Bros CLA 2011-03-15 11:50:26 EDT
This happens for example when the user does Navigate > Open EPackage (or clicks on the "MoDisco" icon) and selects any EPackage.
Comment 3 Nicolas Bros CLA 2011-03-15 12:30:12 EDT
Fixed in revision 421.
Comment 4 Gregoire Dupe CLA 2011-06-07 10:26:22 EDT
This bug can be closed.