HHH-8922 ClassLoaderServiceImpl#getResources should use LinkedHashSet to
preserve ordering Conflicts: hibernate-core/src/main/java/org/hibernate/boot/registry/classloading/internal/ClassLoaderServiceImpl.java
This commit is contained in:
parent
aad23dc804
commit
e712a44ec3
|
@ -31,7 +31,6 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
|
@ -272,7 +271,7 @@ public class ClassLoaderServiceImpl implements ClassLoaderService {
|
|||
|
||||
@Override
|
||||
public Enumeration<URL> getResources(String name) throws IOException {
|
||||
final HashSet<URL> resourceUrls = new HashSet<URL>();
|
||||
final LinkedHashSet<URL> resourceUrls = new LinkedHashSet<URL>();
|
||||
|
||||
for ( ClassLoader classLoader : individualClassLoaders ) {
|
||||
final Enumeration<URL> urls = classLoader.getResources( name );
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.net.URL;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
|
@ -45,8 +45,8 @@ import org.osgi.framework.Bundle;
|
|||
public class OsgiClassLoader extends ClassLoader {
|
||||
// Leave these as Sets -- addClassLoader or addBundle may be called more
|
||||
// than once if a SF or EMF is closed and re-created.
|
||||
private Set<ClassLoader> classLoaders = new HashSet<ClassLoader>();
|
||||
private Set<Bundle> bundles = new HashSet<Bundle>();
|
||||
private Set<ClassLoader> classLoaders = new LinkedHashSet<ClassLoader>();
|
||||
private Set<Bundle> bundles = new LinkedHashSet<Bundle>();
|
||||
|
||||
private Map<String, Class<?>> classCache = new HashMap<String, Class<?>>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue