Project: Eclipse_Platform_UI
Bug 220473 [WorkingSets] unable to recover from corrupt workingsets.xml file
Reported: 2008-02-26 16:55:31 | Status: verified fixed

After upgrading to the Mylyn Europa build my working sets weren't restored. I found these exceptions in the log: java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:468) at java.lang.Integer.parseInt(Integer.java:497) at org.eclipse.ui.internal.ide.model.ResourceFactory.createElement(ResourceFactory.java:76) at org.eclipse.ui.internal.WorkingSet.restoreWorkingSet(WorkingSet.java:163) at org.eclipse.ui.internal.AbstractWorkingSet.getElementsArray(AbstractWorkingSet.java:151) at org.eclipse.ui.internal.AbstractWorkingSet.getElements(AbstractWorkingSet.java:139) at org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater.checkElementExistence(TaskWorkingSetUpdater.java:103) at org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater.add(TaskWorkingSetUpdater.java:95) at org.eclipse.ui.internal.AbstractWorkingSetManager.bundleChanged(AbstractWorkingSetManager.java:629) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1210) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297) java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:468) at java.lang.Integer.parseInt(Integer.java:497) at org.eclipse.ui.internal.ide.model.ResourceFactory.createElement(ResourceFactory.java:76) at org.eclipse.ui.internal.WorkingSet.restoreWorkingSet(WorkingSet.java:163) at org.eclipse.ui.internal.AbstractWorkingSet.getElementsArray(AbstractWorkingSet.java:151) at org.eclipse.ui.internal.AbstractWorkingSet.getElements(AbstractWorkingSet.java:139) at org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater.checkElementExistence(TaskWorkingSetUpdater.java:103) at org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater.add(TaskWorkingSetUpdater.java:95) at org.eclipse.ui.internal.AbstractWorkingSetManager.bundleChanged(AbstractWorkingSetManager.java:629) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1210) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSet.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/BadElementFactory.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkingSetTest.java