Skip to content

Commit

Permalink
Remove url ref in native scenario
Browse files Browse the repository at this point in the history
Signed-off-by: crazyhzm <[email protected]>
  • Loading branch information
CrazyHZM committed Mar 28, 2024
1 parent 0c7e32f commit 4481768
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -81,15 +80,9 @@ public static Set<URL> loadResources(String fileName, ClassLoader currentClassLo
Enumeration<URL> 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);
}
}
Expand Down

0 comments on commit 4481768

Please sign in to comment.