Skip to content

Commit

Permalink
fixed an infinite recursion caused by the getResources method of Sour…
Browse files Browse the repository at this point in the history
…ceLocationClassLoader. This method would only be called by the plugin mechanism of Selenium when activated from the rascal tutor command executor wrapper for taking snapshots during documentation generation
  • Loading branch information
jurgenvinju committed Jan 26, 2024
1 parent 5b4f8c7 commit 901b8d2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/org/rascalmpl/uri/classloaders/SourceLocationClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,23 @@ public URL getResource(String name) {
public Enumeration<URL> getResources(String name) throws IOException {
List<URL> result = new ArrayList<>(path.size());


for (ClassLoader l : path) {
Enumeration<URL> e = l.getResources(name);
while (e.hasMoreElements()) {
result.add(e.nextElement());
SearchItem item = new SearchItem(l, name);

if (stack.contains(item)) {
continue;
}
try {
stack.push(item);

Enumeration<URL> e = l.getResources(name);
while (e.hasMoreElements()) {
result.add(e.nextElement());
}
}
finally {
stack.pop();
}
}

Expand Down

0 comments on commit 901b8d2

Please sign in to comment.