fother
25 Aug 2009, 6:33 AM
public static void main(final String[] args) {
final BaseTreeModel model1 = new BaseTreeModel();
model1.add(new BaseTreeModel());
model1.add(new BaseTreeModel());
model1.add(new BaseTreeModel());
model1.add(new BaseTreeModel());
List<ModelData> children = model1.getChildren();
final BaseTreeModel model2 = new BaseTreeModel();
model2.setChildren(children);
System.out.println(model2.getChildCount());
}
Exception in thread "main" java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
at java.util.AbstractList$Itr.next(Unknown Source)
at com.extjs.gxt.ui.client.data.BaseTreeModel.setChildren(BaseTreeModel.java:178)
final BaseTreeModel model1 = new BaseTreeModel();
model1.add(new BaseTreeModel());
model1.add(new BaseTreeModel());
model1.add(new BaseTreeModel());
model1.add(new BaseTreeModel());
List<ModelData> children = model1.getChildren();
final BaseTreeModel model2 = new BaseTreeModel();
model2.setChildren(children);
System.out.println(model2.getChildCount());
}
Exception in thread "main" java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
at java.util.AbstractList$Itr.next(Unknown Source)
at com.extjs.gxt.ui.client.data.BaseTreeModel.setChildren(BaseTreeModel.java:178)