8165604: Fix module dependencies for sun/util/* tests
authorskovalev
Wed, 07 Sep 2016 10:04:46 -0700
changeset 40791 a080a12eaa93
parent 40790 7095191b31b3
child 40792 cfcc66f92aec
8165604: Fix module dependencies for sun/util/* tests Reviewed-by: rriggs, naoto
jdk/test/sun/util/locale/provider/Bug8038436.java
jdk/test/sun/util/locale/provider/Bug8152817.java
jdk/test/sun/util/resources/Calendar/Bug4518811.java
jdk/test/sun/util/resources/Calendar/Bug4527203.java
jdk/test/sun/util/resources/Locale/Bug4429024.java
jdk/test/sun/util/resources/Locale/Bug4965260.java
jdk/test/sun/util/resources/Locale/Bug6275682.java
jdk/test/sun/util/resources/TimeZone/Bug4938846.java
jdk/test/sun/util/resources/TimeZone/Bug6271396.java
jdk/test/sun/util/resources/TimeZone/Bug6317929.java
jdk/test/sun/util/resources/TimeZone/Bug6377794.java
jdk/test/sun/util/resources/TimeZone/Bug6442006.java
jdk/test/sun/util/resources/cldr/Bug8134250.java
jdk/test/sun/util/resources/cldr/Bug8145136.java
--- a/jdk/test/sun/util/locale/provider/Bug8038436.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/locale/provider/Bug8038436.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016 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
@@ -27,15 +27,25 @@
  * @summary Test for changes in 8038436
  * @modules java.base/sun.util.locale.provider
  *          java.base/sun.util.spi
+ *          jdk.localedata
  * @compile -XDignore.symbol.file Bug8038436.java
  * @run main/othervm  --limit-modules java.base      Bug8038436  security
  * @run main/othervm  -Djava.locale.providers=COMPAT Bug8038436  availlocs
  */
 
-import java.security.*;
-import java.util.*;
-import java.util.stream.*;
-import sun.util.locale.provider.*;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Formatter;
+import java.util.GregorianCalendar;
+import java.util.List;
+import java.util.Locale;
+import java.util.stream.Collectors;
+import sun.util.locale.provider.LocaleProviderAdapter;
 
 public class Bug8038436 {
     public static void main(String[] args) {
--- a/jdk/test/sun/util/locale/provider/Bug8152817.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/locale/provider/Bug8152817.java	Wed Sep 07 10:04:46 2016 -0700
@@ -28,6 +28,7 @@
  * @bug 8152817
  * @summary Make sure that resource bundles in the jdk.localedata module are
  *          loaded under a security manager.
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=COMPAT
  *      -Djava.security.debug=access,failure,codebase=jrt:/jdk.localedata Bug8152817
  */
--- a/jdk/test/sun/util/resources/Calendar/Bug4518811.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/Calendar/Bug4518811.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -22,9 +22,10 @@
  */
 
 /*
- *@test
- *@bug 4518811
- *@summary Verifies the minimum days of the week for euro locales
+ * @test
+ * @bug 4518811
+ * @modules jdk.localedata
+ * @summary Verifies the minimum days of the week for euro locales
  */
 
 // this code is a bit brute-force, but I've been coding in nothing but Shell for the last year, so I'm rusty.
--- a/jdk/test/sun/util/resources/Calendar/Bug4527203.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/Calendar/Bug4527203.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -24,6 +24,7 @@
 /*
  * @test 1.1 11/02/01
  * @bug 4527203
+ * @modules jdk.localedata
  * @summary In Hungary and Ukraine first day of week is Monday not Sunday
  */
 
--- a/jdk/test/sun/util/resources/Locale/Bug4429024.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/Locale/Bug4429024.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -20,12 +20,13 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/**
-    @test
-    @summary checking localised language/country names in finnish
-    @bug 4429024 4964035 6558856 8008577
-    @run main/othervm -Djava.locale.providers=JRE,SPI Bug4429024
-*/
+/*
+ * @test
+ * @summary checking localised language/country names in finnish
+ * @modules jdk.localedata
+ * @bug 4429024 4964035 6558856 8008577
+ * @run main/othervm -Djava.locale.providers=JRE,SPI Bug4429024
+ */
 
 import java.util.Locale;
 
--- a/jdk/test/sun/util/resources/Locale/Bug4965260.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/Locale/Bug4965260.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, 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
@@ -20,11 +20,12 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/**
- *@test
- *@bug 4965260 8008577
- *@summary Verifies the language name of "nl" for supported locales
- *@run main/othervm -Djava.locale.providers=JRE,SPI Bug4965260
+/*
+ * @test
+ * @bug 4965260 8008577
+ * @modules jdk.localedata
+ * @summary Verifies the language name of "nl" for supported locales
+ * @run main/othervm -Djava.locale.providers=JRE,SPI Bug4965260
  */
 
 import java.util.Locale;
--- a/jdk/test/sun/util/resources/Locale/Bug6275682.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/Locale/Bug6275682.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, 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
@@ -21,10 +21,11 @@
  * questions.
  */
 
-/**
-    @test
-    @summary Verifying that the language names starts with lowercase in spanish
-    @bug 6275682
+/*
+ * @test
+ * @summary Verifying that the language names starts with lowercase in spanish
+ * @modules jdk.localedata
+ * @bug 6275682
 */
 
 import java.util.Locale;
--- a/jdk/test/sun/util/resources/TimeZone/Bug4938846.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/TimeZone/Bug4938846.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -22,10 +22,11 @@
  */
 
 /*
- *@test
- *@bug 4938846 8008577
- *@summary Test case for en_IE TimeZone info
- *@run main/othervm -Djava.locale.providers=JRE,SPI Bug4938846
+ * @test
+ * @bug 4938846 8008577
+ * @modules jdk.localedata
+ * @summary Test case for en_IE TimeZone info
+ * @run main/othervm -Djava.locale.providers=JRE,SPI Bug4938846
  */
 
 import java.util.Locale;
--- a/jdk/test/sun/util/resources/TimeZone/Bug6271396.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/TimeZone/Bug6271396.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -22,10 +22,11 @@
  */
 
 /*
- *@test
- *@bug 6271396 8008577
- *@summary Test case for verifying typo of timezone display name Australia/Lord_Howe
- *@run main/othervm -Djava.locale.providers=JRE,SPI Bug6271396
+ * @test
+ * @bug 6271396 8008577
+ * @modules jdk.localedata
+ * @summary Test case for verifying typo of timezone display name Australia/Lord_Howe
+ * @run main/othervm -Djava.locale.providers=JRE,SPI Bug6271396
  */
 
 import java.util.Locale;
--- a/jdk/test/sun/util/resources/TimeZone/Bug6317929.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/TimeZone/Bug6317929.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, 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
@@ -22,10 +22,11 @@
  */
 
 /*
- *@test
- *@bug 6317929 6409419 8008577
- *@summary Test case for tzdata2005m support for 9 locales
- *@run main/othervm -Djava.locale.providers=JRE,SPI Bug6317929
+ * @test
+ * @bug 6317929 6409419 8008577
+ * @modules jdk.localedata
+ * @summary Test case for tzdata2005m support for 9 locales
+ * @run main/othervm -Djava.locale.providers=JRE,SPI Bug6317929
  */
 
 import java.util.Locale;
--- a/jdk/test/sun/util/resources/TimeZone/Bug6377794.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/TimeZone/Bug6377794.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -22,10 +22,11 @@
  */
 
 /*
- *@test
- *@bug 6377794
- *@summary Test case for tzdata2005r support for 9 locales
- *@run main/othervm -Djava.locale.providers=JRE,SPI Bug6377794
+ * @test
+ * @bug 6377794
+ * @modules jdk.localedata
+ * @summary Test case for tzdata2005r support for 9 locales
+ * @run main/othervm -Djava.locale.providers=JRE,SPI Bug6377794
  */
 
 import java.util.Locale;
--- a/jdk/test/sun/util/resources/TimeZone/Bug6442006.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/TimeZone/Bug6442006.java	Wed Sep 07 10:04:46 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -22,10 +22,11 @@
  */
 
 /*
- *@test
- *@bug 6442006 8008577
- *@summary Test case for verifying timezone display name for Asia/Taipei
- *@run main/othervm -Djava.locale.providers=JRE,SPI Bug6442006
+ * @test
+ * @bug 6442006 8008577
+ * @modules jdk.localedata
+ * @summary Test case for verifying timezone display name for Asia/Taipei
+ * @run main/othervm -Djava.locale.providers=JRE,SPI Bug6442006
  */
 
 import java.util.Locale;
--- a/jdk/test/sun/util/resources/cldr/Bug8134250.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/cldr/Bug8134250.java	Wed Sep 07 10:04:46 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
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 8134250 8134520
+ * @modules jdk.localedata
  * @summary Tests CLDR/LDML features are correctly reflected in JDK.
  * @run main/othervm -Djava.locale.providers=CLDR Bug8134250
  */
@@ -31,10 +32,15 @@
 // Note this test highly depends on a particular version of CLDR. Results
 // may vary in the future.
 
-import java.time.*;
-import java.time.chrono.*;
-import java.time.format.*;
-import java.util.*;
+import java.time.LocalDate;
+import java.time.Month;
+import java.time.ZoneId;
+import java.time.chrono.Chronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.time.format.TextStyle;
+import java.util.Locale;
 
 public class Bug8134250 {
     public static void main(String [] args) {
--- a/jdk/test/sun/util/resources/cldr/Bug8145136.java	Wed Sep 07 18:35:21 2016 +0530
+++ b/jdk/test/sun/util/resources/cldr/Bug8145136.java	Wed Sep 07 10:04:46 2016 -0700
@@ -25,6 +25,7 @@
  /*
  * @test
  * @bug 8145136
+ * @modules jdk.localedata
  * @summary Tests CLDR 28/29 newly added feature LikelySubtags is correctly reflected in JDK.
  * @run main/othervm -Djava.locale.providers=CLDR Bug8145136
  */