From 451a576a425eb5e058325c272612714266e23082 Mon Sep 17 00:00:00 2001 From: Alexandre Iline Date: Mon, 8 Feb 2016 18:14:48 -0800 Subject: [PATCH] 8149391: Fix module dependences in java/util tests Reviewed-by: mchung --- jdk/test/java/util/Arrays/TimSortStackSize2.java | 4 +++- jdk/test/java/util/Calendar/Bug6902861.java | 3 ++- jdk/test/java/util/Calendar/CldrFormatNamesTest.java | 3 ++- jdk/test/java/util/Locale/Bug8001562.java | 3 ++- jdk/test/java/util/Locale/HashCodeTest.java | 3 ++- jdk/test/java/util/Locale/InternationalBAT.java | 4 +++- jdk/test/java/util/Locale/LocaleEnhanceTest.java | 3 ++- jdk/test/java/util/Locale/LocaleTest.java | 3 ++- jdk/test/java/util/Locale/ThaiGov.java | 4 ++-- jdk/test/java/util/ResourceBundle/Bug6359330.java | 3 ++- jdk/test/java/util/ResourceBundle/Control/Bug6530694.java | 3 ++- jdk/test/java/util/Scanner/ScanTest.java | 3 ++- jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java | 3 ++- .../ConcurrentHashMap/ConcurrentAssociateTest.java | 3 ++- jdk/test/java/util/concurrent/Phaser/Basic.java | 1 + .../java/util/concurrent/locks/LockSupport/ParkLoops.java | 1 + jdk/test/java/util/concurrent/tck/JSR166TestCase.java | 1 + jdk/test/java/util/logging/CustomLogManagerTest.java | 3 ++- jdk/test/java/util/logging/DrainFindDeadlockTest.java | 4 +++- .../LogManager/Configuration/TestConfigurationLock.java | 4 +++- .../LogManager/RootLogger/setLevel/TestRootLoggerLevel.java | 3 ++- jdk/test/java/util/logging/LogManagerAppContextDeadlock.java | 4 +++- jdk/test/java/util/logging/LoggingDeadlock4.java | 3 ++- jdk/test/java/util/logging/LoggingMXBeanTest.java | 5 +++-- .../java/util/logging/RootLogger/RootLevelInConfigFile.java | 3 ++- jdk/test/java/util/logging/SimpleLogManager.java | 3 ++- jdk/test/java/util/logging/TEST.properties | 1 + jdk/test/java/util/logging/TestAppletLoggerContext.java | 3 ++- jdk/test/java/util/logging/TestGetLoggerNPE.java | 3 ++- jdk/test/java/util/logging/TestLogConfigurationDeadLock.java | 4 +++- .../util/logging/TestLogConfigurationDeadLockWithConf.java | 4 +++- jdk/test/java/util/logging/TestLoggerBundleSync.java | 4 +++- jdk/test/java/util/logging/TestLoggerWeakRefLeak.java | 3 ++- .../java/util/logging/TestLoggingWithMainAppContext.java | 4 +++- jdk/test/java/util/logging/TestMainAppContext.java | 3 ++- jdk/test/java/util/prefs/TEST.properties | 1 + jdk/test/java/util/zip/ZipCoding.java | 3 ++- jdk/test/java/util/zip/ZipFile/DeleteTempJar.java | 3 ++- 38 files changed, 81 insertions(+), 35 deletions(-) create mode 100644 jdk/test/java/util/logging/TEST.properties create mode 100644 jdk/test/java/util/prefs/TEST.properties diff --git a/jdk/test/java/util/Arrays/TimSortStackSize2.java b/jdk/test/java/util/Arrays/TimSortStackSize2.java index 420d6bda9b8..c9f1d6d91bb 100644 --- a/jdk/test/java/util/Arrays/TimSortStackSize2.java +++ b/jdk/test/java/util/Arrays/TimSortStackSize2.java @@ -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 @@ -25,6 +25,8 @@ * @test * @bug 8072909 * @library /lib/testlibrary /test/lib + * @modules java.management + * java.base/jdk.internal * @build jdk.testlibrary.* * @build TimSortStackSize2 * @run main ClassFileInstaller sun.hotspot.WhiteBox diff --git a/jdk/test/java/util/Calendar/Bug6902861.java b/jdk/test/java/util/Calendar/Bug6902861.java index e8633f3449d..b1aa86fdbd2 100644 --- a/jdk/test/java/util/Calendar/Bug6902861.java +++ b/jdk/test/java/util/Calendar/Bug6902861.java @@ -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 @@ -25,6 +25,7 @@ * @test * @bug 6902861 * @summary Test for a workaround when WEEK_OF_YEAR and YEAR are out of sync. + * @modules jdk.localedata */ import java.util.*; diff --git a/jdk/test/java/util/Calendar/CldrFormatNamesTest.java b/jdk/test/java/util/Calendar/CldrFormatNamesTest.java index bc7ec874e86..4b1588653ef 100644 --- a/jdk/test/java/util/Calendar/CldrFormatNamesTest.java +++ b/jdk/test/java/util/Calendar/CldrFormatNamesTest.java @@ -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 @@ -26,6 +26,7 @@ * @bug 8004489 8006509 8008577 * @summary Unit test for CLDR FormatData resources * @modules java.base/sun.util.locale.provider + * jdk.localedata * @compile -XDignore.symbol.file CldrFormatNamesTest.java * @run main/othervm -Djava.locale.providers=CLDR CldrFormatNamesTest */ diff --git a/jdk/test/java/util/Locale/Bug8001562.java b/jdk/test/java/util/Locale/Bug8001562.java index 1ff1b50c6a2..1a18ac58a97 100644 --- a/jdk/test/java/util/Locale/Bug8001562.java +++ b/jdk/test/java/util/Locale/Bug8001562.java @@ -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 @@ -26,6 +26,7 @@ * @bug 8001562 * @summary Verify that getAvailableLocales() in locale sensitive services * classes return compatible set of locales as in JDK7. + * @modules jdk.localedata * @run main Bug8001562 */ diff --git a/jdk/test/java/util/Locale/HashCodeTest.java b/jdk/test/java/util/Locale/HashCodeTest.java index 41a19c30037..8163ca03dc3 100644 --- a/jdk/test/java/util/Locale/HashCodeTest.java +++ b/jdk/test/java/util/Locale/HashCodeTest.java @@ -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 * @bug 4944561 * @summary Test hashCode() to have less than 10% of hash code conflicts. + * @modules jdk.localedata */ import java.util.*; diff --git a/jdk/test/java/util/Locale/InternationalBAT.java b/jdk/test/java/util/Locale/InternationalBAT.java index b3b576c3964..01789e93c2c 100644 --- a/jdk/test/java/util/Locale/InternationalBAT.java +++ b/jdk/test/java/util/Locale/InternationalBAT.java @@ -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 @@ -26,6 +26,8 @@ * @summary Basic acceptance test for international J2RE. Verifies that the * most important locale data and character converters exist and are * minimally functional. + * @modules jdk.localedata + * jdk.charsets * @run main/othervm -Djava.locale.providers=JRE,SPI InternationalBAT */ diff --git a/jdk/test/java/util/Locale/LocaleEnhanceTest.java b/jdk/test/java/util/Locale/LocaleEnhanceTest.java index 7c7779bfcbe..a4a2f1106fc 100644 --- a/jdk/test/java/util/Locale/LocaleEnhanceTest.java +++ b/jdk/test/java/util/Locale/LocaleEnhanceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013, 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 @@ -46,6 +46,7 @@ import java.util.Set; * @bug 6875847 6992272 7002320 7015500 7023613 7032820 7033504 7004603 * 7044019 8008577 * @summary test API changes to Locale + * @modules jdk.localedata * @compile LocaleEnhanceTest.java * @run main/othervm -Djava.locale.providers=JRE,SPI -esa LocaleEnhanceTest */ diff --git a/jdk/test/java/util/Locale/LocaleTest.java b/jdk/test/java/util/Locale/LocaleTest.java index fad41015c27..90510ce2fda 100644 --- a/jdk/test/java/util/Locale/LocaleTest.java +++ b/jdk/test/java/util/Locale/LocaleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2012, 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 @@ -27,6 +27,7 @@ * 4147315 4147317 4147552 4335196 4778440 4940539 5010672 6475525 6544471 6627549 * 6786276 7066203 7085757 8008577 8030696 * @summary test Locales + * @modules jdk.localedata * @run main/othervm -Djava.locale.providers=JRE,SPI LocaleTest */ /* diff --git a/jdk/test/java/util/Locale/ThaiGov.java b/jdk/test/java/util/Locale/ThaiGov.java index 55bdee2e808..5dfe8d15c65 100644 --- a/jdk/test/java/util/Locale/ThaiGov.java +++ b/jdk/test/java/util/Locale/ThaiGov.java @@ -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,7 +24,7 @@ * @test * @bug 4474409 * @author John O'Conner - * + * @modules jdk.localedata */ import java.util.*; diff --git a/jdk/test/java/util/ResourceBundle/Bug6359330.java b/jdk/test/java/util/ResourceBundle/Bug6359330.java index 7163e843d21..8dd31ad0cb5 100644 --- a/jdk/test/java/util/ResourceBundle/Bug6359330.java +++ b/jdk/test/java/util/ResourceBundle/Bug6359330.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, 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 @@ -26,6 +26,7 @@ * @summary Make sure that getBundle doesn't cause a security error * with a security manager when instantialing RBClassLoader (internal * classloader). + * @modules java.xml * @run main/othervm Bug6359330 */ diff --git a/jdk/test/java/util/ResourceBundle/Control/Bug6530694.java b/jdk/test/java/util/ResourceBundle/Control/Bug6530694.java index 97bb919d6bd..f9e6495fcf3 100644 --- a/jdk/test/java/util/ResourceBundle/Control/Bug6530694.java +++ b/jdk/test/java/util/ResourceBundle/Control/Bug6530694.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2012, 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 @@ * @bug 6530694 * @summary Checks that sun.util.CoreResourceBundleControl does not apply * to the application provided Swing resources. + * @modules java.desktop * @run main/othervm -Djava.awt.headless=true Bug6530694 */ diff --git a/jdk/test/java/util/Scanner/ScanTest.java b/jdk/test/java/util/Scanner/ScanTest.java index 9f9103d382e..45383f0674a 100644 --- a/jdk/test/java/util/Scanner/ScanTest.java +++ b/jdk/test/java/util/Scanner/ScanTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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,6 +27,7 @@ * 8072722 * @summary Basic tests of java.util.Scanner methods * @key randomness + * @modules jdk.localedata * @run main/othervm ScanTest */ diff --git a/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java b/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java index c5dc4b6fedb..4e092b41a50 100644 --- a/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java +++ b/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 * @bug 8005471 8008577 8129881 8130845 8136518 + * @modules jdk.localedata * @run main/othervm -Djava.locale.providers=CLDR CLDRDisplayNamesTest * @summary Make sure that localized time zone names of CLDR are used * if specified. diff --git a/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java b/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java index 320cfbe8f9d..35b836f2568 100644 --- a/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java +++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java @@ -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 @@ -46,6 +46,7 @@ import java.util.stream.Stream; * @run testng/timeout=1200 ConcurrentAssociateTest * @summary Test that association operations, such as put and compute, * place entries in the map + * @modules java.management */ @Test public class ConcurrentAssociateTest { diff --git a/jdk/test/java/util/concurrent/Phaser/Basic.java b/jdk/test/java/util/concurrent/Phaser/Basic.java index 951e22fc0ac..dd6a9e90081 100644 --- a/jdk/test/java/util/concurrent/Phaser/Basic.java +++ b/jdk/test/java/util/concurrent/Phaser/Basic.java @@ -37,6 +37,7 @@ * @key intermittent * @summary Basic tests for Phaser * @author Chris Hegarty + * @modules java.management */ import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java b/jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java index 1e44e4a5d13..1b098ea953e 100644 --- a/jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java +++ b/jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java @@ -35,6 +35,7 @@ * @test * @bug 8074773 * @summary Stress test looks for lost unparks + * @modules java.management * @run main/timeout=1200 ParkLoops */ diff --git a/jdk/test/java/util/concurrent/tck/JSR166TestCase.java b/jdk/test/java/util/concurrent/tck/JSR166TestCase.java index 8063047f8b4..69b2c93d0af 100644 --- a/jdk/test/java/util/concurrent/tck/JSR166TestCase.java +++ b/jdk/test/java/util/concurrent/tck/JSR166TestCase.java @@ -36,6 +36,7 @@ /* * @test * @summary JSR-166 tck tests + * @modules java.management * @build * * @run junit/othervm/timeout=1000 -Djsr166.testImplementationDetails=true JSR166TestCase */ diff --git a/jdk/test/java/util/logging/CustomLogManagerTest.java b/jdk/test/java/util/logging/CustomLogManagerTest.java index 8cf5d0115ee..c21cda5b8a8 100644 --- a/jdk/test/java/util/logging/CustomLogManagerTest.java +++ b/jdk/test/java/util/logging/CustomLogManagerTest.java @@ -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 @@ import sun.util.logging.PlatformLogger; * @summary Add loggers to custom log manager * * @modules java.base/sun.util.logging + * java.logging * @compile -XDignore.symbol.file CustomLogManagerTest.java CustomLogManager.java * @run main/othervm -Djava.util.logging.manager=CustomLogManager CustomLogManagerTest */ diff --git a/jdk/test/java/util/logging/DrainFindDeadlockTest.java b/jdk/test/java/util/logging/DrainFindDeadlockTest.java index 56fd18895be..7bd7b81bd90 100644 --- a/jdk/test/java/util/logging/DrainFindDeadlockTest.java +++ b/jdk/test/java/util/logging/DrainFindDeadlockTest.java @@ -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 @@ -34,6 +34,8 @@ import java.util.Map; * @bug 8010939 * @summary check for deadlock between findLogger() and drainLoggerRefQueueBounded() * @author jim.gish@oracle.com + * @modules java.logging + * java.management * @build DrainFindDeadlockTest * @run main/othervm DrainFindDeadlockTest * @key randomness diff --git a/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.java b/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.java index 7799b631f51..04ef1f2788d 100644 --- a/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.java +++ b/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.java @@ -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 @@ -46,6 +46,8 @@ import java.util.logging.Logger; * focuses more particularly on potential deadlock in * drainLoggerRefQueueBounded / readConfiguration / reset * todo: add at randomness + * @modules java.logging + * java.management * @run main/othervm TestConfigurationLock * @author danielfuchs */ diff --git a/jdk/test/java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java b/jdk/test/java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java index 1d34511c84d..c3a98fe9630 100644 --- a/jdk/test/java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java +++ b/jdk/test/java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java @@ -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 @@ -36,6 +36,7 @@ import java.util.logging.LoggingPermission; * @bug 8026499 * @summary checks that Logger.getLogger("").setLevel() is working correctly. * @modules java.base/sun.util.logging + * java.logging * @build TestRootLoggerLevel * @run main/othervm -Dtest.security=on TestRootLoggerLevel * @run main/othervm -Dtest.security=off TestRootLoggerLevel diff --git a/jdk/test/java/util/logging/LogManagerAppContextDeadlock.java b/jdk/test/java/util/logging/LogManagerAppContextDeadlock.java index 36e0301e3f7..2f1641f49e3 100644 --- a/jdk/test/java/util/logging/LogManagerAppContextDeadlock.java +++ b/jdk/test/java/util/logging/LogManagerAppContextDeadlock.java @@ -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 @@ -44,6 +44,8 @@ import jdk.internal.misc.SharedSecrets; * @summary check that when LogManager is initialized, a deadlock similar * to that described in 8065709 will not occur. * @modules java.base/jdk.internal.misc + * java.logging + * java.management * @run main/othervm LogManagerAppContextDeadlock UNSECURE * @run main/othervm LogManagerAppContextDeadlock SECURE * diff --git a/jdk/test/java/util/logging/LoggingDeadlock4.java b/jdk/test/java/util/logging/LoggingDeadlock4.java index 1fa50d356a2..06769e31338 100644 --- a/jdk/test/java/util/logging/LoggingDeadlock4.java +++ b/jdk/test/java/util/logging/LoggingDeadlock4.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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,6 +27,7 @@ * @summary Deadlock between LogManager. and Logger.getLogger() * @author Daniel D. Daugherty * @modules java.base/sun.util.logging + * java.logging * @compile -XDignore.symbol.file LoggingDeadlock4.java * @run main/othervm/timeout=15 LoggingDeadlock4 */ diff --git a/jdk/test/java/util/logging/LoggingMXBeanTest.java b/jdk/test/java/util/logging/LoggingMXBeanTest.java index a023aeeb0e7..ec1396e6c11 100644 --- a/jdk/test/java/util/logging/LoggingMXBeanTest.java +++ b/jdk/test/java/util/logging/LoggingMXBeanTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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,7 +27,8 @@ * * @summary Basic Test for LoggingMXBean via MBeanServer * @author Ron Mann - * + * @modules java.logging + * java.management * @build LoggingMXBeanTest * @run main LoggingMXBeanTest */ diff --git a/jdk/test/java/util/logging/RootLogger/RootLevelInConfigFile.java b/jdk/test/java/util/logging/RootLogger/RootLevelInConfigFile.java index 9fe785b3ae0..04590871544 100644 --- a/jdk/test/java/util/logging/RootLogger/RootLevelInConfigFile.java +++ b/jdk/test/java/util/logging/RootLogger/RootLevelInConfigFile.java @@ -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 @@ -43,6 +43,7 @@ import jdk.internal.misc.SharedSecrets; * @summary Tests that setting .level=FINEST for the root logger in logging * configuration file does work. * @modules java.base/jdk.internal.misc + * java.logging * @run main/othervm RootLevelInConfigFile * * @author danielfuchs diff --git a/jdk/test/java/util/logging/SimpleLogManager.java b/jdk/test/java/util/logging/SimpleLogManager.java index c6e0b48e237..4e3f9d869e9 100644 --- a/jdk/test/java/util/logging/SimpleLogManager.java +++ b/jdk/test/java/util/logging/SimpleLogManager.java @@ -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 @@ -32,6 +32,7 @@ import sun.util.logging.PlatformLogger; * logger (see the subclassing information in the Logger class specification) * * @modules java.base/sun.util.logging + * java.logging * @compile -XDignore.symbol.file CustomLogManager.java SimpleLogManager.java * @run main/othervm -Djava.util.logging.manager=SimpleLogManager SimpleLogManager */ diff --git a/jdk/test/java/util/logging/TEST.properties b/jdk/test/java/util/logging/TEST.properties new file mode 100644 index 00000000000..3690ef2a1b5 --- /dev/null +++ b/jdk/test/java/util/logging/TEST.properties @@ -0,0 +1 @@ +modules = java.logging diff --git a/jdk/test/java/util/logging/TestAppletLoggerContext.java b/jdk/test/java/util/logging/TestAppletLoggerContext.java index aa6ee76f5a5..23e38bf2817 100644 --- a/jdk/test/java/util/logging/TestAppletLoggerContext.java +++ b/jdk/test/java/util/logging/TestAppletLoggerContext.java @@ -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 @@ -43,6 +43,7 @@ import jdk.internal.misc.SharedSecrets; * LogManager.getLogManager().getLogger * * @modules java.base/jdk.internal.misc + * java.logging * @run main/othervm -Dtest.security=off TestAppletLoggerContext LoadingApplet * @run main/othervm -Dtest.security=on TestAppletLoggerContext LoadingApplet * @run main/othervm -Dtest.security=off TestAppletLoggerContext LoadingMain diff --git a/jdk/test/java/util/logging/TestGetLoggerNPE.java b/jdk/test/java/util/logging/TestGetLoggerNPE.java index c1cbf06834b..6b84d1c3122 100644 --- a/jdk/test/java/util/logging/TestGetLoggerNPE.java +++ b/jdk/test/java/util/logging/TestGetLoggerNPE.java @@ -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 @@ -36,6 +36,7 @@ import jdk.internal.misc.SharedSecrets; * @summary NPE with logging while launching webstart * * @modules java.base/jdk.internal.misc + * java.logging * @build TestGetLoggerNPE * @run main/othervm TestGetLoggerNPE getLogger * @run main/othervm TestGetLoggerNPE getLogManager diff --git a/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java b/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java index 880fa1a9eb4..9679e03f6f5 100644 --- a/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java +++ b/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java @@ -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 @@ -38,6 +38,8 @@ import java.util.logging.Logger; * @summary Synchronization issues in Logger and LogManager. This test * focusses more particularly on potential deadlock in * drainLoggerRefQueueBounded / readConfiguration + * @modules java.logging + * java.management * @run main/othervm TestLogConfigurationDeadLock * @author danielfuchs */ diff --git a/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java b/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java index 2aa89bc4401..5ec160ae807 100644 --- a/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java +++ b/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java @@ -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 @@ -44,6 +44,8 @@ import java.util.logging.Logger; * @bug 8027670 8029281 * @summary Deadlock in drainLoggerRefQueueBounded / readConfiguration * caused by synchronization issues in Logger and LogManager. + * @modules java.logging + * java.management * @run main/othervm TestLogConfigurationDeadLockWithConf * @author danielfuchs * @key randomness diff --git a/jdk/test/java/util/logging/TestLoggerBundleSync.java b/jdk/test/java/util/logging/TestLoggerBundleSync.java index a4f73c1f5a3..757e4f66a8b 100644 --- a/jdk/test/java/util/logging/TestLoggerBundleSync.java +++ b/jdk/test/java/util/logging/TestLoggerBundleSync.java @@ -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 @@ -53,6 +53,8 @@ import java.util.logging.Logger; * java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java. * Note that this is a best effort test. Running it in a loop to * reproduce intermittent issues can be a good idea. + * @modules java.logging + * java.management * @run main/othervm TestLoggerBundleSync * @author danielfuchs */ diff --git a/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java b/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java index 3a14e74074c..b18f5224942 100644 --- a/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java +++ b/jdk/test/java/util/logging/TestLoggerWeakRefLeak.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, 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 @@ -39,6 +39,7 @@ import sun.tools.attach.HotSpotVirtualMachine; * @summary Check for WeakReference leak in Logger and anonymous Logger objects * @library /lib/testlibrary * @modules jdk.attach/sun.tools.attach + * java.logging * @build jdk.testlibrary.ProcessTools * @run main/othervm TestLoggerWeakRefLeak Logger * @run main/othervm TestLoggerWeakRefLeak AnonymousLogger diff --git a/jdk/test/java/util/logging/TestLoggingWithMainAppContext.java b/jdk/test/java/util/logging/TestLoggingWithMainAppContext.java index 5489acee22a..fe42bd4b41e 100644 --- a/jdk/test/java/util/logging/TestLoggingWithMainAppContext.java +++ b/jdk/test/java/util/logging/TestLoggingWithMainAppContext.java @@ -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 @@ -31,6 +31,8 @@ import javax.imageio.ImageIO; * @summary Test that the default user context is used when in the main * application context. This test must not be run in same VM or agent * VM mode: it would not test the intended behavior. + * @modules java.desktop + * java.logging * @run main/othervm TestLoggingWithMainAppContext */ public class TestLoggingWithMainAppContext { diff --git a/jdk/test/java/util/logging/TestMainAppContext.java b/jdk/test/java/util/logging/TestMainAppContext.java index 622600c76cb..bde3ef26430 100644 --- a/jdk/test/java/util/logging/TestMainAppContext.java +++ b/jdk/test/java/util/logging/TestMainAppContext.java @@ -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 @@ -31,6 +31,7 @@ import sun.awt.SunToolkit; * @summary checks that calling getLogger() from a Thread whose ThreadGroup is * a child of the main root group doesn't throw an exception. * @modules java.desktop/sun.awt + * java.logging * @build TestMainAppContext * @run main/othervm TestMainAppContext * @author danielfuchs diff --git a/jdk/test/java/util/prefs/TEST.properties b/jdk/test/java/util/prefs/TEST.properties new file mode 100644 index 00000000000..79510a0349f --- /dev/null +++ b/jdk/test/java/util/prefs/TEST.properties @@ -0,0 +1 @@ +modules = java.prefs diff --git a/jdk/test/java/util/zip/ZipCoding.java b/jdk/test/java/util/zip/ZipCoding.java index 281df21a204..ae5d78ab4ad 100644 --- a/jdk/test/java/util/zip/ZipCoding.java +++ b/jdk/test/java/util/zip/ZipCoding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, 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 @@ -25,6 +25,7 @@ * @test * @bug 4244499 4532049 4700978 4820807 4980042 * @summary Test ZipInputStream, ZipOutputStream and ZipFile with non-UTF8 encoding + * @modules jdk.charsets */ import java.io.*; diff --git a/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java b/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java index ae071d82804..8881b04008d 100644 --- a/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java +++ b/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ @summary Make sure URL-downloaded jar files (jar_cache files) will be deleted when VM exits. + @modules jdk.httpserver @build DeleteTempJar @run shell deletetempjar.sh */