diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java index 8c743c214f15..770821319260 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java @@ -16,7 +16,6 @@ */ package org.apache.dubbo.common.utils; -import org.apache.dubbo.common.aot.NativeDetector; import org.apache.dubbo.common.logger.ErrorTypeAwareLogger; import org.apache.dubbo.common.logger.LoggerFactory; import org.apache.dubbo.common.resource.GlobalResourcesRepository; @@ -81,15 +80,9 @@ public static Set loadResources(String fileName, ClassLoader currentClassLo Enumeration urls; try { urls = currentClassLoader.getResources(fileName); - boolean isNative = NativeDetector.inNativeImage(); if (urls != null) { while (urls.hasMoreElements()) { URL url = urls.nextElement(); - if (isNative) { - // In native mode, the address of each URL is the same instead of different paths, so it is - // necessary to set the ref to make it different - setRef(url); - } set.add(url); } }