1.保证拦截器在.def文件中定以后严格有序。
This commit is contained in:
parent
cc816aa51f
commit
80da19e610
|
|
@ -4,7 +4,8 @@ import java.io.BufferedReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.HashSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ai.cloud.skywalking.util.StringUtil;
|
||||
|
|
@ -12,7 +13,7 @@ import com.ai.cloud.skywalking.util.StringUtil;
|
|||
public class PluginCfg {
|
||||
public final static PluginCfg CFG = new PluginCfg();
|
||||
|
||||
private Set<String> interceptorClassList = new HashSet<String>();
|
||||
private List<String> interceptorClassList = new ArrayList<String>();
|
||||
|
||||
private PluginCfg(){}
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ public class PluginCfg {
|
|||
}
|
||||
}
|
||||
|
||||
public Set<String> getInterceptorClassList(){
|
||||
public List<String> getInterceptorClassList(){
|
||||
return interceptorClassList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package com.ai.cloud.skywalking.plugin.interceptor;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.isConstructor;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.any;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
|
||||
import net.bytebuddy.ByteBuddy;
|
||||
import net.bytebuddy.dynamic.ClassFileLocator;
|
||||
|
|
@ -35,7 +34,7 @@ public class EnhanceClazz4Interceptor {
|
|||
}
|
||||
|
||||
public void enhance() {
|
||||
Set<String> interceptorClassList = PluginCfg.CFG
|
||||
List<String> interceptorClassList = PluginCfg.CFG
|
||||
.getInterceptorClassList();
|
||||
|
||||
for (String interceptorClassName : interceptorClassList) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue