Skip to content

Commit 084f2ba

Browse files
kmaderctrueden
authored andcommitted
Avoid a compilation issue when using IntelliJ
Using a TreeMap causes a ConcurrentModificationException, whereas the ConcurrentSkipListMap has no such issue.
1 parent 98b1079 commit 084f2ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/scijava/annotations/AbstractIndexWriter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import java.util.Map;
4545
import java.util.Map.Entry;
4646
import java.util.TreeMap;
47+
import java.util.concurrent.ConcurrentSkipListMap;
4748

4849
import javax.lang.model.element.AnnotationValue;
4950

@@ -60,7 +61,7 @@
6061
public abstract class AbstractIndexWriter {
6162

6263
private final Map<String, Map<String, Object>> map =
63-
new TreeMap<String, Map<String, Object>>();
64+
new ConcurrentSkipListMap<String, Map<String, Object>>();
6465

6566
protected synchronized boolean foundAnnotations() {
6667
return !map.isEmpty();

0 commit comments

Comments
 (0)