< prev index next >

test/hotspot/jtreg/runtime/Dictionary/ProtectionDomainCacheTest.java

Print this page
rev 59076 : [mq]: 8243945


  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8151486 8218266
  27  * @summary Call Class.forName() on the system classloader from a class loaded
  28  *          from a custom classloader, using the current class's protection domain.
  29  * @library /test/lib
  30  * @modules java.base/jdk.internal.misc
  31  * @build jdk.test.lib.Utils
  32  *        jdk.test.lib.util.JarUtils
  33  * @build ClassForName ProtectionDomainCacheTest
  34  * @run main/othervm/policy=test.policy -Djava.security.manager ProtectionDomainCacheTest
  35  */
  36 
  37 import java.net.URL;
  38 import java.net.URLClassLoader;
  39 import java.nio.file.FileSystems;
  40 import java.nio.file.Files;
  41 import java.nio.file.Path;
  42 import java.nio.file.Paths;
  43 import java.util.List;
  44 import jdk.test.lib.Utils;
  45 import jdk.test.lib.util.JarUtils;
  46 import java.io.File;
  47 
  48 import jdk.test.lib.process.OutputAnalyzer;
  49 import jdk.test.lib.process.ProcessTools;
  50 
  51 /*
  52  * Create .jar, load ClassForName from .jar using a URLClassLoader
  53  */
  54 public class ProtectionDomainCacheTest {




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8151486 8218266
  27  * @summary Call Class.forName() on the system classloader from a class loaded
  28  *          from a custom classloader, using the current class's protection domain.
  29  * @library /test/lib
  30  * @modules java.base/jdk.internal.misc
  31  * @build jdk.test.lib.Utils
  32  *        jdk.test.lib.util.JarUtils
  33  * @build ClassForName ProtectionDomainCacheTest
  34  * @run driver ProtectionDomainCacheTest
  35  */
  36 
  37 import java.net.URL;
  38 import java.net.URLClassLoader;
  39 import java.nio.file.FileSystems;
  40 import java.nio.file.Files;
  41 import java.nio.file.Path;
  42 import java.nio.file.Paths;
  43 import java.util.List;
  44 import jdk.test.lib.Utils;
  45 import jdk.test.lib.util.JarUtils;
  46 import java.io.File;
  47 
  48 import jdk.test.lib.process.OutputAnalyzer;
  49 import jdk.test.lib.process.ProcessTools;
  50 
  51 /*
  52  * Create .jar, load ClassForName from .jar using a URLClassLoader
  53  */
  54 public class ProtectionDomainCacheTest {


< prev index next >