Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2159

ConcurrentModificationException closing projects after Designer restart

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 8.5
    • 8.5
    • Editors
    • None

    Description

      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

      	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)
      

      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

          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);
                          }
                      }
                  }
              });
          }
      

      Attachments

        Activity

          People

            blafond Barry LaFond
            blafond Barry LaFond
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: