test/hotspot/jtreg/runtime/appcds/ProhibitedPackage.java
changeset 54927 1512d88b24c6
parent 51990 6003e034cdd8
equal deleted inserted replaced
54926:d4e7ccaf1445 54927:1512d88b24c6
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    25 /*
    25 /*
    26  * @test
    26  * @test
    27  * @summary AppCDS handling of prohibited package.
    27  * @summary AppCDS handling of prohibited package.
    28  * @requires vm.cds
    28  * @requires vm.cds
    29  * @library /test/lib
    29  * @library /test/lib
    30  * @modules java.base/jdk.internal.misc
    30  * @modules jdk.jartool/sun.tools.jar
    31  *          java.management
       
    32  *          jdk.jartool/sun.tools.jar
       
    33  * @compile test-classes/ProhibitedHelper.java test-classes/Prohibited.jasm
    31  * @compile test-classes/ProhibitedHelper.java test-classes/Prohibited.jasm
    34  * @run driver ProhibitedPackage
    32  * @run driver ProhibitedPackage
    35  */
    33  */
    36 
    34 
    37 import jdk.test.lib.cds.CDSOptions;
    35 import jdk.test.lib.cds.CDSOptions;
    44         JarBuilder.build("prohibited_pkg", "java/lang/Prohibited", "ProhibitedHelper");
    42         JarBuilder.build("prohibited_pkg", "java/lang/Prohibited", "ProhibitedHelper");
    45 
    43 
    46         String appJar = TestCommon.getTestJar("prohibited_pkg.jar");
    44         String appJar = TestCommon.getTestJar("prohibited_pkg.jar");
    47 
    45 
    48         // Test support for customer loaders
    46         // Test support for customer loaders
    49         if (Platform.areCustomLoadersSupportedForCDS()) {
    47         if (Platform.areCustomLoadersSupportedForCDS() &&
       
    48             !TestCommon.isDynamicArchive()) {
    50             String classlist[] = new String[] {
    49             String classlist[] = new String[] {
    51                 "java/lang/Object id: 1",
    50                 "java/lang/Object id: 1",
    52                 "java/lang/Prohibited id: 2 super: 1 source: " + appJar
    51                 "java/lang/Prohibited id: 2 super: 1 source: " + appJar
    53             };
    52             };
    54 
    53