From 29fe6e4639e2bc9df17640f238e909c20f0bea98 Mon Sep 17 00:00:00 2001 From: leo james Date: Tue, 19 Jul 2022 11:23:11 +0800 Subject: [PATCH] fix shouldSkip check (#548) * fix get version bug * enable cache for get version * add api in all * move enable check to common module * add ark config utils into ark executable jar * get version for non-nested jar * remove unused dep * add dep * inline embed check * fix package npe from cache if empty * update to 2.0.3 * update to 2.0.3-SNAPSHOT * add compatibility for using in inner. * format * add test for finding class from multi libs * revert pom modify * fix should skip Co-authored-by: youji.zzl --- .../support/common/DelegateToMasterBizClassLoaderHook.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sofa-ark-parent/support/ark-support-starter/src/main/java/com/alipay/sofa/ark/support/common/DelegateToMasterBizClassLoaderHook.java b/sofa-ark-parent/support/ark-support-starter/src/main/java/com/alipay/sofa/ark/support/common/DelegateToMasterBizClassLoaderHook.java index 7a2b6372b..82c20d528 100644 --- a/sofa-ark-parent/support/ark-support-starter/src/main/java/com/alipay/sofa/ark/support/common/DelegateToMasterBizClassLoaderHook.java +++ b/sofa-ark-parent/support/ark-support-starter/src/main/java/com/alipay/sofa/ark/support/common/DelegateToMasterBizClassLoaderHook.java @@ -84,8 +84,12 @@ public URL preFindResource(String name, ClassLoaderService classLoaderService, B @Override public URL postFindResource(String name, ClassLoaderService classLoaderService, Biz biz) { + if (biz == null || (!biz.isDeclaredMode() && shouldSkip(name))) { + return null; + } + ClassLoader bizClassLoader = ArkClient.getMasterBiz().getBizClassLoader(); - if (biz == null || (biz.getBizClassLoader() == bizClassLoader)) { + if (biz.getBizClassLoader() == bizClassLoader) { return null; } try {