Bug 69860 - IllegalStateException from IJavaProject.getOptions(false)
Summary: IllegalStateException from IJavaProject.getOptions(false)
Status: RESOLVED DUPLICATE of bug 68993
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-12 12:56 EDT by Markus Keller CLA
Modified: 2004-07-12 13:11 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-07-12 12:56:47 EDT
This bug describes the test failures in org.eclipse.jdt.ui.tests.reorg.MoveTest.
Looking back in earlier nightly builds, I found that this bug already appeared
in the N20040705 build.

Here's what we do:

in testDestination_yes_cuFromRoot():
  Map originalOptions= javaProject.getOptions(false);
  Map newOptions= javaProject.getOptions(false);
  newOptions.put(JavaCore.COMPILER_COMPLIANCE, "1.3");
  newOptions.put(JavaCore.COMPILER_SOURCE, "1.3");
  javaProject.setOptions(newOptions);
...
  javaProject.setOptions(originalOptions);

in testDestination_no_cuFromRoot() (next test method):
... (javaProject is the same project as in the test before)
  Map originalOptions= javaProject.getOptions(false);

The call to IJavaProject#getOptions(false) fails now. It worked in 3.0.

The problem can also be reproduced in a runtime eclipse by setting per-project
compiler options and then switching back to use workspace settings.


java.lang.IllegalStateException: Preference node "org.eclipse.jdt.core" has been
removed.
	at java.lang.Throwable.<init>(Throwable.java)
	at java.lang.Throwable.<init>(Throwable.java)
	at
org.eclipse.core.internal.preferences.EclipsePreferences.checkRemoved(EclipsePreferences.java)
	at
org.eclipse.core.internal.preferences.EclipsePreferences.keys(EclipsePreferences.java:575)
	at org.eclipse.jdt.internal.core.JavaProject.getOptions(JavaProject.java:1439)
	at
org.eclipse.jdt.ui.tests.reorg.MoveTest.testDestination_no_cuFromRoot(MoveTest.java:1128)
	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 junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
	at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:30)
	at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:92)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:106)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2749)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2434)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
	at
org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:33)
	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:183)
	at org.eclipse.core.launcher.Main.run(Main.java:644)
	at org.eclipse.core.launcher.Main.main(Main.java:628)
Comment 1 Frederic Fusier CLA 2004-07-12 13:11:42 EDT

*** This bug has been marked as a duplicate of 68993 ***