Skip to content

Commit e7c67d4

Browse files
committed
fix: ConcurrentModificationException in TokenizerThread #841
1 parent 2a7e7c0 commit e7c67d4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme

org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/theme/Theme.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616

1717
import java.util.ArrayList;
1818
import java.util.Collections;
19-
import java.util.HashMap;
2019
import java.util.List;
2120
import java.util.Map;
2221
import java.util.Objects;
22+
import java.util.concurrent.ConcurrentHashMap;
23+
import java.util.concurrent.ConcurrentMap;
2324

2425
import org.eclipse.jdt.annotation.Nullable;
2526
import org.eclipse.tm4e.core.internal.grammar.ScopeStack;
@@ -54,7 +55,7 @@ public static Theme createFromParsedTheme(final List<ParsedThemeRule> source, @N
5455
return resolveParsedThemeRules(source, colorMap);
5556
}
5657

57-
private final Map<String /* scopeName */, List<ThemeTrieElementRule>> _cachedMatchRoot = new HashMap<>();
58+
private final ConcurrentMap<String /* scopeName */, List<ThemeTrieElementRule>> _cachedMatchRoot = new ConcurrentHashMap<>();
5859

5960
private final ColorMap _colorMap;
6061
private final StyleAttributes _defaults;

0 commit comments

Comments
 (0)