Mirth Connect
  1. Mirth Connect
  2. MIRTH-4174

Appending rules/steps to a filter/transformer when importing no longer works

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.6.0, 3.5.1
    • Component/s: Administrator
    • Labels:
      None

      Description

      The following is thrown:

      Exception in thread "AWT-EventQueue-2" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
      	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
      	at java.util.ArrayList.get(ArrayList.java:429)
      	at org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode.getChildAt(AbstractMutableTreeTableNode.java:174)
      	at org.jdesktop.swingx.treetable.DefaultTreeTableModel.getChild(DefaultTreeTableModel.java:255)
      	at javax.swing.tree.VariableHeightLayoutCache.createNodeAt(VariableHeightLayoutCache.java:779)
      	at javax.swing.tree.VariableHeightLayoutCache.treeNodesInserted(VariableHeightLayoutCache.java:491)
      	at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesInserted(BasicTreeUI.java:3878)
      	at org.jdesktop.swingx.tree.TreeModelSupport.fireChildrenAdded(TreeModelSupport.java:253)
      	at org.jdesktop.swingx.tree.TreeModelSupport.fireChildAdded(TreeModelSupport.java:211)
      	at com.mirth.connect.client.ui.SortableTreeTableModel.insertNodeInto(SortableTreeTableModel.java:218)
      	at com.mirth.connect.client.ui.editors.BaseEditorPane.insertNode(BaseEditorPane.java:491)
      	at com.mirth.connect.client.ui.editors.BaseEditorPane.insertNode(BaseEditorPane.java:486)
      	at com.mirth.connect.client.ui.editors.BaseEditorPane.insertNode(BaseEditorPane.java:482)
      	at com.mirth.connect.client.ui.editors.BaseEditorPane.importFilterTransformer(BaseEditorPane.java:758)
      	at com.mirth.connect.client.ui.editors.BaseEditorPane.doImport(BaseEditorPane.java:727)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
      	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
      	at java.beans.EventHandler.invokeInternal(EventHandler.java:482)
      	at java.beans.EventHandler.access$000(EventHandler.java:279)
      	at java.beans.EventHandler$1.run(EventHandler.java:430)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.beans.EventHandler.invoke(EventHandler.java:428)
      	at com.sun.proxy.$Proxy47.actionPerformed(Unknown Source)
      	at org.jdesktop.swingx.action.BoundAction.actionPerformed(BoundAction.java:231)
      	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      	at org.jdesktop.swingx.JXHyperlink.fireActionPerformed(JXHyperlink.java:264)
      	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
      	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
      	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
      	at java.awt.Component.processMouseEvent(Component.java:6533)
      	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      	at java.awt.Component.processEvent(Component.java:6298)
      	at java.awt.Container.processEvent(Container.java:2236)
      	at java.awt.Component.dispatchEventImpl(Component.java:4889)
      	at java.awt.Container.dispatchEventImpl(Container.java:2294)
      	at java.awt.Component.dispatchEvent(Component.java:4711)
      	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
      	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
      	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
      	at java.awt.Container.dispatchEventImpl(Container.java:2280)
      	at java.awt.Window.dispatchEventImpl(Window.java:2746)
      	at java.awt.Component.dispatchEvent(Component.java:4711)
      	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      	at java.awt.EventQueue.access$500(EventQueue.java:97)
      	at java.awt.EventQueue$3.run(EventQueue.java:709)
      	at java.awt.EventQueue$3.run(EventQueue.java:703)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
      	at java.awt.EventQueue$4.run(EventQueue.java:731)
      	at java.awt.EventQueue$4.run(EventQueue.java:729)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

        Activity

        Hide
        Nick Rupley added a comment -

        Fixed in revisions 8253/8254. Instead of inserting into the model directly, we now just call setProperties just as in the no-append case of importing. The difference is that the properties being set are identical to the current properties, with the imported elements simply added to the list.

        Also in setElements we now explicitly set the sequence numbers ahead of time. This is because tree-table nodes will actually check equality of nodes when inserting, so two identical elements would have been ignored.

        Show
        Nick Rupley added a comment - Fixed in revisions 8253/8254. Instead of inserting into the model directly, we now just call setProperties just as in the no-append case of importing. The difference is that the properties being set are identical to the current properties, with the imported elements simply added to the list. Also in setElements we now explicitly set the sequence numbers ahead of time. This is because tree-table nodes will actually check equality of nodes when inserting, so two identical elements would have been ignored.

          People

          • Assignee:
            Nick Rupley
            Reporter:
            Nick Rupley
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development