8151913: Fix module dependencies in java/net tests
authormli
Sun, 12 Jun 2016 21:55:20 -0700
changeset 38883 d5de564f8089
parent 38882 efb06b82374b
child 38884 48a0335cdadc
8151913: Fix module dependencies in java/net tests Summary: Module dependency declaration for java/net/* tests Reviewed-by: alanb Contributed-by: John Jiang <sha.jiang@oracle.com>
jdk/test/java/net/Authenticator/B4769350.java
jdk/test/java/net/Authenticator/Deadlock.java
jdk/test/java/net/CookieHandler/EmptyCookieHeader.java
jdk/test/java/net/CookieHandler/LocalHostCookie.java
jdk/test/java/net/HttpCookie/IllegalCookieNameTest.java
jdk/test/java/net/ResponseCache/Test.java
jdk/test/java/net/ResponseCache/Test2.java
jdk/test/java/net/SetFactoryPermission/SetFactoryPermission.java
jdk/test/java/net/Socks/SocksIPv6Test.java
jdk/test/java/net/URLClassLoader/ClassLoad.java
jdk/test/java/net/URLClassLoader/closetest/CloseTest.java
jdk/test/java/net/URLPermission/URLTest.java
jdk/test/java/net/httpclient/APIErrors.java
jdk/test/java/net/httpclient/BasicAuthTest.java
jdk/test/java/net/httpclient/ImmutableHeaders.java
jdk/test/java/net/httpclient/ManyRequests.java
jdk/test/java/net/httpclient/RequestBodyTest.java
jdk/test/java/net/httpclient/SmokeTest.java
jdk/test/java/net/httpclient/TEST.properties
jdk/test/java/net/httpclient/security/Security.java
jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java
--- a/jdk/test/java/net/Authenticator/B4769350.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/Authenticator/B4769350.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 4769350 8017779
+ * @modules jdk.httpserver
  * @run main/othervm B4769350 server
  * @run main/othervm B4769350 proxy
  * @summary proxy authentication username and password caching only works in serial case
--- a/jdk/test/java/net/Authenticator/Deadlock.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/Authenticator/Deadlock.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 6648001
+ * @modules jdk.httpserver
  * @run main/othervm/timeout=20 -ea:sun.net.www.protocol.http.AuthenticationInfo -Dhttp.auth.serializeRequests=true Deadlock
  * @summary  cancelling HTTP authentication causes deadlock
  */
--- a/jdk/test/java/net/CookieHandler/EmptyCookieHeader.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/CookieHandler/EmptyCookieHeader.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 8015799
+ * @modules jdk.httpserver
  * @summary HttpURLConnection.getHeaderFields() throws IllegalArgumentException
  */
 
--- a/jdk/test/java/net/CookieHandler/LocalHostCookie.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/CookieHandler/LocalHostCookie.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -33,6 +33,7 @@
 /*
  * @test
  * @bug 7169142
+ * @modules jdk.httpserver
  * @summary CookieHandler does not work with localhost
  * @run main/othervm LocalHostCookie
  */
--- a/jdk/test/java/net/HttpCookie/IllegalCookieNameTest.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/HttpCookie/IllegalCookieNameTest.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -23,6 +23,7 @@
 
 /* @test
  * @bug 7183292
+ * @modules jdk.httpserver
  */
 import java.net.*;
 import java.util.*;
--- a/jdk/test/java/net/ResponseCache/Test.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/ResponseCache/Test.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -24,6 +24,7 @@
 /* @test
  * @summary Fixed a potential NullPointerException when setting a ResponseCache that returns a null CacheRequest
  * @bug 4837267
+ * @modules jdk.httpserver
  * @author Michael McMahon
  */
 
--- a/jdk/test/java/net/ResponseCache/Test2.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/ResponseCache/Test2.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -25,6 +25,7 @@
  * @test
  * @bug 8042622
  * @summary Check for CRL results in IllegalArgumentException "white space not allowed"
+ * @modules jdk.httpserver
  * @run main/othervm Test2
  */
 
--- a/jdk/test/java/net/SetFactoryPermission/SetFactoryPermission.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/SetFactoryPermission/SetFactoryPermission.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -26,6 +26,7 @@
  * @test
  * @bug 8048052
  * @summary Test a series of methods which requires "setFactory" runtime permission
+ * @modules java.rmi
  * @run main SetFactoryPermission success
  * @run main/othervm/policy=policy.fail SetFactoryPermission fail
  * @run main/othervm/policy=policy.success SetFactoryPermission success
--- a/jdk/test/java/net/Socks/SocksIPv6Test.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/Socks/SocksIPv6Test.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -23,6 +23,7 @@
 
 /* @test
  * @bug 7100957
+ * @modules jdk.httpserver
  * @summary Java doesn't correctly handle the SOCKS protocol when used over IPv6.
  * @run testng SocksIPv6Test
  */
--- a/jdk/test/java/net/URLClassLoader/ClassLoad.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/URLClassLoader/ClassLoad.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 4151665
+ * @modules jdk.httpserver
  * @summary Test for FileNotFoundException when loading bogus class
  */
 
--- a/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 4167874
+ * @modules jdk.httpserver
  * @library ../../../../com/sun/net/httpserver
  * @library /lib/testlibrary
  * @build FileServerHandler jdk.testlibrary.FileUtils
--- a/jdk/test/java/net/URLPermission/URLTest.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/URLPermission/URLTest.java	Sun Jun 12 21:55:20 2016 -0700
@@ -27,6 +27,7 @@
  *
  * @test
  * @bug 8010464
+ * @modules jdk.httpserver
  * @key intermittent
  * @library /lib/testlibrary/
  * @build jdk.testlibrary.SimpleSSLContext
--- a/jdk/test/java/net/httpclient/APIErrors.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/httpclient/APIErrors.java	Sun Jun 12 21:55:20 2016 -0700
@@ -24,6 +24,8 @@
 /**
  * @test
  * @bug 8087112
+ * @modules java.httpclient
+ *          jdk.httpserver
  * @library /lib/testlibrary/
  * @build jdk.testlibrary.SimpleSSLContext ProxyServer
  * @build TestKit
--- a/jdk/test/java/net/httpclient/BasicAuthTest.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/httpclient/BasicAuthTest.java	Sun Jun 12 21:55:20 2016 -0700
@@ -25,6 +25,8 @@
 /**
  * @test
  * @bug 8087112
+ * @modules java.httpclient
+ *          jdk.httpserver
  * @run main/othervm BasicAuthTest
  * @summary Basic Authentication Test
  */
--- a/jdk/test/java/net/httpclient/ImmutableHeaders.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/httpclient/ImmutableHeaders.java	Sun Jun 12 21:55:20 2016 -0700
@@ -25,6 +25,8 @@
 /**
  * @test
  * @bug 8087112
+ * @modules java.httpclient
+ *          jdk.httpserver
  * @run main/othervm ImmutableHeaders
  * @summary ImmutableHeaders
  */
--- a/jdk/test/java/net/httpclient/ManyRequests.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/httpclient/ManyRequests.java	Sun Jun 12 21:55:20 2016 -0700
@@ -24,6 +24,8 @@
 /**
  * @test
  * @bug 8087112
+ * @modules java.httpclient
+ *          jdk.httpserver
  * @library /lib/testlibrary/ /
  * @build jdk.testlibrary.SimpleSSLContext EchoHandler
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
--- a/jdk/test/java/net/httpclient/RequestBodyTest.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/httpclient/RequestBodyTest.java	Sun Jun 12 21:55:20 2016 -0700
@@ -23,6 +23,8 @@
 
 /**
  * @test @bug 8087112
+ * @modules java.httpclient
+ *          jdk.httpserver
  * @library /lib/testlibrary/ /
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
--- a/jdk/test/java/net/httpclient/SmokeTest.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/httpclient/SmokeTest.java	Sun Jun 12 21:55:20 2016 -0700
@@ -24,6 +24,8 @@
 /**
  * @test
  * @bug 8087112
+ * @modules java.httpclient
+ *          jdk.httpserver
  * @library /lib/testlibrary/ /
  * @build jdk.testlibrary.SimpleSSLContext ProxyServer EchoHandler
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/httpclient/TEST.properties	Sun Jun 12 21:55:20 2016 -0700
@@ -0,0 +1,1 @@
+modules = java.httpclient
--- a/jdk/test/java/net/httpclient/security/Security.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/httpclient/security/Security.java	Sun Jun 12 21:55:20 2016 -0700
@@ -25,6 +25,8 @@
 /**
  * @test
  * @bug 8087112
+ * @modules java.httpclient
+ *          jdk.httpserver
  * @library /lib/testlibrary/
  * @build jdk.testlibrary.SimpleSSLContext
  * @compile ../../../../com/sun/net/httpserver/LogFilter.java
--- a/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java	Sun Jun 12 12:14:52 2016 -0700
+++ b/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java	Sun Jun 12 21:55:20 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -45,6 +45,7 @@
 /*
  * @test
  * @bug 8064924
+ * @modules java.compiler
  * @summary Basic test for URLStreamHandlerProvider
  * @library /lib/testlibrary
  * @build jdk.testlibrary.FileUtils jdk.testlibrary.JDKToolFinder