diff --git a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/LinkClassTest.java b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/LinkClassTest.java index ea6abe02cee..388c942a9a2 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/LinkClassTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/LinkClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ * /test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/test-classes * @build LinkClassApp * @build jdk.test.whitebox.WhiteBox - * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar link_class_app.jar LinkClassApp Parent Child Parent2 Child2 MyShutdown + * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar link_class_app.jar LinkClassApp Parent Child Parent2 Child2 LinkClassApp$MyShutdown * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. LinkClassTest */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/test-classes/LinkClassApp.java b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/test-classes/LinkClassApp.java index 1cfb4507450..347c9325393 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/test-classes/LinkClassApp.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/test-classes/LinkClassApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,13 +46,13 @@ class Child2 extends Parent2 { int get() {return 4;} } -class MyShutdown extends Thread{ - public void run(){ - System.out.println("shut down hook invoked..."); +class LinkClassApp { + static class MyShutdown extends Thread{ + public void run(){ + System.out.println("shut down hook invoked..."); + } } -} -class LinkClassApp { public static void main(String args[]) { Runtime r=Runtime.getRuntime(); r.addShutdownHook(new MyShutdown());