muse-dev[bot] commented on a change in pull request #6537:
URL: https://github.com/apache/skywalking/pull/6537#discussion_r592198648



##########
File path: 
oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleManager.java
##########
@@ -40,21 +40,19 @@ public void init(
         ServiceLoader<ModuleDefine> moduleServiceLoader = 
ServiceLoader.load(ModuleDefine.class);
         ServiceLoader<ModuleProvider> moduleProviderLoader = 
ServiceLoader.load(ModuleProvider.class);
 
-        LinkedList<String> moduleList = new 
LinkedList<>(Arrays.asList(moduleNames));
+        HashSet<String> moduleSet = new HashSet<>(Arrays.asList(moduleNames));
         for (ModuleDefine module : moduleServiceLoader) {
-            for (String moduleName : moduleNames) {
-                if (moduleName.equals(module.name())) {
-                    module.prepare(this, 
applicationConfiguration.getModuleConfiguration(moduleName), 
moduleProviderLoader);
-                    loadedModules.put(moduleName, module);
-                    moduleList.remove(moduleName);
-                }
+            if (moduleSet.contains(module.name())) {
+                module.prepare(this, 
applicationConfiguration.getModuleConfiguration(module.name()), 
moduleProviderLoader);

Review comment:
       I've recorded this as ignored for this pull request. If you change your 
mind, just comment `@muse-dev unignore`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to