You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "jonyangx (via GitHub)" <gi...@apache.org> on 2023/02/12 04:39:07 UTC

[GitHub] [incubator-eventmesh] jonyangx commented on a diff in pull request #3117: [ISSUE #3116]Refactor ExtensionClassLoader implement

jonyangx commented on code in PR #3117:
URL: https://github.com/apache/incubator-eventmesh/pull/3117#discussion_r1103733951


##########
eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java:
##########
@@ -50,33 +50,34 @@ public class JarExtensionClassLoader implements ExtensionClassLoader {
 
     private static final String EVENT_MESH_PLUGIN_DIR = "eventMeshPluginDir";
 
-    private static final ConcurrentHashMap<Class<?>, Map<String, Class<?>>> EXTENSION_CLASS_CACHE =
-            new ConcurrentHashMap<>(16);
+    private static final String EVENTMESH_EXTENSION_PLUGIN_DIR = System.getProperty(EVENT_MESH_PLUGIN_DIR,
+        Joiner.on(File.separator).join(Lists.newArrayList(".", "plugin")));
 
-    private static final String EVENTMESH_EXTENSION_PLUGIN_DIR =
-            System.getProperty(EVENT_MESH_PLUGIN_DIR,
-                    Joiner.on(File.separator).join(Lists.newArrayList(".", "plugin")));
+    private static final JarExtensionClassLoader INSTANCE = new JarExtensionClassLoader();
+
+    private final ConcurrentHashMap<Class<?>, Map<String, Class<?>>> extensionClassCache = new ConcurrentHashMap<>(16);

Review Comment:
   Why not use static modifier?



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org