Comment #1 on issue 164 by PNode#moveToFront change to avoid java.util.ConcurrentModificationException

I vote to mark this as WontFix.

The method is throwing ConcurrentModificationException because that's what is
happening, you are trying to modify the list as you are iterating over it.

The javadoc for PNode.getChildrenReference() reads "This list should not be modified."

A workaround would be to copy the children list into a new ArrayList

List children = new ArrayList(node.getChildrenReference());
for (Iterator iterator = children.iterator(); iterator.hasNext(); )
  PNode child = (PNode);

You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

Piccolo2D Developers Group:

Reply via email to