8176195: Fix misc module dependencies in jdk_core tests
authorxiaofeya
Wed, 08 Mar 2017 17:17:41 -0800
changeset 44115 bb4e971bf5d4
parent 44114 c6c96b739bad
child 44116 fa73683c2c10
8176195: Fix misc module dependencies in jdk_core tests Reviewed-by: mchung
jdk/test/java/io/FilePermission/ReadFileOnPath.java
jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java
jdk/test/java/nio/charset/Charset/CharsetContainmentTest.java
jdk/test/java/nio/charset/Charset/Contains.java
jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java
jdk/test/java/nio/charset/Charset/RegisteredCharsets.java
jdk/test/java/nio/charset/CharsetEncoder/Flush.java
jdk/test/java/nio/charset/RemovingSunIO/SunioAlias.java
jdk/test/java/nio/charset/coders/Check.java
jdk/test/java/nio/charset/coders/ResetISO2022JP.java
jdk/test/java/util/ServiceLoader/modules/Basic.java
jdk/test/javax/naming/TEST.properties
jdk/test/javax/sql/rowset/TEST.properties
jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java
jdk/test/sun/nio/cs/CheckHistoricalNames.java
jdk/test/sun/nio/cs/EuroConverter.java
jdk/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java
jdk/test/sun/nio/cs/ISCIITest.java
jdk/test/sun/nio/cs/JISAutoDetectTest.java
jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java
jdk/test/sun/nio/cs/SJISCanEncode.java
jdk/test/sun/nio/cs/StreamEncoderClose.java
jdk/test/sun/nio/cs/Test6254467.java
jdk/test/sun/nio/cs/TestConverterDroppedCharacters.java
jdk/test/sun/nio/cs/TestCp834_SBCS.java
jdk/test/sun/nio/cs/TestCp93xSISO.java
jdk/test/sun/nio/cs/TestIBM1364.java
jdk/test/sun/nio/cs/TestIBMBugs.java
jdk/test/sun/nio/cs/TestISO2022CNDecoder.java
jdk/test/sun/nio/cs/TestISO2022JP.java
jdk/test/sun/nio/cs/TestISO2022JPEncoder.java
jdk/test/sun/nio/cs/TestISO2022JPSubBytes.java
jdk/test/sun/nio/cs/TestIllegalISO2022Esc.java
jdk/test/sun/nio/cs/TestIllegalSJIS.java
jdk/test/sun/nio/cs/TestMS5022X.java
jdk/test/sun/nio/cs/TestSJIS0213.java
jdk/test/sun/nio/cs/TestSJIS0213_SM.java
jdk/test/sun/nio/cs/TestTrailingEscapesISO2022JP.java
--- a/jdk/test/java/io/FilePermission/ReadFileOnPath.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/io/FilePermission/ReadFileOnPath.java	Wed Mar 08 17:17:41 2017 -0800
@@ -26,6 +26,7 @@
  * @bug 8164705
  * @library /lib/testlibrary /test/lib
  * @modules java.base/jdk.internal.misc
+ *          java.compiler
  * @run main ReadFileOnPath
  * @summary Still able to read file on the same path
  */
--- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java	Wed Mar 08 17:17:41 2017 -0800
@@ -24,6 +24,7 @@
 /* @test
  * @bug 4607272 6999915 7185340
  * @summary Unit test for AsynchronousSocketChannel
+ * @modules java.management
  * @run main/othervm -XX:+DisableExplicitGC -XX:MaxDirectMemorySize=75m Leaky
  */
 
--- a/jdk/test/java/nio/charset/Charset/CharsetContainmentTest.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/Charset/CharsetContainmentTest.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4626545 4696726
-   @summary Checks the inter containment relationships between NIO charsets
+ * @bug 4626545 4696726
+ * @summary Checks the inter containment relationships between NIO charsets
+ * @modules jdk.charsets
  */
 
 import java.nio.charset.*;
--- a/jdk/test/java/nio/charset/Charset/Contains.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/Charset/Contains.java	Wed Mar 08 17:17:41 2017 -0800
@@ -24,6 +24,7 @@
 /* @test
  * @summary Unit test for charset containment
  * @bug 6798572
+ * @modules jdk.charsets
  */
 
 import java.nio.charset.*;
--- a/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java	Wed Mar 08 17:17:41 2017 -0800
@@ -25,6 +25,7 @@
  * @test
  * @bug 4777124 6920545 6911753 8073924
  * @summary Verify that all Charset subclasses are available through the API
+ * @modules jdk.charsets
  */
 
 import java.net.URI;
--- a/jdk/test/java/nio/charset/Charset/RegisteredCharsets.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/Charset/RegisteredCharsets.java	Wed Mar 08 17:17:41 2017 -0800
@@ -25,6 +25,7 @@
  * @bug 4473201 4696726 4652234 4482298 4784385 4966197 4267354 5015668
         6911753 8071447
  * @summary Check that registered charsets are actually registered
+ * @modules jdk.charsets
  */
 
 import java.io.*;
--- a/jdk/test/java/nio/charset/CharsetEncoder/Flush.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/CharsetEncoder/Flush.java	Wed Mar 08 17:17:41 2017 -0800
@@ -24,6 +24,7 @@
 /* @test
  * @bug 6227608
  * @summary Test proper handling of flush()
+ * @modules jdk.charsets
  * @author Martin Buchholz
  */
 
--- a/jdk/test/java/nio/charset/RemovingSunIO/SunioAlias.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/RemovingSunIO/SunioAlias.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4454622
-   @summary Check if all supported sun.io encoding names are supported in nio.charset
+ * @bug 4454622
+ * @summary Check if all supported sun.io encoding names are supported in nio.charset
+ * @modules jdk.charsets
  */
 
 import java.util.HashMap;
--- a/jdk/test/java/nio/charset/coders/Check.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/coders/Check.java	Wed Mar 08 17:17:41 2017 -0800
@@ -24,6 +24,7 @@
 /* @test
  * @bug 4712786
  * @summary Check charsets against reference files
+ * @modules jdk.charsets
  *
  * @build Util
  * @run main Check shift_jis ref.shift_jis
--- a/jdk/test/java/nio/charset/coders/ResetISO2022JP.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/nio/charset/coders/ResetISO2022JP.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,9 +22,10 @@
  */
 
 /* @test
-   @bug 6226510
-   @summary Check that ISO-2022-JP's encoder correctly resets to ASCII mode
-   @author Martin Buchholz
+ * @bug 6226510
+ * @summary Check that ISO-2022-JP's encoder correctly resets to ASCII mode
+ * @modules jdk.charsets
+ * @author Martin Buchholz
  */
 
 import java.nio.*;
--- a/jdk/test/java/util/ServiceLoader/modules/Basic.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/java/util/ServiceLoader/modules/Basic.java	Wed Mar 08 17:17:41 2017 -0800
@@ -24,6 +24,7 @@
 /**
  * @test
  * @library modules
+ * @modules java.scripting
  * @build bananascript/*
  * @compile src/pearscript/org/pear/PearScriptEngineFactory.java
  *          src/pearscript/org/pear/PearScript.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/naming/TEST.properties	Wed Mar 08 17:17:41 2017 -0800
@@ -0,0 +1,1 @@
+modules = java.naming
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sql/rowset/TEST.properties	Wed Mar 08 17:17:41 2017 -0800
@@ -0,0 +1,1 @@
+modules = java.sql.rowset
--- a/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java	Wed Mar 08 17:17:41 2017 -0800
@@ -25,6 +25,7 @@
  * @test
  * @bug 5045306 6356004 6993490
  * @modules java.base/sun.net.www
+ *          java.management
  * @library ../../httptest/
  * @build HttpCallback TestHttpServer HttpTransaction
  * @run main/othervm B5045306
--- a/jdk/test/sun/nio/cs/CheckHistoricalNames.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/CheckHistoricalNames.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4513767 4961027 6217210
-   @summary Checks canonical names match between old and (NIO) core charsets
+ * @bug 4513767 4961027 6217210
+ * @summary Checks canonical names match between old and (NIO) core charsets
+ * @modules jdk.charsets
  */
 import java.io.InputStreamReader;
 import java.io.IOException;
--- a/jdk/test/sun/nio/cs/EuroConverter.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/EuroConverter.java	Wed Mar 08 17:17:41 2017 -0800
@@ -27,6 +27,7 @@
  * @summary  Make sure the euro converters, which are derived from
  * existing converters, only differ from their parents at the expected
  * code point.
+ * @modules jdk.charsets
  */
 
 import java.text.*;
--- a/jdk/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/HWKatakanaMS932EncodeTest.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4715330
-   @summary Check MS932/windows-31j encoding (char->byte) for halfwidth katakana chars
+ * @bug 4715330
+ * @summary Check MS932/windows-31j encoding (char->byte) for halfwidth katakana chars
+ * @modules jdk.charsets
  */
 
 /*
--- a/jdk/test/sun/nio/cs/ISCIITest.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/ISCIITest.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4328178
-   @summary Performs baseline and regression test on the ISCII91 charset
+ * @bug 4328178
+ * @summary Performs baseline and regression test on the ISCII91 charset
+ * @modules jdk.charsets
  */
 
 import java.io.*;
--- a/jdk/test/sun/nio/cs/JISAutoDetectTest.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/JISAutoDetectTest.java	Wed Mar 08 17:17:41 2017 -0800
@@ -26,6 +26,7 @@
  * @bug 4087261 4184592
  * @summary Make sure to determine Japanese text encoding as correctly
  * as possible.
+ * @modules jdk.charsets
  */
 
 import java.nio.charset.*;
--- a/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java	Wed Mar 08 17:17:41 2017 -0800
@@ -25,6 +25,7 @@
  * @test
  * @bug 4831163 5053096 5056440 8022224
  * @summary NIO charset basic verification of JISAutodetect decoder
+ * @modules jdk.charsets
  * @author Martin Buchholz
  */
 
--- a/jdk/test/sun/nio/cs/SJISCanEncode.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/SJISCanEncode.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4913702
-   @summary validates canEncode(char c) method for sun.nio.cs.Shift_JIS
+ * @bug 4913702
+ * @summary validates canEncode(char c) method for sun.nio.cs.Shift_JIS
+ * @modules jdk.charsets
  */
 
 
--- a/jdk/test/sun/nio/cs/StreamEncoderClose.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/StreamEncoderClose.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,10 +22,11 @@
  */
 
 /* @test
-   @bug 5005426
-   @summary Check if StreamEncoder close() method works correctly from
-            error recovery after the underneath OutputStream failed to
-            close the first time.
+ * @bug 5005426
+ * @summary Check if StreamEncoder close() method works correctly from
+ *          error recovery after the underneath OutputStream failed to
+ *          close the first time.
+ * @modules jdk.charsets
  */
 
 import java.io.*;
--- a/jdk/test/sun/nio/cs/Test6254467.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/Test6254467.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,9 +22,10 @@
  */
 
 /* @test
-   @bug 6254467
-   @summary Checks if Charset.forName() accepts legal IANA alias names
-            for charset IBM037.
+ * @bug 6254467
+ * @summary Checks if Charset.forName() accepts legal IANA alias names
+ *          for charset IBM037.
+ * @modules jdk.charsets
  */
 import java.nio.charset.Charset;
 
--- a/jdk/test/sun/nio/cs/TestConverterDroppedCharacters.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestConverterDroppedCharacters.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,11 +22,12 @@
  */
 
 /* @test
-   @bug 4122961
-   @summary Verify that converters don't drop characters on buffer boundaries
+ * @bug 4122961
+ * @summary Verify that converters don't drop characters on buffer boundaries
 
-   This is a slightly modified version of the attachment supplied with the
-   bug report.
+ * This is a slightly modified version of the attachment supplied with the
+ * bug report.
+ * @modules jdk.charsets
  */
 import java.io.*;
 
--- a/jdk/test/sun/nio/cs/TestCp834_SBCS.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestCp834_SBCS.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 6379808
-   @summary Check all Cp933 SBCS characters are not supported in Cp834
+ * @bug 6379808
+ * @summary Check all Cp933 SBCS characters are not supported in Cp834
+ * @modules jdk.charsets
  */
 
 import java.io.*;
--- a/jdk/test/sun/nio/cs/TestCp93xSISO.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestCp93xSISO.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4429358
-   @summary Remove illegal SI/SO char to byte mappings
+ * @bug 4429358
+ * @summary Remove illegal SI/SO char to byte mappings
+ * @modules jdk.charsets
  */
 
 public class TestCp93xSISO {
--- a/jdk/test/sun/nio/cs/TestIBM1364.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestIBM1364.java	Wed Mar 08 17:17:41 2017 -0800
@@ -23,8 +23,9 @@
 
 
 /* @test
-   @bug 6803681
-   @summary Test IBM1364
+ * @bug 6803681
+ * @summary Test IBM1364
+ * @modules jdk.charsets
  */
 
 import java.util.Arrays;
--- a/jdk/test/sun/nio/cs/TestIBMBugs.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestIBMBugs.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 6371437 6371422 6371416 6371619 5058184 6371431 6639450 6569191 6577466
-   @summary Check if the problems reported in above bugs have been fixed
+ * @bug 6371437 6371422 6371416 6371619 5058184 6371431 6639450 6569191 6577466
+ * @summary Check if the problems reported in above bugs have been fixed
+ * @modules jdk.charsets
  */
 
 import java.io.*;
--- a/jdk/test/sun/nio/cs/TestISO2022CNDecoder.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestISO2022CNDecoder.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4779029 4924625 6392664 6730652
-   @summary Test decoding of various permutations of valid ISO-2022-CN byte sequences
+ * @bug 4779029 4924625 6392664 6730652
+ * @summary Test decoding of various permutations of valid ISO-2022-CN byte sequences
+ * @modules jdk.charsets
  */
 
 /*
--- a/jdk/test/sun/nio/cs/TestISO2022JP.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestISO2022JP.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4626545 4879522 4913711 4119445 8042125
-   @summary Check full coverage encode/decode for ISO-2022-JP
+ * @bug 4626545 4879522 4913711 4119445 8042125
+ * @summary Check full coverage encode/decode for ISO-2022-JP
+ * @modules jdk.charsets
  */
 
 /*
--- a/jdk/test/sun/nio/cs/TestISO2022JPEncoder.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestISO2022JPEncoder.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4251646
-   @summary Make sure buffer boundary convert works
+ * @bug 4251646
+ * @summary Make sure buffer boundary convert works
+ * @modules jdk.charsets
  */
 
 import java.nio.*;
--- a/jdk/test/sun/nio/cs/TestISO2022JPSubBytes.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestISO2022JPSubBytes.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4262894 6233303
-   @summary Testing substitute character Escape sequence
+ * @bug 4262894 6233303
+ * @summary Testing substitute character Escape sequence
+ * @modules jdk.charsets
  */
 
 import java.nio.*;
--- a/jdk/test/sun/nio/cs/TestIllegalISO2022Esc.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestIllegalISO2022Esc.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4429369
-   @summary  ISO2022CN and ISO2022KR converters throw exception
+ * @bug 4429369
+ * @summary  ISO2022CN and ISO2022KR converters throw exception
+ * @modules jdk.charsets
  */
 
 import java.io.*;
--- a/jdk/test/sun/nio/cs/TestIllegalSJIS.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestIllegalSJIS.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4117820
-   @summary Verify that SJIS.Decoder works properly for values between 0xA000 and 0xA0FC
+ * @bug 4117820
+ * @summary Verify that SJIS.Decoder works properly for values between 0xA000 and 0xA0FC
+ * @modules jdk.charsets
  */
 
 import java.nio.charset.*;
--- a/jdk/test/sun/nio/cs/TestMS5022X.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestMS5022X.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,9 +22,10 @@
  */
 
 /* @test
-   @bug 6173388 6319716
-   @summary Check full coverage encode/decode for Microsoft
-            ISO2022_JP variants MS50220, MS50221 and MSISO2022JP
+ * @bug 6173388 6319716
+ * @summary Check full coverage encode/decode for Microsoft
+ *          ISO2022_JP variants MS50220, MS50221 and MSISO2022JP
+ * @modules jdk.charsets
  */
 
 import java.io.*;
--- a/jdk/test/sun/nio/cs/TestSJIS0213.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestSJIS0213.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 6529796 6710199
-   @summary Test SJIS/MS932_0213 charsets
+ * @bug 6529796 6710199
+ * @summary Test SJIS/MS932_0213 charsets
+ * @modules jdk.charsets
  */
 
 import java.util.Arrays;
--- a/jdk/test/sun/nio/cs/TestSJIS0213_SM.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestSJIS0213_SM.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 7152690
-   @summary Initialize SJIS_0213 charset with SecurityManager enabled
+ * @bug 7152690
+ * @summary Initialize SJIS_0213 charset with SecurityManager enabled
+ * @modules jdk.charsets
  */
 public class TestSJIS0213_SM {
     public static void main(String[] args) throws Throwable {
--- a/jdk/test/sun/nio/cs/TestTrailingEscapesISO2022JP.java	Wed Mar 08 14:45:27 2017 -0800
+++ b/jdk/test/sun/nio/cs/TestTrailingEscapesISO2022JP.java	Wed Mar 08 17:17:41 2017 -0800
@@ -22,8 +22,9 @@
  */
 
 /* @test
-   @bug 4697605 4741233
-   @summary Check decoder behaves correctly in ISO2022_JP
+ * @bug 4697605 4741233
+ * @summary Check decoder behaves correctly in ISO2022_JP
+ * @modules jdk.charsets
  */
 
 import java.io.*;