Skip to content

Commit 1997590

Browse files
committed
Fix NPE in PriorityDescriptorCache
Fixes #114
1 parent dd717b0 commit 1997590

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ReleaseNotes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Eclipse Update Site:
1313

1414
### Fixed Issues
1515

16+
* [#114](https://github.com/pmd/pmd-eclipse-plugin/issues/114): NPE in PriorityDescriptorCache
17+
1618
### API Changes
1719

1820
### External Contributions

net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/plugin/PMDPlugin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,17 @@ public void run() {
376376
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. BundleContext )
377377
*/
378378
public void stop(BundleContext context) throws Exception {
379-
380379
fileChangeListenerEnabled(false);
381380

382-
plugin = null;
383381
disposeResources();
384382
ShapePainter.disposeAll();
385383
ResourceManager.dispose();
386384
PriorityDescriptorCache.INSTANCE.dispose();
387385
logbackConfiguration.unconfigureLogback();
386+
387+
// only unset the plugin reference after all our own shutdown logic
388+
// has been executed
389+
plugin = null;
388390
super.stop(context);
389391
}
390392

0 commit comments

Comments
 (0)