https://issues.apache.org/jira/browse/AMQ-3160 - ConcurrentModificationException in ActiveMQ Journal Checkpoint Worker

access to the file map needs to have a sync so that it can get an accurate snapshot and avoid concurrent access ex

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1063691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-01-26 12:14:07 +00:00
parent 62609f099a
commit 029c1e3e28

View File

@ -684,7 +684,7 @@ public class Journal {
return fileByFileMap.keySet();
}
public Map<Integer, DataFile> getFileMap() {
public synchronized Map<Integer, DataFile> getFileMap() {
return new TreeMap<Integer, DataFile>(fileMap);
}