Changeset 7196
- Timestamp:
- Aug 30, 2016, 1:48:40 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/util/JarClassLoader.java
r7194 r7196 417 417 if (url == null) url = findResource(name); 418 418 419 // 3. Side-load from proxied JAR files (eg. other extensions) 420 if (url == null) 421 { 422 Iterator<JarClassLoaderProxy> it = proxyLoaders.iterator(); 423 while (url == null && it.hasNext()) 424 { 425 JarClassLoaderProxy proxyLoader = it.next(); 426 url = proxyLoader.findResource(name); 427 } 428 } 429 419 430 // 3. Check with parent loader if not done so already 420 431 if (url == null && !delegateFirst) … … 442 453 if (delegateFirst) addResources(resources, parentResources); 443 454 addResources(resources, myResources); 455 Iterator<JarClassLoaderProxy> it = proxyLoaders.iterator(); 456 while (it.hasNext()) 457 { 458 JarClassLoaderProxy proxyLoader = it.next(); 459 addResources(resources, proxyLoader.findResources(name)); 460 } 461 444 462 if (!delegateFirst) addResources(resources, parentResources); 445 463 … … 498 516 } 499 517 if (!isSame) return true; 518 } 519 for (JarClassLoaderProxy proxy : proxyLoaders) 520 { 521 if (proxy.hasChanged()) return true; 500 522 } 501 523 } … … 846 868 return c; 847 869 } 870 871 URL findResource(String name) 872 { 873 if (log.isDebugEnabled()) log.debug("JarClassLoaderProxy.findResource[" + jarPath + "]: " + name); 874 if (!isInitialized) init(); 875 876 URL url = null; 877 if (loader != null) 878 { 879 url = loader.findResource(name); 880 } 881 return url; 882 } 883 884 Enumeration<URL> findResources(String name) 885 { 886 if (log.isDebugEnabled()) log.debug("JarClassLoaderProxy.findResources[" + jarPath + "]: " + name); 887 if (!isInitialized) init(); 888 889 Enumeration<URL> url = null; 890 if (loader != null) 891 { 892 url = loader.findResources(name); 893 } 894 return url; 895 } 896 897 boolean hasChanged() 898 { 899 if (!isInitialized) return false; 900 if (loader != null) return loader.hasChanged(true); 901 return new File(jarPath).exists(); 902 } 848 903 } 849 904 }
Note: See TracChangeset
for help on using the changeset viewer.