Bug 227721 [Decorators] ContentTypeDecorator causes NPE in JFaceResources.getResources
I20080415-1646. Found in .log: !ENTRY org.eclipse.ui 4 4 2008-04-18 10:25:59.887 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.jface.resource.JFaceResources.getResources(JFaceResources.java:205) at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:151) at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:123) at org.eclipse.ui.internal.WorkbenchImages.initializeImageRegistry(WorkbenchImages.java:570) at org.eclipse.ui.internal.WorkbenchImages.getDescriptors(WorkbenchImages.java:471) at org.eclipse.ui.internal.WorkbenchImages.getImageDescriptor(WorkbenchImages.java:501) at org.eclipse.ui.internal.registry.EditorRegistry.addSystemEditors(EditorRegistry.java:549) at org.eclipse.ui.internal.registry.EditorRegistry.initialIdToEditorMap(EditorRegistry.java:513) at org.eclipse.ui.internal.registry.EditorRegistry.<init>(EditorRegistry.java:134) at org.eclipse.ui.internal.WorkbenchPlugin.getEditorRegistry(WorkbenchPlugin.java:455) at org.eclipse.ui.internal.Workbench.getEditorRegistry(Workbench.java:1132) at org.eclipse.ui.internal.ide.ContentTypeDecorator.decorate(ContentTypeDecorator.java:49) at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:72) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:356) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:338) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:374) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:334) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
public void decorate(Object element, IDecoration decoration) {
		if (element instanceof IFile == false) {
			return;
		}
		IFile file = (IFile) element;
		IContentDescription contentDescription = null;
		try {
			contentDescription = file.getContentDescription();
		} catch (CoreException e) {
			
			
		}