@Override public void start() { pluginsByKeys = new HashMap<>(installer.installRemotes()); pluginInstancesByKeys = new HashMap<>( loader.load(pluginsByKeys.values().stream() .map(ScannerPlugin::getInfo) .collect(toMap(PluginInfo::getKey, Function.identity())))); // this part is only used by medium tests for (Object[] localPlugin : installer.installLocals()) { String pluginKey = (String) localPlugin[0]; PluginInfo pluginInfo = new PluginInfo(pluginKey); pluginsByKeys.put(pluginKey, new ScannerPlugin(pluginInfo.getKey(), (long) localPlugin[2], pluginInfo)); pluginInstancesByKeys.put(pluginKey, (Plugin) localPlugin[1]); } keysByClassLoader = new HashMap<>(); for (Map.Entry<String, Plugin> e : pluginInstancesByKeys.entrySet()) { keysByClassLoader.put(e.getValue().getClass().getClassLoader(), e.getKey()); } logPlugins(); }
@Override public void start() { pluginsByKeys = new HashMap<>(installer.installRemotes()); pluginInstancesByKeys = new HashMap<>( loader.load(pluginsByKeys.values().stream() .map(ScannerPlugin::getInfo) .collect(toMap(PluginInfo::getKey, Function.identity())))); // this part is only used by medium tests for (Object[] localPlugin : installer.installLocals()) { String pluginKey = (String) localPlugin[0]; PluginInfo pluginInfo = new PluginInfo(pluginKey); pluginsByKeys.put(pluginKey, new ScannerPlugin(pluginInfo.getKey(), (long) localPlugin[2], pluginInfo)); pluginInstancesByKeys.put(pluginKey, (Plugin) localPlugin[1]); } keysByClassLoader = new HashMap<>(); for (Map.Entry<String, Plugin> e : pluginInstancesByKeys.entrySet()) { keysByClassLoader.put(e.getValue().getClass().getClassLoader(), e.getKey()); } logPlugins(); }