Skip to content

Commit

Permalink
revert because of regression
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Sep 4, 2024
1 parent 41f14bd commit 328ed31
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions core/src/main/java/lucee/commons/lang/PhysicalClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import lucee.commons.io.SystemUtil;
import lucee.commons.io.log.LogUtil;
import lucee.commons.io.res.Resource;
import lucee.commons.io.res.filter.ExtensionResourceFilter;
import lucee.commons.io.res.type.file.FileResource;
import lucee.commons.io.res.util.ResourceUtil;
import lucee.runtime.PageSourcePool;
Expand Down Expand Up @@ -459,21 +458,10 @@ public static List<Resource> toSortedList(Resource[] resources) {

private static URL[] doURLs(Collection<Resource> reses) throws IOException {
List<URL> list = new ArrayList<URL>();
addURLs(list, reses);
return list.toArray(new URL[list.size()]);
}

private static void addURLs(List<URL> list, Collection<Resource> reses) throws IOException {
for (Resource res: reses) {
if ("jar".equalsIgnoreCase(ResourceUtil.getExtension(res, null))) list.add(doURL(res));
else if (res.isDirectory()) {
List<Resource> children = new ArrayList<>();
for (Resource child: res.listResources(new ExtensionResourceFilter(true, "jar"))) {
children.add(child);
}
addURLs(list, children);
}
for (Resource r: reses) {
if (r.isDirectory() || "jar".equalsIgnoreCase(ResourceUtil.getExtension(r, null))) list.add(doURL(r));
}
return list.toArray(new URL[list.size()]);
}

private static URL doURL(Resource res) throws IOException {
Expand Down

0 comments on commit 328ed31

Please sign in to comment.