Exception when clearing the defaut changeset
An exception sometimes happens in circumstances that I have not yet fully identified. Stacktrace:
java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:742)
at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
at com.vectrace.MercurialEclipse.synchronize.cs.UncommittedChangesetGroup.clear(UncommittedChangesetGroup.java:111)
at com.vectrace.MercurialEclipse.synchronize.cs.UncommittedChangesetGroup.update(UncommittedChangesetGroup.java:313)
at com.vectrace.MercurialEclipse.synchronize.cs.UncommittedChangesetGroup.update(UncommittedChangesetGroup.java:406)
at com.vectrace.MercurialEclipse.synchronize.cs.UncommittedChangesetManager.assignRemainingFiles(UncommittedChangesetManager.java:101)
at com.vectrace.MercurialEclipse.synchronize.cs.UncommittedChangesetManager.loadSavedChangesets(UncommittedChangesetManager.java:94)
at com.vectrace.MercurialEclipse.synchronize.cs.UncommittedChangesetManager.setProjects(UncommittedChangesetManager.java:343)
at com.vectrace.MercurialEclipse.synchronize.cs.UncommittedChangesetGroup.setProjects(UncommittedChangesetGroup.java:413)
at com.vectrace.MercurialEclipse.synchronize.cs.HgChangeSetContentProvider.initializeUncommittedEntry(HgChangeSetContentProvider.java:643)
at com.vectrace.MercurialEclipse.synchronize.cs.HgChangeSetContentProvider.initializeChangeSets(HgChangeSetContentProvider.java:637)
at com.vectrace.MercurialEclipse.synchronize.cs.HgChangeSetContentProvider.initCollector(HgChangeSetContentProvider.java:480)
at com.vectrace.MercurialEclipse.synchronize.cs.HgChangeSetContentProvider.getRootElements(HgChangeSetContentProvider.java:440)
at com.vectrace.MercurialEclipse.synchronize.cs.HgChangeSetContentProvider.getElements(HgChangeSetContentProvider.java:283)
at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getElements(SafeDelegateTreeContentProvider.java:101)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider$1.run(NavigatorContentServiceContentProvider.java:154)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.internalGetChildren(NavigatorContentServiceContentProvider.java:143)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.getElements(NavigatorContentServiceContentProvider.java:116)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1000)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:700)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1349)
On first analysis, the cause seems to be that the preferences file may contain stale entries. The only way to work around it is to manually remove the projectFiles
line associated to the project from the preferences file.
Unfortunately, this project is using an old preferences API in the Eclipse platform that does not allow removing nodes of preference files directly from code. Put differently, the project needs updating and... it looks like a massive endeavor.