Project: JDT
Bug 74513 NPE in JavaSourceViewerConfiguration when changing compiler level
Reported: 2004-09-22 06:29:41 | Status: resolved fixed

I200409212000 Tried to change compiler compliance level between 1.4 and 1.5. The folowing class was open in a java editor: package a; public class Ref { enum Cards { } } Error Sep 22, 2004 12:12:02.814 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration.handlePropertyChangeEvent(JavaSourceViewerConfiguration.java:813) at org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingManager.handlePropertyChangeEvent(SemanticHighlightingManager.java:468) at org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingManager.propertyChange(SemanticHighlightingManager.java:455) at org.eclipse.ui.texteditor.ChainedPreferenceStore.firePropertyChangeEvent(ChainedPreferenceStore.java:162) at org.eclipse.ui.texteditor.ChainedPreferenceStore.firePropertyChangeEvent(ChainedPreferenceStore.java:151) at org.eclipse.ui.texteditor.ChainedPreferenceStore.handlePropertyChangeEvent(ChainedPreferenceStore.java:452) at org.eclipse.ui.texteditor.ChainedPreferenceStore.access$0(ChainedPreferenceStore.java:406) at org.eclipse.ui.texteditor.ChainedPreferenceStore$PropertyChangeListener.propertyChange(ChainedPreferenceStore.java:68) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$OptionsAdapter.firePropertyChangeEvent(JavaEditor.java:415) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$OptionsAdapter$PropertyChangeListener.propertyChange(JavaEditor.java:351) at org.eclipse.jdt.internal.ui.preferences.MockupPreferenceStore.firePropertyChangeEvent(MockupPreferenceStore.java:74) at org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.firePropertyChangeEvents(OptionsConfigurationBlock.java:191) at org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.setOptions(OptionsConfigurationBlock.java:166) at org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.performOk(OptionsConfigurationBlock.java:428) at org.eclipse.jdt.internal.ui.preferences.CompilerPropertyPage.performOk(CompilerPropertyPage.java:180) at org.eclipse.jface.preference.PreferenceDialog$12.run(PreferenceDialog.java:813) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:794) at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:223) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:538) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2783) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2442) at org.eclipse.jface.window.Window.runEventLoop(Window.java:706) at org.eclipse.jface.window.Window.open(Window.java:684) at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:186) at org.eclipse.jface.action.Action.runWithEvent(Action.java:988) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:555) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:505) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:419) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2783) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2442) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1443) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1414) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:271) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java