wu-sheng commented on code in PR #448:
URL: https://github.com/apache/skywalking-java/pull/448#discussion_r1096483746


##########
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/loader/InterceptorInstanceLoader.java:
##########
@@ -62,7 +62,7 @@ public static <T> T load(String className,
             try {
                 pluginLoader = 
EXTEND_PLUGIN_CLASSLOADERS.get(targetClassLoader);
                 if (pluginLoader == null) {
-                    pluginLoader = new AgentClassLoader(targetClassLoader);
+                    pluginLoader = 
AgentClassLoader.getClassLoader(targetClassLoader);

Review Comment:
   So, you use the cached plugin classloader? I am not following.
   
   EXTEND_PLUGIN_CLASSLOADERS is already a cache, why AgentClassLoader builds a 
cache again?



##########
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/loader/AgentClassLoader.java:
##########
@@ -169,31 +135,15 @@ private Class<?> processLoadedClass(Class<?> loadedClass) 
{
         return loadedClass;
     }
 
-    private List<Jar> getAllJars() {
-        if (allJars == null) {
-            jarScanLock.lock();
-            try {
-                if (allJars == null) {
-                    allJars = doGetJars();
-                }
-            } finally {
-                jarScanLock.unlock();
-            }
-        }
-
-        return allJars;
-    }
-
-    private LinkedList<Jar> doGetJars() {
-        LinkedList<Jar> jars = new LinkedList<>();
+    private static LinkedList<URL> doGetJars(List<File> classpath) {

Review Comment:
   Why is this static?



-- 
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: [email protected]

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

Reply via email to