Status: Patch Available
Affects Version/s: None
Fix Version/s: None
the code InnerNodeImpl#getLeaf() as above
i think it has two problems:
1.if childrenMap.containsKey(excludedNode.getName()) return true, children.indexOf(excludedNode) must return > -1, so if (excludedIndex != -1) is it necessary?
2. if excludedindex = children.size() -1
as current code:
leafIndex = leafIndex>=excludedIndex ? leafIndex+1 : leafIndex;
leafIndex will be out of index and return null. Actually there are nodes that can be returned.
i think it should add the judgement excludedIndex == children.size() -1