From 6fff2a81cf7d3d01c5b5f537c6a2f092414b0216 Mon Sep 17 00:00:00 2001 From: Alan Lau Date: Thu, 16 May 2019 21:02:45 +0800 Subject: [PATCH] Remove the unused method. & Modify doc. (#2692) --- .../core/conf/SnifferConfigInitializer.java | 2 +- .../core/plugin/PluginResourcesResolver.java | 22 ------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java index a30382741..c4fbcdf45 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/SnifferConfigInitializer.java @@ -52,7 +52,7 @@ public class SnifferConfigInitializer { /** * If the specified agent config path is set, the agent will try to locate the specified agent config. If the * specified agent config path is not set , the agent will try to locate `agent.config`, which should be in the - * /config dictionary of agent package. + * /config directory of agent package. *

* Also try to override the config by system.properties. All the keys in this place should * start with {@link #ENV_KEY_PREFIX}. e.g. in env `skywalking.agent.service_name=yourAppName` to override diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginResourcesResolver.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginResourcesResolver.java index 6a973a9fa..878e2b905 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginResourcesResolver.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginResourcesResolver.java @@ -55,26 +55,4 @@ public class PluginResourcesResolver { } return null; } - - /** - * Get the classloader. - * First getDefault current thread's classloader, - * if fail, getDefault {@link PluginResourcesResolver}'s classloader. - * - * @return the classloader to find plugin definitions. - */ - private ClassLoader getDefaultClassLoader() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (Throwable ex) { - // Cannot access thread context ClassLoader - falling back to system class loader... - } - if (cl == null) { - // No thread context class loader -> use class loader of this class. - cl = PluginResourcesResolver.class.getClassLoader(); - } - return cl; - } - }