Barry LaFond created TEIIDDES-2159:
--------------------------------------
Summary: ConcurrentModificationException closing projects after Designer
restart
Key: TEIIDDES-2159
URL:
https://issues.jboss.org/browse/TEIIDDES-2159
Project: Teiid Designer
Issue Type: Feature Request
Components: Editors
Affects Versions: 8.5
Reporter: Barry LaFond
Assignee: Barry LaFond
Fix For: 8.5
1) Have half dozen projects open in workspace with editors open for a model from each
project
2) Exit and restart Designer
3) Select and close projects
4) Receive following exception
{code}
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
... 24 more
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
at java.util.ArrayList$Itr.next(ArrayList.java:831)
at org.teiid.designer.ui.editors.ModelEditorManager$3.run(ModelEditorManager.java:177)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
{code}
apparently due the autoSelect() is called in both DiagramEditor.openContext() and
OperationEditorPage.openContext(). Since the call ends up being async() the editor being
closed is removed from the iterated list in the runnable
{code}
public static void autoSelectEditor( final ModelEditor editor,
final ModelEditorPage thePage ) {
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
for (Iterator iter = editor.getAllEditors().iterator(); iter.hasNext();)
{
Object nextPage = iter.next();
if (nextPage == thePage) {
editor.selectPage(thePage);
}
}
}
});
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)