Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-6956918

ArrayIndexOutOfBoundsException when refresh JDTS tree

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • jt4.3
    • jt4.3
    • tools
    • None
    • b13
    • generic
    • generic
    • Verified

    Description

      If we have opened JDTS in tester mode with wd, based on all.jtm template, and try to create new wd, based on readiness.jtm template, we may see:

      Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2 >= 1
                  at java.util.Vector.elementAt(Vector.java:427)
                  at javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:230)
                  at javax.swing.tree.VariableHeightLayoutCache.treeNodesRemoved(VariableHeightLayoutCache.java:543)
                  at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesRemoved(BasicTreeUI.java:3810)
                  at com.sun.javatest.exec.TestTreeModel$Notifier.run(TestTreeModel.java:1507)
                  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
                  at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
                  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
                  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
                  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
                  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
                  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
                  at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      it doesn't breaks tree functionality, but visible inside jdts console.

      The root cause is removing tree nodes from JTree, from ContextManager.refreshIfNeeded().
      Stack trace:

              at java.lang.Thread.dumpStack(Thread.java:1206)
              at com.sun.javatest.TestResultTable.notifyRemoveLeaf(TestResultTable.java:1856)
              at com.sun.javatest.TRT_TreeNode.rmChild(TRT_TreeNode.java:1564)
              at com.sun.javatest.TRT_TreeNode.refreshIfNeeded(TRT_TreeNode.java:791)
              at com.sun.javatest.TestResultTable.recursiveRefresh(TestResultTable.java:1801)
              at com.sun.javatest.TestResultTable.refreshIfNeeded(TestResultTable.java:1377)
              at com.sun.javatest.exec.ContextManager.refreshTestsImpl(ContextManager.java:308)
              at com.sun.javatest.exec.ContextManager.access$000(ContextManager.java:75)
              at com.sun.javatest.exec.ContextManager$1.run(ContextManager.java:242)
              at java.lang.Thread.run(Thread.java:619)

      Attachments

        Activity

          People

            sborodinsunw Sergey Borodin (Inactive)
            sborodinsunw Sergey Borodin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: