sgodden / echo3ext20

Automatically exported from code.google.com/p/echo3ext20
Other
0 stars 1 forks source link

ArrayOutOfIndexException when remove last child of one node #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I call the node.getParent().removeChild( node), it 
will throw ArrayOutOfIndexException if the node is the last
one of parent. I check the source code, find that in the 
DefaultMutableTreeNode's removeChild method, it remove the 
node from children field, and then 

            fireTreeNodesRemoved(new int[] {
                index
            });

which will create a TreeModelEvent

e = new TreeModelEvent(this, getPathToRoot(this), childIndices,
getChildren(childIndices));

It will call the getchildren( childIndices) method, but the childIndices 
have been deleted just now. So it will throw an ArrayOutOfIndexException.

I want to fix the bug, but I don't have the source code of echo3 extras,
and the source code downloaded from nextapp doesn't match the jar file in
echo3ext20. 

Original issue reported on code.google.com by simon...@gmail.com on 26 Nov 2009 at 7:22

GoogleCodeExporter commented 9 years ago
Needs testing with the latest changes to echo3extras uploaded today

Original comment by lloyd.colling@gmail.com on 1 Dec 2009 at 1:08