Using eventList.removeAll(List<Object> elements) throws an IndexOutOfBoundsException, although the given elements are contained in the eventList. Why this exception is thrown and how I can avoid this errorneous behaviour?
The event list is represented as a tree list. The path of the tree list has a depth of 3. The problem is, that the removeAll() function removes the elements like a list ignoring the parent/child relations of the element.
Using the remove() function of the event list the programmer has to ensure, that at first all child elements have to remove and then the parents! Otherwise an IndexOutOfBoundsException is called.