private static void refineMap(BayesianResult bayes, HashMap
for (Map.Entry
String word = entry.getKey();
Token t = entry.getValue();
if ((t.getClean_count()+t.getSens_count()) < 10) {
terms.remove(word);
continue;
}
}
}
Here I am modifying the HashMap ( terms.remove(word) ) while iteration is already being done on it. This throws an exception Exception in thread "main" java.util.ConcurrentModificationException
No comments:
Post a Comment