While running the following code snippet at some scenario, I got the java.util.ConcurrentModificationException exception. Please advice: How to avoid it? what can be the worse scenario which ConcurrentModificationException can create? will it occupy the CPU Usage %? Any pointer would be great!!!
public Map someMethod() { Map actionDosMap =new HashMap(); List associatedActionsDos =new ArrayList(); List associatedActionsPerormanceDos =new ArrayList(); Iterator iterActions =associatedActions.iterator(); while (iterActions.hasNext()) { Iterator reposIt = reposSet.iterator(); while (reposIt.hasNext()) { RepoRow row = (RepoRow) reposIt.next(); Properties props = row.getProperties(); DoData performanceReportsDo = new DoData(); if ("PerformanceReports".equals(props.getStringValue(do_type))) { performanceReportsDo.setDoType(doType); performanceReportsDo.setDoId(doID); associatedActionsPerformanceDos.add(performanceReportsDo); } else { DoData doc = new DoData(); do.setDoType(doType); do.setDoId(doID); associatedActionsDos.add(do); } } } actionDosMap.put("performanceReportsDo",associatedActionsPerformanceDos); actionDosMap.put("actionsNonPerfoDo",associatedActionsDos); return actionDosMap; } -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en