-
Bug Report
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
7.5.4
-
None
The code written below executes well, but "criterionIt.remove()" does not remove any criterion from the plan item:
for (final Iterator<EntryCriterion> criterionIt = planItem.getEntryCriterions().iterator(); criterionIt.hasNext();) { final EntryCriterion criterion = criterionIt.next(); if (<check something>) { criterionIt.remove(); } }
The problem is in the implementation of org.camunda.bpm.model.xml.impl.type.child.ChildElementCollectionImpl.get(ModelElementInstance) method. The method "iterator()" of created collection copies its' elements to ArrayList and returns the iterator of this copy.
You should implements the iterator which either supports "remove" operation, or throws UnsupportedOperationException.