Unable to remove entry criterion from PlanItem using iterator

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Won't Fix
    • Priority: L3 - Default
    • None
    • Affects Version/s: 7.5.4
    • Component/s: cmmn model api
    • 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.

        This is the controller panel for Smart Panels app

              Assignee:
              Unassigned
              Reporter:
              Dmitry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: