| Summary: | persistence manager hits a NPE during shutdown | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | David McKnight <dmcknigh> | ||||
| Component: | RSE | Assignee: | David McKnight <dmcknigh> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ddykstal.eclipse, xuanchen | ||||
| Version: | 3.2 | Flags: | xuanchen:
review+
ddykstal.eclipse: review+ |
||||
| Target Milestone: | 3.3.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 354876 | ||||||
| Attachments: |
|
||||||
Created attachment 201598 [details]
patch to not set plugin to null
Xuan and Dave D, could you please review this patch? The fix looks good. Thanks. Thanks for the reviews. I've committed the change to the HEAD stream. |
The following exception can occur during shutdown: java.lang.NullPointerException at org.eclipse.rse.internal.persistence.PropertyFileProvider.getProfilesFolder(PropertyFileProvider.java:281) at org.eclipse.rse.internal.persistence.PropertyFileProvider.getAnchor(PropertyFileProvider.java:267) at org.eclipse.rse.internal.persistence.PropertyFileProvider.saveRSEDOM(PropertyFileProvider.java:125) at org.eclipse.rse.internal.persistence.PFFileSystemJob.run(PFFileSystemJob.java:66) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) The NPE occurs because the plugin variable in RSECorePlugin is null. It gets set to null in the RSECorePlugin.stop(BundleContext) call: public void stop(BundleContext context) throws Exception { LoggerFactory.freeLogger(this); logger = null; plugin = null; super.stop(context); } Since plugin is this, I don't think there's any need to set plugin to null.