Commit 1a8f4ea4 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

These maps are accessed concurrently, better use a thread-safe container

Hoping this will fix a deadlock in pluginInfoCache.get
parent d4286e7f
......@@ -48,7 +48,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
public class PluginFactory {
......@@ -114,8 +114,8 @@ public class PluginFactory {
}
private static final Map<String, Class> availablePlugins = new TreeMap<>();
private static final Map<String, PluginInfo> pluginInfoCache = new TreeMap<>();
private static final Map<String, Class> availablePlugins = new ConcurrentHashMap<>();
private static final Map<String, PluginInfo> pluginInfoCache = new ConcurrentHashMap<>();
static {
PluginFactory.registerPlugin(TelephonyPlugin.class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment