Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Erven2016-11-03 17:14:03 -0400
committerHannes Erven2016-11-03 17:14:03 -0400
commit5ee8f8429f799c1334af120ec320899503b11c90 (patch)
tree3821687d4643512f6f57420362761d57e72351a4
parentf8278c40106444e37982c2c9d5403e285d01f2f3 (diff)
downloadorg.eclipse.libra-5ee8f8429f799c1334af120ec320899503b11c90.tar.gz
org.eclipse.libra-5ee8f8429f799c1334af120ec320899503b11c90.tar.xz
org.eclipse.libra-5ee8f8429f799c1334af120ec320899503b11c90.zip
Avoid ConcurrentHashMapModification Exceptionneon
-rw-r--r--plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/validation/WARProductValidateAction.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/validation/WARProductValidateAction.java b/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/validation/WARProductValidateAction.java
index 87d134f..068456e 100644
--- a/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/validation/WARProductValidateAction.java
+++ b/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/validation/WARProductValidateAction.java
@@ -10,7 +10,6 @@
package org.eclipse.libra.warproducts.ui.validation;
import java.util.*;
-import java.util.Map.Entry;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -112,9 +111,11 @@ public class WARProductValidateAction extends Action {
}
private static void verifyPDEErrors( final Map<Object,Object[]> map ) {
- for(final Entry<?,?> entry: map.entrySet()){
- Object currentKey = entry.getKey();
- ResolverError[] errors = (ResolverError[]) entry.getValue();
+ final ArrayList<Object> keys = new ArrayList<Object>(map.size());
+ keys.addAll( map.keySet() );
+
+ for(final Object currentKey: keys){
+ ResolverError[] errors = (ResolverError[]) map.get( currentKey );
ResolverError[] validErrors = validateErrors( errors );
map.remove( currentKey );
if( validErrors.length > 0 ) {

Back to the top