| Summary: | Eclipse refuses to exit because of NPE when no language toolkit could be found in findAppropriateToolkitByObject() | ||
|---|---|---|---|
| Product: | [Technology] DLTK | Reporter: | patrick.stiegeler |
| Component: | Common | Assignee: | dltk.common-inbox <dltk.common-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | alex.panchenko |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
The NPE occurs e.g. when the user tries to quit Eclipse while still having a DLTK-supported file open in an editor. Eclipse then refuses to exit because of this NPE. Fixed in CVS HEAD & 3.0 branch |
Build Identifier: 3.0.0.v20101211-0331-7l--ED-z0UkgZToe6HfMg org.eclipse.dltk.core.DLTKLanguageManager::findAppropriateToolkitByObject() throws a NullpointerException - instead of returning null - when no language toolkit is found by toolkitManager. Suggestion: In findAppropriateToolkitByObject(), please insert the following line for (***) in findAppropriateToolkitByObject(). ------------- replacement for (***)... if( toolkit == null ) { return null; } ------------- location of (***) in ... ... IDLTKLanguageToolkit findAppropriateToolkitByObject(...) { ... final PriorityClassDLTKExtensionManager toolkitManager = ...; ... for (...) { IDLTKLanguageToolkit toolkit = ...; (***) if (object instanceof IResource) { ... } else if (object instanceof IPath) { ... } else { return null; } } return null; } Reproducible: Always Steps to Reproduce: Happens every time in our setting, where some of our plugins (which provide DLTK extensions) fail on purpose to activate in their Activator (license issues).