Skip to content

Commit

Permalink
Merge pull request #1347 from hanbingleixue/sermant-class-loader
Browse files Browse the repository at this point in the history
字节码增强忽略SermantClassLoader加载的类
  • Loading branch information
Sherlockhan authored Oct 26, 2023
2 parents 68b270f + 53ab7b2 commit e103574
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.huaweicloud.sermant.core.plugin.classloader.PluginClassLoader;
import com.huaweicloud.sermant.core.plugin.classloader.ServiceClassLoader;
import com.huaweicloud.sermant.core.utils.FileUtils;
import com.huaweicloud.sermant.god.common.SermantClassLoader;

import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.agent.builder.AgentBuilder.Default;
Expand Down Expand Up @@ -326,6 +327,9 @@ private boolean isArrayOrPrimitive(TypeDescription typeDesc) {
}

private boolean checkClassLoader(TypeDescription typeDesc, ClassLoader classLoader) {
if (classLoader instanceof SermantClassLoader) {
return true;
}
if (classLoader instanceof FrameworkClassLoader) {
return true;
}
Expand Down

0 comments on commit e103574

Please sign in to comment.