Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Objects;
import java.util.Vector;

/**
* A custom classloader dedicated to loading Connect plugin classes in classloading isolation.
Expand Down Expand Up @@ -87,7 +89,7 @@ public URL getResource(String name) {
@Override
public Enumeration<URL> getResources(String name) throws IOException {
Objects.requireNonNull(name);
Vector<URL> resources = new Vector<>();
List<URL> resources = new ArrayList<>();
for (Enumeration<URL> foundLocally = findResources(name); foundLocally.hasMoreElements();) {
URL url = foundLocally.nextElement();
if (url != null)
Expand All @@ -99,7 +101,7 @@ public Enumeration<URL> getResources(String name) throws IOException {
if (url != null)
resources.add(url);
}
return resources.elements();
return Collections.enumeration(resources);
}

// This method needs to be thread-safe because it is supposed to be called by multiple
Expand Down