Sorry, I accidently hit ENTER, which means publish bug report for Sourceforge...
The JavaDocs of OrderedKAryTree.addEdge(E e, V parent, V child, int index) says that a child is placed at the lowest available position if an index less than 0 is given. This is not the case. Instead an IllegalArgumentException is thrown (see the relevant code fragment in the details above). This means that addEdge(E e, V parent, V child) will always throw an exception.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think this error was introduced with the fix of 2799634. However, the fix is not complete. Even if a non-negative index is specified, there is a IndexOutOfBoundsException raised at OrderedKAryTree.java:236 by the check outedges.get(index) != null. I think one should also check whether the specified index < outedges.size() before.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I accidently hit ENTER, which means publish bug report for Sourceforge...
The JavaDocs of OrderedKAryTree.addEdge(E e, V parent, V child, int index) says that a child is placed at the lowest available position if an index less than 0 is given. This is not the case. Instead an IllegalArgumentException is thrown (see the relevant code fragment in the details above). This means that addEdge(E e, V parent, V child) will always throw an exception.
I think this error was introduced with the fix of 2799634. However, the fix is not complete. Even if a non-negative index is specified, there is a IndexOutOfBoundsException raised at OrderedKAryTree.java:236 by the check outedges.get(index) != null. I think one should also check whether the specified index < outedges.size() before.