Skip to content

Commit

Permalink
Add missing update to the shared class cache search path
Browse files Browse the repository at this point in the history
URLClassPath.getResource(String name, boolean check) was removed in 24
 due to the security manager removal. The OpenJ9 patch to update the
scc's search path was lost because of this change.

Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Jan 10, 2025
1 parent 34f83da commit c8a2184
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/*
* ===========================================================================
* (c) Copyright IBM Corp. 1997, 2023 All Rights Reserved
* (c) Copyright IBM Corp. 1997, 2025 All Rights Reserved
* ===========================================================================
*/

Expand Down Expand Up @@ -431,6 +431,9 @@ public Resource getResource(String name) {
for (int i = 0; (loader = getLoader(i)) != null; i++) {
Resource res = loader.getResource(name);
if (res != null) {
res.setClasspathLoadIndex(i); /* Store the classpath index that this resource came from. */ //OpenJ9-shared_classes_misc
/* Update the search path with shared Classes Helper, this is only if we are using shared classes. */ //OpenJ9-shared_classes_misc
updateClasspathWithSharedClassesHelper(i); //OpenJ9-shared_classes_misc
return res;
}
}
Expand Down

0 comments on commit c8a2184

Please sign in to comment.