IzPack
  1. IzPack
  2. IZPACK-461

ArrayIndexOutOfBoundsException in TreePacksPanel

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.4, 5.0
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The TreePacksPanel panel raises an ArrayIndexOutOfBoundsException if any of its children is marked as hidden.

      The following works:

      <pack name="Inculder" id="includer" required="no">
      <description>Including pack</description>
      </pack>
      <pack name="Inculded1" id="included1" parent="includer" required="no">
      <description>Including pack</description>
      </pack>
      <pack name="Inculded2" id="included2" parent="includer" required="no">
      <description>Including pack</description>
      </pack>

      The following gives the exception

      <pack name="Inculder" id="includer" required="no">
      <description>Including pack</description>
      </pack>
      <pack name="Inculded1" id="included1" parent="includer" required="no">
      <description>Including pack</description>
      </pack>
      <pack name="Inculded2" id="included2" parent="includer" required="no" hidden="true">
      <description>Including pack</description>
      </pack>

      The exception is :
      java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      at java.util.ArrayList.get(ArrayList.java:322)
      at com.izforge.izpack.panels.PacksModel.getValueAt(PacksModel.java:437)
      at com.izforge.izpack.panels.TreePacksPanel.updateModel(TreePacksPanel.java:588)
      at com.izforge.izpack.panels.TreePacksPanel.updateModel(TreePacksPanel.java:593)
      at com.izforge.izpack.panels.TreePacksPanel.fromModel(TreePacksPanel.java:526)
      at com.izforge.izpack.panels.CheckBoxNodeRenderer.getTreeCellRendererComponent(TreePacksPanel.java:996)
      at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2717)
      at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
      at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
      at javax.swing.tree.VariableHeightLayoutCache.updateNodeSizes(VariableHeightLayoutCache.java:900)
      at javax.swing.tree.VariableHeightLayoutCache.invalidateSizes(VariableHeightLayoutCache.java:354)
      at javax.swing.plaf.basic.BasicTreeUI.setCellRenderer(BasicTreeUI.java:372)
      at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3326)
      at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
      at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
      at java.awt.Component.firePropertyChange(Component.java:8128)
      at javax.swing.JTree.setCellRenderer(JTree.java:749)
      at com.izforge.izpack.panels.TreePacksPanel.createPacksTree(TreePacksPanel.java:473)
      at com.izforge.izpack.panels.TreePacksPanel.createNormalLayout(TreePacksPanel.java:186)
      at com.izforge.izpack.panels.TreePacksPanel.panelActivate(TreePacksPanel.java:861)
      at com.izforge.izpack.installer.InstallerFrame.switchPanel(InstallerFrame.java:839)
      at com.izforge.izpack.installer.InstallerFrame.navigateNext(InstallerFrame.java:1451)
      at com.izforge.izpack.installer.InstallerFrame.navigateNext(InstallerFrame.java:1419)
      at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.actionPerformed(InstallerFrame.java:1561)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      ...

        Activity

        Hide
        Katarzyna Czeczot added a comment -
        Show
        Katarzyna Czeczot added a comment - duplicate with: http://jira.codehaus.org/browse/IZPACK-391
        Hide
        Timothy Fridey added a comment -

        This should be marked as Fixed see: IZPACK-391

        Show
        Timothy Fridey added a comment - This should be marked as Fixed see: IZPACK-391

          People

          • Assignee:
            Julien Ponge
            Reporter:
            Massimiliano Ziccardi
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: