File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 7878import java .lang .StackWalker .StackFrame ;
7979import java .net .URL ;
8080import java .net .URLClassLoader ;
81+ import java .util .ArrayList ;
8182import java .util .List ;
8283import java .util .regex .Matcher ;
8384import java .util .regex .Pattern ;
@@ -318,12 +319,15 @@ static void checkCustomLoader() throws Exception {
318319 }
319320 }
320321
322+ static ArrayList <ClassLoader > savedLoaders = new ArrayList <>();
323+
321324 static Object initFromCustomLoader () throws Exception {
322325 String path = "cust.jar" ;
323326 URL url = new File (path ).toURI ().toURL ();
324327 URL [] urls = new URL [] {url };
325328 URLClassLoader urlClassLoader =
326329 new URLClassLoader ("MyLoader" , urls , null );
330+ savedLoaders .add (urlClassLoader );
327331 Class c = Class .forName ("SimpleCusty" , true , urlClassLoader );
328332 return c .newInstance ();
329333 }
You can’t perform that action at this time.
0 commit comments