8166378: Missing dependencies in several java/security tests
authorskovalev
Tue, 04 Oct 2016 11:55:42 +0300
changeset 41226 da753c438a07
parent 41225 900c91b20065
child 41227 ce7381851981
8166378: Missing dependencies in several java/security tests Reviewed-by: xuelei
jdk/test/java/security/AccessController/DoPrivAccompliceTest.java
jdk/test/java/security/Security/ClassLoader/DeprivilegedModuleLoaderTest.java
jdk/test/java/security/Signature/SignatureLength.java
--- a/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java	Tue Oct 04 13:41:52 2016 +0200
+++ b/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java	Tue Oct 04 11:55:42 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, 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 @@
 import java.util.Arrays;
 import java.util.List;
 
-/**
+/*
  * @test
  * @bug 8048362
  * @compile ../../../lib/testlibrary/JavaToolUtils.java
@@ -41,6 +41,7 @@
  * DoPrivAccmplice.jar for reading user.home property from a PrivilagedAction.
  * Run DoPrivTest.jar and try to access user.home property using
  * DoPrivAccmplice.jar.
+ * @modules jdk.compiler
  * @run main/othervm DoPrivAccompliceTest
  */
 
--- a/jdk/test/java/security/Security/ClassLoader/DeprivilegedModuleLoaderTest.java	Tue Oct 04 13:41:52 2016 +0200
+++ b/jdk/test/java/security/Security/ClassLoader/DeprivilegedModuleLoaderTest.java	Tue Oct 04 11:55:42 2016 +0300
@@ -21,6 +21,17 @@
  * questions.
  */
 
+/*
+ * @test
+ * @bug 8159964
+ * @summary Classes from deprivileged modules should get loaded through
+ *          Platform Classloader.
+ * @modules java.xml.crypto
+ *          jdk.security.auth
+ *          jdk.security.jgss
+ * @run main DeprivilegedModuleLoaderTest
+ */
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
@@ -30,13 +41,6 @@
 import com.sun.security.auth.callback.TextCallbackHandler;
 import com.sun.security.jgss.AuthorizationDataEntry;
 
-/*
- * @test
- * @bug 8159964
- * @summary Classes from deprivileged modules should get loaded through
- *          Platform Classloader.
- * @run main DeprivilegedModuleLoaderTest
- */
 public class DeprivilegedModuleLoaderTest {
 
     public static void main(String[] args) {
--- a/jdk/test/java/security/Signature/SignatureLength.java	Tue Oct 04 13:41:52 2016 +0200
+++ b/jdk/test/java/security/Signature/SignatureLength.java	Tue Oct 04 11:55:42 2016 +0300
@@ -21,15 +21,20 @@
  * questions.
  */
 
-import java.security.*;
-
 /*
  * @test
  * @bug 8161571
  * @summary Reject signatures presented for verification that contain extra
  *          bytes.
+ * @modules jdk.crypto.ec
  * @run main SignatureLength
  */
+
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.Signature;
+import java.security.SignatureException;
+
 public class SignatureLength {
 
     public static void main(String[] args) throws Exception {