[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

Wolfgang Knauf do-not-reply at jboss.com
Tue Nov 3 10:12:52 EST 2009


Hi,

that's a standard iterator problem, no EJB3 issue ;-):
for(RoleFunction roleFunction:this.listRoleFunctions){
  | 			...
  | 			this.listRoleFunctions.remove(roleFunction);
You remove an item from the list over which you iterate. Use this "for (int index = this.listRoleFunctions.size() - 1; index >= 0; index--)" to avoid this.

Best regards

Wolfgang

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263717#4263717

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263717



More information about the jboss-user mailing list