From 451a576a425eb5e058325c272612714266e23082 Mon Sep 17 00:00:00 2001 From: Alexandre Iline Date: Mon, 8 Feb 2016 18:14:48 -0800 Subject: [PATCH 01/11] 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 */ From 1377939c5dc801b3311b69f021bdaa86b249cf23 Mon Sep 17 00:00:00 2001 From: Ramanand Patil Date: Tue, 9 Feb 2016 11:17:28 +0530 Subject: [PATCH 02/11] 8148570: TzdbZoneRulesCompiler.java throws Null Pointer Exception While Compiling and building TZDB data file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While getting value from DayOfWeek, -1 is returned if the DayOfWeek is null. The reason to return “-1” being, the same value is checked later while getting day-of-week byte (dowbyte) at line no. 251, ZoneRules.java. Reviewed-by: rriggs, aefimov --- jdk/make/src/classes/build/tools/tzdb/ZoneRules.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/make/src/classes/build/tools/tzdb/ZoneRules.java b/jdk/make/src/classes/build/tools/tzdb/ZoneRules.java index 4d01d3ac5b6..25d7cb7ac09 100644 --- a/jdk/make/src/classes/build/tools/tzdb/ZoneRules.java +++ b/jdk/make/src/classes/build/tools/tzdb/ZoneRules.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 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 @@ -232,7 +232,7 @@ final class ZoneRules { static void writeRule(ZoneOffsetTransitionRule rule, DataOutput out) throws IOException { int month = rule.getMonth().getValue(); byte dom = (byte)rule.getDayOfMonthIndicator(); - int dow = rule.getDayOfWeek().getValue(); + int dow = (rule.getDayOfWeek() == null ? -1 : rule.getDayOfWeek().getValue()); LocalTime time = rule.getLocalTime(); boolean timeEndOfDay = rule.isMidnightEndOfDay(); TimeDefinition timeDefinition = rule.getTimeDefinition(); From 2d836a55954b9d5a71cae05cc33cf48ad0adc93d Mon Sep 17 00:00:00 2001 From: Ramanand Patil Date: Tue, 9 Feb 2016 11:57:57 +0530 Subject: [PATCH 03/11] 8148446: (tz) Support tzdata2016a Reviewed-by: okutsu, aefimov --- jdk/make/data/tzdata/VERSION | 2 +- jdk/make/data/tzdata/asia | 24 ++++++-- jdk/make/data/tzdata/backward | 1 + jdk/make/data/tzdata/europe | 15 ++++- jdk/make/data/tzdata/northamerica | 58 +++++++++---------- jdk/make/data/tzdata/zone.tab | 5 +- .../sun/util/resources/TimeZoneNames.java | 18 +++--- .../util/resources/de/TimeZoneNames_de.java | 17 +++--- .../util/resources/es/TimeZoneNames_es.java | 17 +++--- .../util/resources/fr/TimeZoneNames_fr.java | 17 +++--- .../util/resources/it/TimeZoneNames_it.java | 17 +++--- .../util/resources/ja/TimeZoneNames_ja.java | 17 +++--- .../util/resources/ko/TimeZoneNames_ko.java | 17 +++--- .../resources/pt/BR/TimeZoneNames_pt_BR.java | 17 +++--- .../util/resources/sv/TimeZoneNames_sv.java | 17 +++--- .../resources/zh/CN/TimeZoneNames_zh_CN.java | 17 +++--- .../resources/zh/TW/TimeZoneNames_zh_TW.java | 17 +++--- jdk/test/sun/util/calendar/zi/tzdata/VERSION | 2 +- jdk/test/sun/util/calendar/zi/tzdata/asia | 24 ++++++-- jdk/test/sun/util/calendar/zi/tzdata/backward | 1 + jdk/test/sun/util/calendar/zi/tzdata/europe | 15 ++++- .../sun/util/calendar/zi/tzdata/northamerica | 58 +++++++++---------- jdk/test/sun/util/calendar/zi/tzdata/zone.tab | 5 +- 23 files changed, 218 insertions(+), 180 deletions(-) diff --git a/jdk/make/data/tzdata/VERSION b/jdk/make/data/tzdata/VERSION index 63a2e5d56d5..55966f28162 100644 --- a/jdk/make/data/tzdata/VERSION +++ b/jdk/make/data/tzdata/VERSION @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2015g +tzdata2016a diff --git a/jdk/make/data/tzdata/asia b/jdk/make/data/tzdata/asia index b3adb9616ee..056a5f9c552 100644 --- a/jdk/make/data/tzdata/asia +++ b/jdk/make/data/tzdata/asia @@ -897,6 +897,15 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 9:00 - TLT # India + +# From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic +# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/ +# (2015-12-22): +# In January 1906, several thousand cotton-mill workers rioted on the +# outskirts of Bombay.... They were protesting the proposed abolition of +# local time in favor of Indian Standard Time.... Journalists called this +# dispute the "Battle of the Clocks." It lasted nearly half a century. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? @@ -1107,8 +1116,15 @@ Rule Iran 2032 2033 - Mar 21 0:00 1:00 D Rule Iran 2032 2033 - Sep 21 0:00 0 S Rule Iran 2034 2035 - Mar 22 0:00 1:00 D Rule Iran 2034 2035 - Sep 22 0:00 0 S -Rule Iran 2036 2037 - Mar 21 0:00 1:00 D -Rule Iran 2036 2037 - Sep 21 0:00 0 S +# +# The following rules are approximations starting in the year 2038. +# These are the best post-2037 approximations available, given the +# restrictions of a single rule using a Gregorian-based data format. +# At some point this table will need to be extended, though quite +# possibly Iran will change the rules first. +Rule Iran 2036 max - Mar 21 0:00 1:00 D +Rule Iran 2036 max - Sep 21 0:00 0 S + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time @@ -2134,8 +2150,8 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 # http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=99374&Itemid=2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Pakistan 2002 only - Apr Sun>=2 0:01 1:00 S -Rule Pakistan 2002 only - Oct Sun>=2 0:01 0 - +Rule Pakistan 2002 only - Apr Sun>=2 0:00 1:00 S +Rule Pakistan 2002 only - Oct Sun>=2 0:00 0 - Rule Pakistan 2008 only - Jun 1 0:00 1:00 S Rule Pakistan 2008 2009 - Nov 1 0:00 0 - Rule Pakistan 2009 only - Apr 15 0:00 1:00 S diff --git a/jdk/make/data/tzdata/backward b/jdk/make/data/tzdata/backward index 3c845cfc01c..83527051395 100644 --- a/jdk/make/data/tzdata/backward +++ b/jdk/make/data/tzdata/backward @@ -46,6 +46,7 @@ Link America/Argentina/Mendoza America/Mendoza Link America/Toronto America/Montreal Link America/Rio_Branco America/Porto_Acre Link America/Argentina/Cordoba America/Rosario +Link America/Tijuana America/Santa_Isabel Link America/Denver America/Shiprock Link America/Port_of_Spain America/Virgin Link Pacific/Auckland Antarctica/South_Pole diff --git a/jdk/make/data/tzdata/europe b/jdk/make/data/tzdata/europe index 41987bd1e66..267992150ce 100644 --- a/jdk/make/data/tzdata/europe +++ b/jdk/make/data/tzdata/europe @@ -2616,13 +2616,20 @@ Zone Asia/Irkutsk 6:57:05 - LMT 1880 # Note: Effective 2008-03-01, (75) Chita Oblast and (80) Agin-Buryat # Autonomous Okrug merged to form (92, RU-ZAB) Zabaykalsky Krai. +# From Alexander Krivenyshev (2016-01-02): +# [The] time zone in the Trans-Baikal Territory (Zabaykalsky Krai) - +# Asia/Chita [is changing] from UTC+8 to UTC+9. Effective date will +# be March 27, 2016 at 2:00am.... +# http://publication.pravo.gov.ru/Document/View/000120151230010 + Zone Asia/Chita 7:33:52 - LMT 1919 Dec 15 8:00 - YAKT 1930 Jun 21 # Yakutsk Time 9:00 Russia YAK%sT 1991 Mar 31 2:00s 8:00 Russia YAK%sT 1992 Jan 19 2:00s 9:00 Russia YAK%sT 2011 Mar 27 2:00s 10:00 - YAKT 2014 Oct 26 2:00s - 8:00 - IRKT + 8:00 - IRKT 2016 Mar 27 2:00 + 9:00 - YAKT # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29): @@ -3177,6 +3184,12 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment. # It's officially announced now by the Ministry of Energy. # Turkey delays winter time to 8th of November 04:00 # http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217 +# +# From BBC News (2015-10-25): +# Confused Turks are asking "what's the time?" after automatic clocks defied a +# government decision ... "For the next two weeks #Turkey is on EEST... Erdogan +# Engineered Standard Time," said Twitter user @aysekarahasan. +# http://www.bbc.com/news/world-europe-34631326 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Turkey 1916 only - May 1 0:00 1:00 S diff --git a/jdk/make/data/tzdata/northamerica b/jdk/make/data/tzdata/northamerica index 0e8b4fa975a..e56fd895d10 100644 --- a/jdk/make/data/tzdata/northamerica +++ b/jdk/make/data/tzdata/northamerica @@ -348,6 +348,16 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58 # Statue 175 closer in synch with the US Congress' intent.... # http://www.legis.state.wi.us/2007/data/acts/07Act3.pdf +# From an email administrator of the City of Fort Pierre, SD (2015-12-21): +# Fort Pierre is technically located in the Mountain time zone as is +# the rest of Stanley County. Most of Stanley County and Fort Pierre +# uses the Central time zone due to doing most of their business in +# Pierre so it simplifies schedules. I have lived in Stanley County +# all my life and it has been that way since I can remember. (43 years!) +# +# From Paul Eggert (2015-12-25): +# Assume this practice predates 1970, so Fort Pierre can use America/Chicago. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER Rule Chicago 1920 only - Jun 13 2:00 1:00 D Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S @@ -504,6 +514,12 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02 # For lack of better information, assume that Metlakatla's # abandonment of use of daylight saving resulted from the 1983 vote. +# From Steffen Thorsen (2015-11-09): +# It seems Metlakatla did go off PST on Sunday, November 1, changing +# their time to AKST and are going to follow Alaska's DST, switching +# between AKST and AKDT from now on.... +# http://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/ + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Juneau 15:02:19 - LMT 1867 Oct 18 -8:57:41 - LMT 1900 Aug 20 12:00 @@ -529,7 +545,8 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 18 -8:00 US P%sT 1946 -8:00 - PST 1969 -8:00 US P%sT 1983 Oct 30 2:00 - -8:00 - PST + -8:00 - PST 2015 Nov 1 2:00 + -9:00 US AK%sT Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18 -9:18:55 - LMT 1900 Aug 20 12:00 -9:00 - YST 1942 @@ -2610,25 +2627,6 @@ Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 0:11:56 -8:00 US P%sT 2002 Feb 20 -8:00 Mexico P%sT 2010 -8:00 US P%sT -# Baja California (away from US border) -Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32 - -7:00 - MST 1924 - -8:00 - PST 1927 Jun 10 23:00 - -7:00 - MST 1930 Nov 15 - -8:00 - PST 1931 Apr 1 - -8:00 1:00 PDT 1931 Sep 30 - -8:00 - PST 1942 Apr 24 - -8:00 1:00 PWT 1945 Aug 14 23:00u - -8:00 1:00 PPT 1945 Nov 12 # Peace - -8:00 - PST 1948 Apr 5 - -8:00 1:00 PDT 1949 Jan 14 - -8:00 - PST 1954 - -8:00 CA P%sT 1961 - -8:00 - PST 1976 - -8:00 US P%sT 1996 - -8:00 Mexico P%sT 2001 - -8:00 US P%sT 2002 Feb 20 - -8:00 Mexico P%sT # From Paul Eggert (2006-03-22): # Formerly there was an America/Ensenada zone, which differed from # America/Tijuana only in that it did not observe DST from 1976 @@ -2641,6 +2639,13 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32 # other than America/Tijuana for Baja, but it's not clear yet what its # name or contents should be. # +# From Paul Eggert (2015-10-08): +# Formerly there was an America/Santa_Isabel zone, but this appears to +# have come from a misreading of +# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010 +# It has been moved to the 'backward' file. +# +# # Revillagigedo Is # no information @@ -2715,17 +2720,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton -4:00 US A%sT # Cayman Is - -# From Paul Eggert (2015-05-15): -# The Cayman government has decided to introduce DST in 2016, the idea being -# to keep in sync with New York. The legislation hasn't passed but the change -# seems quite likely. See: Meade B. Cayman 27. -# http://www.cayman27.com.ky/2015/05/15/clock-ticks-toward-daylight-saving-time-in-cayman - -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST 2016 - -5:00 US E%sT +# See America/Panama. # Costa Rica @@ -3248,6 +3243,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. diff --git a/jdk/make/data/tzdata/zone.tab b/jdk/make/data/tzdata/zone.tab index 63d1fddf6b9..51aaf775dee 100644 --- a/jdk/make/data/tzdata/zone.tab +++ b/jdk/make/data/tzdata/zone.tab @@ -306,8 +306,7 @@ MX +2313-10625 America/Mazatlan Mountain Time - S Baja, Nayarit, Sinaloa MX +2838-10605 America/Chihuahua Mexican Mountain Time - Chihuahua away from US border MX +2934-10425 America/Ojinaga US Mountain Time - Chihuahua near US border MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora -MX +3232-11701 America/Tijuana US Pacific Time - Baja California near US border -MX +3018-11452 America/Santa_Isabel Mexican Pacific Time - Baja California away from US border +MX +3232-11701 America/Tijuana US Pacific Time - Baja California state MX +2048-10515 America/Bahia_Banderas Mexican Central Time - Bahia de Banderas MY +0310+10142 Asia/Kuala_Lumpur peninsular Malaysia MY +0133+11020 Asia/Kuching Sabah & Sarawak @@ -437,10 +436,10 @@ US +394421-1045903 America/Denver Mountain Time US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona (except Navajo) US +340308-1181434 America/Los_Angeles Pacific Time -US +550737-1313435 America/Metlakatla Pacific Standard Time - Annette Island, Alaska US +611305-1495401 America/Anchorage Alaska Time US +581807-1342511 America/Juneau Alaska Time - Alaska panhandle US +571035-1351807 America/Sitka Alaska Time - southeast Alaska panhandle +US +550737-1313435 America/Metlakatla Alaska Time - Annette Island US +593249-1394338 America/Yakutat Alaska Time - Alaska panhandle neck US +643004-1652423 America/Nome Alaska Time - west Alaska US +515248-1763929 America/Adak Aleutian Islands diff --git a/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java b/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java index d0b8197fb9e..5722da9d9ed 100644 --- a/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java +++ b/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -275,6 +275,9 @@ public final class TimeZoneNames extends TimeZoneNamesBundle { String XJT[] = new String[] {"Xinjiang Standard Time", "XJT", "Xinjiang Daylight Time", "XJDT", "Xinjiang Time", "XJT"}; + String YAKT[] = new String[] {"Yakutsk Time", "YAKT", + "Yakutsk Summer Time", "YAKST", + "Yakutsk Time", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -486,7 +489,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Pierre & Miquelon Standard Time", "PMST", "Pierre & Miquelon Daylight Time", "PMDT", @@ -607,7 +610,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle { "Brunei Summer Time", "BNST", "Brunei Time", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Choibalsan Time", "CHOT", "Choibalsan Summer Time", "CHOST", "Choibalsan Time", "CHOT"}}, @@ -648,10 +651,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT", - "Khandyga Summer Time", "YAKST", - "Khandyga Time", "YAKT"}}, - + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +717,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"Vladivostok Time", "VLAT", "Vladivostok Summer Time", "VLAST", "Vladivostok Time", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"Yakutsk Time", "YAKT", - "Yakutsk Summer Time", "YAKST", - "Yakutsk Time", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Yekaterinburg Time", "YEKT", "Yekaterinburg Summer Time", "YEKST", "Yekaterinburg Time", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/de/TimeZoneNames_de.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/de/TimeZoneNames_de.java index 6a594cf0199..8fa22f926f5 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/de/TimeZoneNames_de.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/de/TimeZoneNames_de.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { String XJT[] = new String[] {"Chinesische Normalzeit", "XJT", "Chinesische Sommerzeit", "XJDT", "Zeitzone f\u00FCr China", "XJT"}; + String YAKT[] = new String[] {"Jakutsk Zeit", "YAKT", + "Jakutsk Sommerzeit", "YAKST", + "Jakutsk Zeit", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Pierre & Miquelon Normalzeit", "PMST", "Pierre & Miquelon Sommerzeit", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { "Brunei Sommerzeit", "BNST", "Brunei Zeit", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Choibalsan Zeit", "CHOT", "Choibalsan Sommerzeit", "CHOST", "Choibalsan Zeit", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"Chandyga Zeit", "YAKT", - "Chandyga Sommerzeit", "YAKST", - "Chandyga Zeit", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"Wladiwostok Zeit", "VLAT", "Wladiwostok Sommerzeit", "VLAST", "Wladiwostok Zeit", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"Jakutsk Zeit", "YAKT", - "Jakutsk Sommerzeit", "YAKST", - "Jakutsk Zeit", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Jekaterinburger Zeit", "YEKT", "Jekaterinburger Sommerzeit", "YEKST", "Jekaterinburger Zeit", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/es/TimeZoneNames_es.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/es/TimeZoneNames_es.java index ef20bd1a320..c20c02e055a 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/es/TimeZoneNames_es.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/es/TimeZoneNames_es.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { String XJT[] = new String[] {"Hora est\u00e1ndar de China", "XJT", "Hora de verano de China", "XJDT", "Hora de China", "XJT"}; + String YAKT[] = new String[] {"Hora de Yakutsk", "YAKT", + "Hora de verano de Yakutsk", "YAKST", + "Hora de Yakutsk", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Hora est\u00e1ndar de Pierre & Miquelon", "PMST", "Hora de verano de Pierre & Miquelon", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { "Hora de verano de Brunei", "BNST", "Hora de Brunei", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Hora de Choibalsan", "CHOT", "Hora de verano de Choibalsan", "CHOST", "Hora de Choibalsan", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"Hora de Khandyga", "YAKT", - "Hora de verano de Khandyga", "YAKST", - "Hora de Khandyga", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"Hora de Vladivostok", "VLAT", "Hora de verano de Vladivostok", "VLAST", "Hora de Vladivostok", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"Hora de Yakutsk", "YAKT", - "Hora de verano de Yakutsk", "YAKST", - "Hora de Yakutsk", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Hora de Ekaterinburgo", "YEKT", "Hora de verano de Ekaterinburgo", "YEKST", "Hora de Ekaterinburgo", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java index f22b27afcbc..3d812007a75 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { String XJT[] = new String[] {"Heure normale de Chine", "XJT", "Heure avanc\u00e9e de Chine", "XJDT", "Chine", "XJT"}; + String YAKT[] = new String[] {"Heure du Iakoutsk", "YAKT", + "Heure d'\u00e9t\u00e9 du Iakoutsk", "YAKST", + "Heure du Iakoutsk", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Heure normale de Saint-Pierre et Miquelon", "PMST", "Heure avanc\u00e9e de Saint-Pierre et Miquelon", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { "Heure d'\u00e9t\u00e9 du Brunei", "BNST", "Heure du Brunei", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Heure de Choibalsan", "CHOT", "Heure d'\u00e9t\u00e9 de Choibalsan", "CHOST", "Heure de Choibalsan", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"Heure de Khandyga", "YAKT", - "Heure d'\u00E9t\u00E9 de Khandyga", "YAKST", - "Heure de Khandyga", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"Heure de Vladivostok", "VLAT", "Heure d'\u00e9t\u00e9 de Vladivostok", "VLAST", "Heure de Vladivostok", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"Heure du Iakoutsk", "YAKT", - "Heure d'\u00e9t\u00e9 du Iakoutsk", "YAKST", - "Heure du Iakoutsk", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Heure de Yekaterinburg", "YEKT", "Heure d'\u00e9t\u00e9 de Yekaterinburg", "YEKST", "Heure de Yekaterinburg", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/it/TimeZoneNames_it.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/it/TimeZoneNames_it.java index 311ceea07cf..33350c43bfa 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/it/TimeZoneNames_it.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/it/TimeZoneNames_it.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { String XJT[] = new String[] {"Ora solare della Cina", "XJT", "Ora legale della Cina", "XJDT", "Ora Cina", "XJT"}; + String YAKT[] = new String[] {"Ora di Jakutsk", "YAKT", + "Ora estiva di Jakutsk", "YAKST", + "Ora di Yakutsk", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Ora solare di Saint-Pierre e Miquelon", "PMST", "Ora legale di Saint-Pierre e Miquelon", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { "Ora estiva del Brunei", "BNST", "Ora del Brunei", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Ora di Choibalsan", "CHOT", "Ora estiva di Choibalsan", "CHOST", "Ora di Choibalsan", "CHOT"}}, @@ -650,9 +653,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, {"Asia/Kolkata", IST}, - {"Asia/Khandyga", new String[] {"Ora di Khandyga", "YAKT", - "Ora estiva di Khandyga", "YAKST", - "Ora di Khandyga", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"Ora di Vladivostok", "VLAT", "Ora estiva di Vladivostok", "VLAST", "Ora di Vladivostok", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"Ora di Jakutsk", "YAKT", - "Ora estiva di Jakutsk", "YAKST", - "Ora di Yakutsk", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Ora di Ekaterinburg", "YEKT", "Ora estiva di Ekaterinburg", "YEKST", "Ora di Ekaterinburg", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java index 9f6dd7e8aa8..57a3fb7bddf 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { String XJT[] = new String[] {"\u4e2d\u56fd\u6a19\u6e96\u6642", "XJT", "\u4e2d\u56fd\u590f\u6642\u9593", "XJDT", "\u4E2D\u56FD\u6642\u9593", "XJT"}; + String YAKT[] = new String[] {"\u30e4\u30af\u30fc\u30c4\u30af\u6642\u9593", "YAKT", + "\u30e4\u30af\u30fc\u30c4\u30af\u590f\u6642\u9593", "YAKST", + "\u30E4\u30AF\u30FC\u30C4\u30AF\u6642\u9593", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u6a19\u6e96\u6642", "PMST", "\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { "\u30d6\u30eb\u30cd\u30a4\u590f\u6642\u9593", "BNST", "\u30D6\u30EB\u30CD\u30A4\u6642\u9593", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"\u30c1\u30e7\u30a4\u30d0\u30eb\u30b5\u30f3\u6642\u9593", "CHOT", "\u30c1\u30e7\u30a4\u30d0\u30eb\u30b5\u30f3\u590f\u6642\u9593", "CHOST", "\u30C1\u30E7\u30A4\u30D0\u30EB\u30B5\u30F3\u6642\u9593", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u6642\u9593", "YAKT", - "\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u590F\u6642\u9593", "YAKST", - "\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u6642\u9593", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u6642\u9593", "VLAT", "\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u590f\u6642\u9593", "VLAST", "\u30A6\u30E9\u30B8\u30AA\u30B9\u30C8\u30AF\u6642\u9593", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"\u30e4\u30af\u30fc\u30c4\u30af\u6642\u9593", "YAKT", - "\u30e4\u30af\u30fc\u30c4\u30af\u590f\u6642\u9593", "YAKST", - "\u30E4\u30AF\u30FC\u30C4\u30AF\u6642\u9593", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"\u30a8\u30ab\u30c6\u30ea\u30f3\u30d6\u30eb\u30b0\u6642\u9593", "YEKT", "\u30a8\u30ab\u30c6\u30ea\u30f3\u30d6\u30eb\u30b0\u590f\u6642\u9593", "YEKST", "\u30A8\u30AB\u30C6\u30EA\u30F3\u30D6\u30EB\u30AF\u6642\u9593", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java index 7432190e7a9..d17154b3498 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { String XJT[] = new String[] {"\uc911\uad6d \ud45c\uc900\uc2dc", "XJT", "\uc911\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "XJDT", "\uC911\uAD6D \uD45C\uC900\uC2DC", "XJT"}; + String YAKT[] = new String[] {"\uc57c\uce20\ud06c \uc2dc\uac04", "YAKT", + "\uc57c\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "YAKST", + "\uC57C\uCFE0\uCE20\uD06C \uD45C\uC900\uC2DC", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \ud45c\uc900\uc2dc", "PMST", "\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { "\ube0c\ub8e8\ub098\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BNST", "\uBE0C\uB8E8\uB098\uC774 \uD45C\uC900\uC2DC", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Choibalsan \uc2dc\uac04", "CHOT", "Choibalsan \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHOST", "\uCD08\uC774\uBC1C\uC0B0 \uD45C\uC900\uC2DC", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"\uD55C\uB514\uAC00 \uD45C\uC900\uC2DC", "YAKT", - "\uD55C\uB514\uAC00 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "YAKST", - "\uD55C\uB514\uAC00 \uD45C\uC900\uC2DC", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc2dc\uac04", "VLAT", "\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VLAST", "\uBE14\uB77C\uB514\uBCF4\uC2A4\uD1A1 \uD45C\uC900\uC2DC", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"\uc57c\uce20\ud06c \uc2dc\uac04", "YAKT", - "\uc57c\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "YAKST", - "\uC57C\uCFE0\uCE20\uD06C \uD45C\uC900\uC2DC", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"\uc608\uce74\ud14c\ub9b0\ubc84\uadf8 \uc2dc\uac04", "YEKT", "\uc608\uce74\ud14c\ub9b0\ubc84\uadf8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "YEKST", "\uC608\uCE74\uD14C\uB9B0\uBD80\uB974\uD06C \uD45C\uC900\uC2DC", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/pt/BR/TimeZoneNames_pt_BR.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/pt/BR/TimeZoneNames_pt_BR.java index 44bed26f776..04d56b9c2a9 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/pt/BR/TimeZoneNames_pt_BR.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/pt/BR/TimeZoneNames_pt_BR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { String XJT[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da China", "XJT", "Hor\u00e1rio de luz natural da China", "XJDT", "Hor\u00E1rio da China", "XJT"}; + String YAKT[] = new String[] {"Fuso hor\u00e1rio de Yakutsk", "YAKT", + "Fuso hor\u00e1rio de ver\u00e3o de Yakutsk", "YAKST", + "Hor\u00E1rio de Yakutsk", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Fuso hor\u00e1rio padr\u00e3o de S\u00e3o Pedro e Miquelon", "PMST", "Hor\u00e1rio de luz natural de S\u00e3o Pedro e Miquelon", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { "Fuso hor\u00e1rio de ver\u00e3o de Brunei", "BNST", "Hor\u00E1rio de Brunei", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Fuso hor\u00e1rio de Choibalsan", "CHOT", "Fuso hor\u00e1rio de ver\u00e3o de Choibalsan", "CHOST", "Hor\u00E1rio de Choibalsan", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"Hor\u00E1rio de Khandyga", "YAKT", - "Hor\u00E1rio de Ver\u00E3o de Khandyga", "YAKST", - "Hor\u00E1rio de Khandyga", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"Fuso hor\u00e1rio de Vladivostok", "VLAT", "Fuso hor\u00e1rio de ver\u00e3o de Vladivostok", "VLAST", "Hor\u00E1rio de Vladivostok", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"Fuso hor\u00e1rio de Yakutsk", "YAKT", - "Fuso hor\u00e1rio de ver\u00e3o de Yakutsk", "YAKST", - "Hor\u00E1rio de Yakutsk", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Fuso hor\u00e1rio de Yekaterinburgo", "YEKT", "Fuso hor\u00e1rio de ver\u00e3o de Yekaterinburgo", "YEKST", "Hor\u00E1rio de Yekaterinburg", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java index 86285b8c9fa..8705bfe881b 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { String XJT[] = new String[] {"Kina, normaltid", "XJT", "Kina, sommartid", "XJDT", "Kinesisk tid", "XJT"}; + String YAKT[] = new String[] {"Jakutsk, normaltid", "YAKT", + "Jakutsk, sommartid", "YAKST", + "Jakutsk-tid", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Saint-Pierre-et-Miquelon, normaltid", "PMST", "Saint-Pierre-et-Miquelon, sommartid", "PMDT", @@ -613,7 +616,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { "Choibalsan-tid", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"Khandyga, normaltid", "YAKT", - "Khandyga, sommartid", "YAKST", - "Khandyga, normaltid", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"Vladivostok, normaltid", "VLAT", "Vladivostok, sommartid", "VLAST", "Vladivostok-tid", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"Jakutsk, normaltid", "YAKT", - "Jakutsk, sommartid", "YAKST", - "Jakutsk-tid", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Jekaterinburg, normaltid", "YEKT", "Jekaterinburg, sommartid", "YEKST", "Jekaterinburg-tid", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/CN/TimeZoneNames_zh_CN.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/CN/TimeZoneNames_zh_CN.java index f3e82346cd8..be0019b1573 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/CN/TimeZoneNames_zh_CN.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/CN/TimeZoneNames_zh_CN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { String XJT[] = new String[] {"\u4e2d\u56fd\u6807\u51c6\u65f6\u95f4", "XJT", "\u4e2d\u56fd\u590f\u4ee4\u65f6", "XJDT", "\u4E2D\u56FD\u65F6\u95F4", "XJT"}; + String YAKT[] = new String[] {"\u4e9a\u5e93\u6b21\u514b\u65f6\u95f4", "YAKT", + "\u4e9a\u5e93\u6b21\u514b\u590f\u4ee4\u65f6", "YAKST", + "\u4E9A\u5E93\u6B21\u514B\u65F6\u95F4", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u6807\u51c6\u65f6\u95f4", "PMST", "\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u590f\u4ee4\u65f6", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { "\u6587\u83b1\u590f\u4ee4\u65f6", "BNST", "\u6587\u83B1\u65F6\u95F4", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"Choibalsan \u65f6\u95f4", "CHOT", "Choibalsan \u590f\u4ee4\u65f6", "CHOST", "Choibalsan \u65F6\u95F4", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"\u6C49\u5FB7\u52A0\u65F6\u95F4", "YAKT", - "\u6C49\u5FB7\u52A0\u590F\u4EE4\u65F6", "YAKST", - "\u6C49\u5FB7\u52A0\u65F6\u95F4", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -717,9 +718,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"\u6d77\u53c2\u5d34\u65f6\u95f4", "VLAT", "\u6d77\u53c2\u5d34\u590f\u4ee4\u65f6", "VLAST", "\u6D77\u53C2\u5D34\u65F6\u95F4", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"\u4e9a\u5e93\u6b21\u514b\u65f6\u95f4", "YAKT", - "\u4e9a\u5e93\u6b21\u514b\u590f\u4ee4\u65f6", "YAKST", - "\u4E9A\u5E93\u6B21\u514B\u65F6\u95F4", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Yekaterinburg \u65f6\u95f4", "YEKT", "Yekaterinburg \u590f\u4ee4\u65f6", "YEKST", "Yekaterinburg \u65F6\u95F4", "YEKT"}}, diff --git a/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/TW/TimeZoneNames_zh_TW.java b/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/TW/TimeZoneNames_zh_TW.java index b5bce8bbb37..be1de6c6fe7 100644 --- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/TW/TimeZoneNames_zh_TW.java +++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/zh/TW/TimeZoneNames_zh_TW.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -276,6 +276,9 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { String XJT[] = new String[] {"\u4e2d\u570b\u6a19\u6e96\u6642\u9593", "XJT", "\u4e2d\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "XJDT", "\u4E2D\u570B\u6642\u9593", "XJT"}; + String YAKT[] = new String[] {"\u4e9e\u5eab\u6b21\u514b\u6642\u9593", "YAKT", + "\u4e9e\u5eab\u6b21\u514b\u590f\u4ee4\u6642\u9593", "YAKST", + "\u4E9E\u5EAB\u6B21\u514B\u6642\u9593", "YAKT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -487,7 +490,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", PST}, + {"America/Metlakatla", AKST}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u6a19\u6e96\u6642\u9593", "PMST", "\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PMDT", @@ -608,7 +611,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { "\u6c76\u840a\u590f\u4ee4\u6642\u9593", "BNST", "\u6C76\u840A\u6642\u9593", "BNT"}}, {"Asia/Calcutta", IST}, - {"Asia/Chita", IRKT}, + {"Asia/Chita", YAKT}, {"Asia/Choibalsan", new String[] {"\u5de7\u5df4\u5c71 (Choibalsan) \u6642\u9593", "CHOT", "\u5de7\u5df4\u5c71 (Choibalsan) \u590f\u4ee4\u6642\u9593", "CHOST", "\u5DE7\u5DF4\u5C71 (Choibalsan) \u6642\u9593", "CHOT"}}, @@ -649,9 +652,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"Asia/Kashgar", XJT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", new String[] {"\u6F22\u5730\u52A0 (Khandyga) \u6642\u9593", "YAKT", - "\u6F22\u5730\u52A0 (Khandyga) \u590F\u4EE4\u6642\u9593", "YAKST", - "\u6F22\u5730\u52A0 (Khandyga) \u6642\u9593", "YAKT"}}, + {"Asia/Khandyga", YAKT}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", KRAT}, {"Asia/Kuala_Lumpur", MYT}, @@ -719,9 +720,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"Asia/Vladivostok", new String[] {"\u6d77\u53c3\u5d34\u6642\u9593", "VLAT", "\u6d77\u53c3\u5d34\u590f\u4ee4\u6642\u9593", "VLAST", "\u6D77\u53C3\u5D34\u6642\u9593", "VLAT"}}, - {"Asia/Yakutsk", new String[] {"\u4e9e\u5eab\u6b21\u514b\u6642\u9593", "YAKT", - "\u4e9e\u5eab\u6b21\u514b\u590f\u4ee4\u6642\u9593", "YAKST", - "\u4E9E\u5EAB\u6B21\u514B\u6642\u9593", "YAKT"}}, + {"Asia/Yakutsk", YAKT}, {"Asia/Yekaterinburg", new String[] {"Yekaterinburg \u6642\u9593", "YEKT", "Yekaterinburg \u590f\u4ee4\u6642\u9593", "YEKST", "\u8449\u5361\u6377\u7433\u5821\u6642\u9593", "YEKT"}}, diff --git a/jdk/test/sun/util/calendar/zi/tzdata/VERSION b/jdk/test/sun/util/calendar/zi/tzdata/VERSION index 63a2e5d56d5..55966f28162 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/VERSION +++ b/jdk/test/sun/util/calendar/zi/tzdata/VERSION @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2015g +tzdata2016a diff --git a/jdk/test/sun/util/calendar/zi/tzdata/asia b/jdk/test/sun/util/calendar/zi/tzdata/asia index b3adb9616ee..056a5f9c552 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/asia +++ b/jdk/test/sun/util/calendar/zi/tzdata/asia @@ -897,6 +897,15 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 9:00 - TLT # India + +# From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic +# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/ +# (2015-12-22): +# In January 1906, several thousand cotton-mill workers rioted on the +# outskirts of Bombay.... They were protesting the proposed abolition of +# local time in favor of Indian Standard Time.... Journalists called this +# dispute the "Battle of the Clocks." It lasted nearly half a century. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? @@ -1107,8 +1116,15 @@ Rule Iran 2032 2033 - Mar 21 0:00 1:00 D Rule Iran 2032 2033 - Sep 21 0:00 0 S Rule Iran 2034 2035 - Mar 22 0:00 1:00 D Rule Iran 2034 2035 - Sep 22 0:00 0 S -Rule Iran 2036 2037 - Mar 21 0:00 1:00 D -Rule Iran 2036 2037 - Sep 21 0:00 0 S +# +# The following rules are approximations starting in the year 2038. +# These are the best post-2037 approximations available, given the +# restrictions of a single rule using a Gregorian-based data format. +# At some point this table will need to be extended, though quite +# possibly Iran will change the rules first. +Rule Iran 2036 max - Mar 21 0:00 1:00 D +Rule Iran 2036 max - Sep 21 0:00 0 S + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time @@ -2134,8 +2150,8 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 # http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=99374&Itemid=2 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Pakistan 2002 only - Apr Sun>=2 0:01 1:00 S -Rule Pakistan 2002 only - Oct Sun>=2 0:01 0 - +Rule Pakistan 2002 only - Apr Sun>=2 0:00 1:00 S +Rule Pakistan 2002 only - Oct Sun>=2 0:00 0 - Rule Pakistan 2008 only - Jun 1 0:00 1:00 S Rule Pakistan 2008 2009 - Nov 1 0:00 0 - Rule Pakistan 2009 only - Apr 15 0:00 1:00 S diff --git a/jdk/test/sun/util/calendar/zi/tzdata/backward b/jdk/test/sun/util/calendar/zi/tzdata/backward index 3c845cfc01c..83527051395 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/backward +++ b/jdk/test/sun/util/calendar/zi/tzdata/backward @@ -46,6 +46,7 @@ Link America/Argentina/Mendoza America/Mendoza Link America/Toronto America/Montreal Link America/Rio_Branco America/Porto_Acre Link America/Argentina/Cordoba America/Rosario +Link America/Tijuana America/Santa_Isabel Link America/Denver America/Shiprock Link America/Port_of_Spain America/Virgin Link Pacific/Auckland Antarctica/South_Pole diff --git a/jdk/test/sun/util/calendar/zi/tzdata/europe b/jdk/test/sun/util/calendar/zi/tzdata/europe index 41987bd1e66..267992150ce 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/europe +++ b/jdk/test/sun/util/calendar/zi/tzdata/europe @@ -2616,13 +2616,20 @@ Zone Asia/Irkutsk 6:57:05 - LMT 1880 # Note: Effective 2008-03-01, (75) Chita Oblast and (80) Agin-Buryat # Autonomous Okrug merged to form (92, RU-ZAB) Zabaykalsky Krai. +# From Alexander Krivenyshev (2016-01-02): +# [The] time zone in the Trans-Baikal Territory (Zabaykalsky Krai) - +# Asia/Chita [is changing] from UTC+8 to UTC+9. Effective date will +# be March 27, 2016 at 2:00am.... +# http://publication.pravo.gov.ru/Document/View/000120151230010 + Zone Asia/Chita 7:33:52 - LMT 1919 Dec 15 8:00 - YAKT 1930 Jun 21 # Yakutsk Time 9:00 Russia YAK%sT 1991 Mar 31 2:00s 8:00 Russia YAK%sT 1992 Jan 19 2:00s 9:00 Russia YAK%sT 2011 Mar 27 2:00s 10:00 - YAKT 2014 Oct 26 2:00s - 8:00 - IRKT + 8:00 - IRKT 2016 Mar 27 2:00 + 9:00 - YAKT # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29): @@ -3177,6 +3184,12 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment. # It's officially announced now by the Ministry of Energy. # Turkey delays winter time to 8th of November 04:00 # http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217 +# +# From BBC News (2015-10-25): +# Confused Turks are asking "what's the time?" after automatic clocks defied a +# government decision ... "For the next two weeks #Turkey is on EEST... Erdogan +# Engineered Standard Time," said Twitter user @aysekarahasan. +# http://www.bbc.com/news/world-europe-34631326 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Turkey 1916 only - May 1 0:00 1:00 S diff --git a/jdk/test/sun/util/calendar/zi/tzdata/northamerica b/jdk/test/sun/util/calendar/zi/tzdata/northamerica index 0e8b4fa975a..e56fd895d10 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/northamerica +++ b/jdk/test/sun/util/calendar/zi/tzdata/northamerica @@ -348,6 +348,16 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58 # Statue 175 closer in synch with the US Congress' intent.... # http://www.legis.state.wi.us/2007/data/acts/07Act3.pdf +# From an email administrator of the City of Fort Pierre, SD (2015-12-21): +# Fort Pierre is technically located in the Mountain time zone as is +# the rest of Stanley County. Most of Stanley County and Fort Pierre +# uses the Central time zone due to doing most of their business in +# Pierre so it simplifies schedules. I have lived in Stanley County +# all my life and it has been that way since I can remember. (43 years!) +# +# From Paul Eggert (2015-12-25): +# Assume this practice predates 1970, so Fort Pierre can use America/Chicago. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER Rule Chicago 1920 only - Jun 13 2:00 1:00 D Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S @@ -504,6 +514,12 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02 # For lack of better information, assume that Metlakatla's # abandonment of use of daylight saving resulted from the 1983 vote. +# From Steffen Thorsen (2015-11-09): +# It seems Metlakatla did go off PST on Sunday, November 1, changing +# their time to AKST and are going to follow Alaska's DST, switching +# between AKST and AKDT from now on.... +# http://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/ + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Juneau 15:02:19 - LMT 1867 Oct 18 -8:57:41 - LMT 1900 Aug 20 12:00 @@ -529,7 +545,8 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 18 -8:00 US P%sT 1946 -8:00 - PST 1969 -8:00 US P%sT 1983 Oct 30 2:00 - -8:00 - PST + -8:00 - PST 2015 Nov 1 2:00 + -9:00 US AK%sT Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18 -9:18:55 - LMT 1900 Aug 20 12:00 -9:00 - YST 1942 @@ -2610,25 +2627,6 @@ Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 0:11:56 -8:00 US P%sT 2002 Feb 20 -8:00 Mexico P%sT 2010 -8:00 US P%sT -# Baja California (away from US border) -Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32 - -7:00 - MST 1924 - -8:00 - PST 1927 Jun 10 23:00 - -7:00 - MST 1930 Nov 15 - -8:00 - PST 1931 Apr 1 - -8:00 1:00 PDT 1931 Sep 30 - -8:00 - PST 1942 Apr 24 - -8:00 1:00 PWT 1945 Aug 14 23:00u - -8:00 1:00 PPT 1945 Nov 12 # Peace - -8:00 - PST 1948 Apr 5 - -8:00 1:00 PDT 1949 Jan 14 - -8:00 - PST 1954 - -8:00 CA P%sT 1961 - -8:00 - PST 1976 - -8:00 US P%sT 1996 - -8:00 Mexico P%sT 2001 - -8:00 US P%sT 2002 Feb 20 - -8:00 Mexico P%sT # From Paul Eggert (2006-03-22): # Formerly there was an America/Ensenada zone, which differed from # America/Tijuana only in that it did not observe DST from 1976 @@ -2641,6 +2639,13 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32 # other than America/Tijuana for Baja, but it's not clear yet what its # name or contents should be. # +# From Paul Eggert (2015-10-08): +# Formerly there was an America/Santa_Isabel zone, but this appears to +# have come from a misreading of +# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010 +# It has been moved to the 'backward' file. +# +# # Revillagigedo Is # no information @@ -2715,17 +2720,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton -4:00 US A%sT # Cayman Is - -# From Paul Eggert (2015-05-15): -# The Cayman government has decided to introduce DST in 2016, the idea being -# to keep in sync with New York. The legislation hasn't passed but the change -# seems quite likely. See: Meade B. Cayman 27. -# http://www.cayman27.com.ky/2015/05/15/clock-ticks-toward-daylight-saving-time-in-cayman - -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST 2016 - -5:00 US E%sT +# See America/Panama. # Costa Rica @@ -3248,6 +3243,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. diff --git a/jdk/test/sun/util/calendar/zi/tzdata/zone.tab b/jdk/test/sun/util/calendar/zi/tzdata/zone.tab index 63d1fddf6b9..51aaf775dee 100644 --- a/jdk/test/sun/util/calendar/zi/tzdata/zone.tab +++ b/jdk/test/sun/util/calendar/zi/tzdata/zone.tab @@ -306,8 +306,7 @@ MX +2313-10625 America/Mazatlan Mountain Time - S Baja, Nayarit, Sinaloa MX +2838-10605 America/Chihuahua Mexican Mountain Time - Chihuahua away from US border MX +2934-10425 America/Ojinaga US Mountain Time - Chihuahua near US border MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora -MX +3232-11701 America/Tijuana US Pacific Time - Baja California near US border -MX +3018-11452 America/Santa_Isabel Mexican Pacific Time - Baja California away from US border +MX +3232-11701 America/Tijuana US Pacific Time - Baja California state MX +2048-10515 America/Bahia_Banderas Mexican Central Time - Bahia de Banderas MY +0310+10142 Asia/Kuala_Lumpur peninsular Malaysia MY +0133+11020 Asia/Kuching Sabah & Sarawak @@ -437,10 +436,10 @@ US +394421-1045903 America/Denver Mountain Time US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona (except Navajo) US +340308-1181434 America/Los_Angeles Pacific Time -US +550737-1313435 America/Metlakatla Pacific Standard Time - Annette Island, Alaska US +611305-1495401 America/Anchorage Alaska Time US +581807-1342511 America/Juneau Alaska Time - Alaska panhandle US +571035-1351807 America/Sitka Alaska Time - southeast Alaska panhandle +US +550737-1313435 America/Metlakatla Alaska Time - Annette Island US +593249-1394338 America/Yakutat Alaska Time - Alaska panhandle neck US +643004-1652423 America/Nome Alaska Time - west Alaska US +515248-1763929 America/Adak Aleutian Islands From 2d065eb25b760f7d031f8131321c638a7fdde68a Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 9 Feb 2016 11:58:36 -0800 Subject: [PATCH 04/11] 8149492: Problem list CheckEncodings.sh Reviewed-by: rriggs --- jdk/test/ProblemList.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 1b7cc2da8b5..5dbb36d7d98 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -133,6 +133,9 @@ java/beans/Introspector/8132566/OverrideUserDefPropertyInfoTest.java generic-all # 8029891 java/lang/ClassLoader/deadlock/GetResource.java generic-all +# 7008363 +java/lang/StringCoding/CheckEncodings.sh generic-all + ############################################################################ # jdk_instrument From 3e45966cd3f8454720942f3a44754c2db52c137c Mon Sep 17 00:00:00 2001 From: Shilpi Rastogi Date: Wed, 10 Feb 2016 10:44:58 +0100 Subject: [PATCH 05/11] 8138884: MethodHandles.Lookup.findVirtual() Javadoc fails to consider private interface methods Reviewed-by: psandoz, mhaupt --- .../share/classes/java/lang/invoke/MethodHandles.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index 45908f1ea23..fc9ac8e1518 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -856,7 +856,8 @@ assertEquals("", (String) MH_newString.invokeExact()); * @return the desired method handle * @throws NoSuchMethodException if the method does not exist * @throws IllegalAccessException if access checking fails, - * or if the method is {@code static} + * or if the method is {@code static}, + * or if the method is {@code private} method of interface, * or if the method's variable arity modifier bit * is set and {@code asVarargsCollector} fails * @exception SecurityException if a security manager is present and it From ff97659a79401041136ddc3da3de3c13a8dd2f82 Mon Sep 17 00:00:00 2001 From: Shilpi Rastogi Date: Wed, 10 Feb 2016 11:04:13 +0100 Subject: [PATCH 06/11] 8071368: Use more concrete types for NamedFunction constants in the code Reviewed-by: psandoz, vlivanov, mhaupt --- .../classes/java/lang/invoke/Invokers.java | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java b/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java index 32a96ebea7e..277cac28a44 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -305,9 +305,7 @@ class Invokers { /** Static definition of MethodHandle.invokeExact checking code. */ /*non-public*/ static @ForceInline - void checkExactType(Object mhObj, Object expectedObj) { - MethodHandle mh = (MethodHandle) mhObj; - MethodType expected = (MethodType) expectedObj; + void checkExactType(MethodHandle mh, MethodType expected) { MethodType actual = mh.type(); if (actual != expected) throw newWrongMethodTypeException(expected, actual); @@ -319,9 +317,7 @@ class Invokers { */ /*non-public*/ static @ForceInline - Object checkGenericType(Object mhObj, Object expectedObj) { - MethodHandle mh = (MethodHandle) mhObj; - MethodType expected = (MethodType) expectedObj; + MethodHandle checkGenericType(MethodHandle mh, MethodType expected) { return mh.asType(expected); /* Maybe add more paths here. Possible optimizations: * for (R)MH.invoke(a*), @@ -390,14 +386,13 @@ class Invokers { /** Static definition of MethodHandle.invokeGeneric checking code. */ /*non-public*/ static @ForceInline - Object getCallSiteTarget(Object site) { - return ((CallSite)site).getTarget(); + MethodHandle getCallSiteTarget(CallSite site) { + return site.getTarget(); } /*non-public*/ static @ForceInline - void checkCustomized(Object o) { - MethodHandle mh = (MethodHandle)o; + void checkCustomized(MethodHandle mh) { if (MethodHandleImpl.isCompileConstant(mh)) return; if (mh.form.customized == null) { maybeCustomize(mh); @@ -425,13 +420,13 @@ class Invokers { try { NamedFunction nfs[] = { NF_checkExactType = new NamedFunction(Invokers.class - .getDeclaredMethod("checkExactType", Object.class, Object.class)), + .getDeclaredMethod("checkExactType", MethodHandle.class, MethodType.class)), NF_checkGenericType = new NamedFunction(Invokers.class - .getDeclaredMethod("checkGenericType", Object.class, Object.class)), + .getDeclaredMethod("checkGenericType", MethodHandle.class, MethodType.class)), NF_getCallSiteTarget = new NamedFunction(Invokers.class - .getDeclaredMethod("getCallSiteTarget", Object.class)), + .getDeclaredMethod("getCallSiteTarget", CallSite.class)), NF_checkCustomized = new NamedFunction(Invokers.class - .getDeclaredMethod("checkCustomized", Object.class)) + .getDeclaredMethod("checkCustomized", MethodHandle.class)) }; // Each nf must be statically invocable or we get tied up in our bootstraps. assert(InvokerBytecodeGenerator.isStaticallyInvocable(nfs)); From 6c46017af1ebbf2cf36cf609e5d800bf20289453 Mon Sep 17 00:00:00 2001 From: Ivan Gerasimov Date: Wed, 10 Feb 2016 16:16:48 +0300 Subject: [PATCH 07/11] 8046339: sun.rmi.transport.DGCAckHandler leaks memory Reviewed-by: smarks --- .../sun/rmi/transport/DGCAckHandler.java | 5 ++- .../rmi/dgc/dgcAckFailure/DGCAckFailure.java | 37 ++++++++++++++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCAckHandler.java b/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCAckHandler.java index 26e9f7b45d5..3bfa2d3292c 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCAckHandler.java +++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCAckHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -118,6 +118,9 @@ public class DGCAckHandler { if (objList != null && task == null) { task = scheduler.schedule(new Runnable() { public void run() { + if (id != null) { + idTable.remove(id); + } release(); } }, dgcAckTimeout, TimeUnit.MILLISECONDS); diff --git a/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java b/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java index 82eeab00b16..bc1c2dc50ba 100644 --- a/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java +++ b/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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,7 +22,7 @@ */ /* @test - * @bug 4017232 + * @bug 4017232 8046339 * @summary If, after returning a reference to a remote object in the current * VM (which gets implicitly converted to a remote stub), the client fails to * both send a DGC dirty call and to send a "DGC acknowledgment", the RMI @@ -36,10 +36,14 @@ import java.io.*; import java.net.*; +import java.lang.reflect.Field; import java.lang.ref.*; import java.rmi.*; import java.rmi.server.*; +import java.util.Map; + +import sun.rmi.transport.DGCAckHandler; interface ReturnRemote extends Remote { Object returnRemote() throws RemoteException; @@ -48,6 +52,7 @@ interface ReturnRemote extends Remote { public class DGCAckFailure implements ReturnRemote { private static final long TIMEOUT = 20000; + private static final long ACK_TIMEOUT = TIMEOUT / 2; public Object returnRemote() { return new Wrapper(this); @@ -55,7 +60,8 @@ public class DGCAckFailure implements ReturnRemote { public static void main(String[] args) throws Exception { - System.setProperty("sun.rmi.dgc.ackTimeout", "10000"); + System.setProperty("sun.rmi.dgc.ackTimeout", + Long.toString(ACK_TIMEOUT)); /* * Set a socket factory that has a hook for shutting down all client @@ -93,12 +99,31 @@ public class DGCAckFailure implements ReturnRemote { break; } } - if (ref == weakRef) { - System.err.println("TEST PASSED"); - } else { + if (ref != weakRef) { throw new RuntimeException("TEST FAILED: " + "timed out, remote object not garbage collected"); } + + // 8046339 + // All DGCAckHandlers must be properly released after timeout + Thread.sleep(ACK_TIMEOUT + 100); + try { + Field field = + DGCAckHandler.class.getDeclaredField("idTable"); + field.setAccessible(true); + Object obj = field.get(null); + Map idTable = (Map)obj; + + if (!idTable.isEmpty()) { + throw new RuntimeException("TEST FAILED: " + + "DGCAckHandler.idTable isn't empty"); + } + } catch (ReflectiveOperationException roe) { + throw new RuntimeException(roe); + } + + System.err.println("TEST PASSED"); + } finally { try { UnicastRemoteObject.unexportObject((Remote) weakRef.get(), From 32687876fa06a173447ddbfe3654de4ab224d4e5 Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Wed, 27 Jan 2016 10:35:49 +0100 Subject: [PATCH 08/11] 8149529: Adapt SAP copyrights to new company name in jdk repository Reviewed-by: simonis, chegar --- jdk/make/data/fontconfig/aix.fontconfig.properties | 2 +- .../aix/classes/sun/nio/ch/AixAsynchronousChannelProvider.java | 2 +- jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java | 2 +- jdk/src/java.base/aix/classes/sun/nio/fs/AixFileStore.java | 2 +- jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystem.java | 2 +- .../java.base/aix/classes/sun/nio/fs/AixFileSystemProvider.java | 2 +- .../java.base/aix/classes/sun/nio/fs/AixNativeDispatcher.java | 2 +- jdk/src/java.base/aix/native/libnio/ch/AixPollPort.c | 2 +- jdk/src/java.base/aix/native/libnio/fs/AixNativeDispatcher.c | 2 +- jdk/src/java.desktop/aix/native/libawt/porting_aix.c | 2 +- jdk/src/java.desktop/aix/native/libawt/porting_aix.h | 2 +- .../aix/classes/sun/tools/attach/AttachProviderImpl.java | 2 +- .../aix/classes/sun/tools/attach/VirtualMachineImpl.java | 2 +- jdk/src/jdk.attach/aix/native/libattach/VirtualMachineImpl.c | 2 +- .../aix/native/libmanagement_ext/UnixOperatingSystem.c | 2 +- jdk/test/java/lang/ProcessBuilder/RedirectWithLongFilename.java | 2 +- jdk/test/java/lang/System/OsVersionTest.java | 2 +- .../jaxp/parsers/8027359/FragmentScannerBufferLimitTest.java | 2 +- jdk/test/jdk/internal/jimage/ExecutableTest.java | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/jdk/make/data/fontconfig/aix.fontconfig.properties b/jdk/make/data/fontconfig/aix.fontconfig.properties index f203f759894..f21f10a3bc8 100644 --- a/jdk/make/data/fontconfig/aix.fontconfig.properties +++ b/jdk/make/data/fontconfig/aix.fontconfig.properties @@ -1,6 +1,6 @@ # # -# Copyright 2013 SAP AG. All rights reserved. +# Copyright (c) 2013 SAP SE. 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 diff --git a/jdk/src/java.base/aix/classes/sun/nio/ch/AixAsynchronousChannelProvider.java b/jdk/src/java.base/aix/classes/sun/nio/ch/AixAsynchronousChannelProvider.java index 4c2c3d317bf..681883247bd 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/ch/AixAsynchronousChannelProvider.java +++ b/jdk/src/java.base/aix/classes/sun/nio/ch/AixAsynchronousChannelProvider.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012 SAP AG. All rights reserved. + * Copyright (c) 2012 SAP SE. 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 diff --git a/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java b/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java index 9cb294f67f0..735993c3d36 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java +++ b/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012 SAP AG. All rights reserved. + * Copyright (c) 2012 SAP SE. 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 diff --git a/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileStore.java b/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileStore.java index c38cb46a760..b13f333eacd 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileStore.java +++ b/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileStore.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2013 SAP AG. All rights reserved. + * Copyright (c) 2013 SAP SE. 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 diff --git a/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystem.java b/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystem.java index 1169dd31606..f1763ce3cae 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystem.java +++ b/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystem.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2013 SAP AG. All rights reserved. + * Copyright (c) 2013 SAP SE. 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 diff --git a/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystemProvider.java b/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystemProvider.java index 5718d87b387..7d14fa84229 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystemProvider.java +++ b/jdk/src/java.base/aix/classes/sun/nio/fs/AixFileSystemProvider.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2013 SAP AG. All rights reserved. + * Copyright (c) 2013 SAP SE. 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 diff --git a/jdk/src/java.base/aix/classes/sun/nio/fs/AixNativeDispatcher.java b/jdk/src/java.base/aix/classes/sun/nio/fs/AixNativeDispatcher.java index 76e833ae19a..151a679cfad 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/fs/AixNativeDispatcher.java +++ b/jdk/src/java.base/aix/classes/sun/nio/fs/AixNativeDispatcher.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2013 SAP AG. All rights reserved. + * Copyright (c) 2013 SAP SE. 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 diff --git a/jdk/src/java.base/aix/native/libnio/ch/AixPollPort.c b/jdk/src/java.base/aix/native/libnio/ch/AixPollPort.c index 70064b890ef..b11d286dd68 100644 --- a/jdk/src/java.base/aix/native/libnio/ch/AixPollPort.c +++ b/jdk/src/java.base/aix/native/libnio/ch/AixPollPort.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012 SAP AG. All rights reserved. + * Copyright (c) 2012 SAP SE. 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 diff --git a/jdk/src/java.base/aix/native/libnio/fs/AixNativeDispatcher.c b/jdk/src/java.base/aix/native/libnio/fs/AixNativeDispatcher.c index e7afb205280..2f3d463bc26 100644 --- a/jdk/src/java.base/aix/native/libnio/fs/AixNativeDispatcher.c +++ b/jdk/src/java.base/aix/native/libnio/fs/AixNativeDispatcher.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2013 SAP AG. All rights reserved. + * Copyright (c) 2013 SAP SE. 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 diff --git a/jdk/src/java.desktop/aix/native/libawt/porting_aix.c b/jdk/src/java.desktop/aix/native/libawt/porting_aix.c index 659d9c4c06b..0ec0ce2198b 100644 --- a/jdk/src/java.desktop/aix/native/libawt/porting_aix.c +++ b/jdk/src/java.desktop/aix/native/libawt/porting_aix.c @@ -1,5 +1,5 @@ /* - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright (c) 2012, 2013 SAP SE. 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 diff --git a/jdk/src/java.desktop/aix/native/libawt/porting_aix.h b/jdk/src/java.desktop/aix/native/libawt/porting_aix.h index 79d1062dd67..65c4ff35639 100644 --- a/jdk/src/java.desktop/aix/native/libawt/porting_aix.h +++ b/jdk/src/java.desktop/aix/native/libawt/porting_aix.h @@ -1,5 +1,5 @@ /* - * Copyright 2012, 2013 SAP AG. All rights reserved. + * Copyright (c) 2012, 2013 SAP SE. 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 diff --git a/jdk/src/jdk.attach/aix/classes/sun/tools/attach/AttachProviderImpl.java b/jdk/src/jdk.attach/aix/classes/sun/tools/attach/AttachProviderImpl.java index 56d76734da5..2f6fc4d4df2 100644 --- a/jdk/src/jdk.attach/aix/classes/sun/tools/attach/AttachProviderImpl.java +++ b/jdk/src/jdk.attach/aix/classes/sun/tools/attach/AttachProviderImpl.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - * Copyright 2013 SAP AG. All rights reserved. + * Copyright (c) 2013 SAP SE. 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 diff --git a/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java b/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java index afde9169993..0981b9cfaf5 100644 --- a/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java +++ b/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright 2015 SAP AG. All rights reserved. + * Copyright (c) 2015 SAP SE. 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 diff --git a/jdk/src/jdk.attach/aix/native/libattach/VirtualMachineImpl.c b/jdk/src/jdk.attach/aix/native/libattach/VirtualMachineImpl.c index db4d29b882d..6acecf96e9b 100644 --- a/jdk/src/jdk.attach/aix/native/libattach/VirtualMachineImpl.c +++ b/jdk/src/jdk.attach/aix/native/libattach/VirtualMachineImpl.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright 2015 SAP AG. All rights reserved. + * Copyright (c) 2015 SAP SE. 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 diff --git a/jdk/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c b/jdk/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c index bee3753b3c1..86c4c692f67 100644 --- a/jdk/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c +++ b/jdk/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright 2015 SAP AG. All rights reserved. + * Copyright (c) 2015 SAP SE. 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 diff --git a/jdk/test/java/lang/ProcessBuilder/RedirectWithLongFilename.java b/jdk/test/java/lang/ProcessBuilder/RedirectWithLongFilename.java index ed5551af5b9..9f4c9fef0cb 100644 --- a/jdk/test/java/lang/ProcessBuilder/RedirectWithLongFilename.java +++ b/jdk/test/java/lang/ProcessBuilder/RedirectWithLongFilename.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 SAP SE. All Rights Reserved. + * Copyright (c) 2015 SAP SE. 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 diff --git a/jdk/test/java/lang/System/OsVersionTest.java b/jdk/test/java/lang/System/OsVersionTest.java index f5397cf533d..2fbadf0bc39 100644 --- a/jdk/test/java/lang/System/OsVersionTest.java +++ b/jdk/test/java/lang/System/OsVersionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 SAP SE. All Rights Reserved. + * Copyright (c) 2015 SAP SE. 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 diff --git a/jdk/test/javax/xml/jaxp/parsers/8027359/FragmentScannerBufferLimitTest.java b/jdk/test/javax/xml/jaxp/parsers/8027359/FragmentScannerBufferLimitTest.java index 7f408212ff3..a337a741aff 100644 --- a/jdk/test/javax/xml/jaxp/parsers/8027359/FragmentScannerBufferLimitTest.java +++ b/jdk/test/javax/xml/jaxp/parsers/8027359/FragmentScannerBufferLimitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014, SAP AG. All rights reserved. + * Copyright (c) 2014 SAP SE. 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 diff --git a/jdk/test/jdk/internal/jimage/ExecutableTest.java b/jdk/test/jdk/internal/jimage/ExecutableTest.java index be24539eff5..b65230bb092 100644 --- a/jdk/test/jdk/internal/jimage/ExecutableTest.java +++ b/jdk/test/jdk/internal/jimage/ExecutableTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 SAP SE. All Rights Reserved. + * Copyright (c) 2015 SAP SE. 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 From 7bee07b465e1c3fd4f3b06cea8f47df6a46ef880 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Wed, 10 Feb 2016 16:36:25 +0300 Subject: [PATCH 09/11] 8149459: StringConcatFactory should be synced up with LambdaMetafactory Reviewed-by: psandoz, vlivanov, forax --- .../java/lang/invoke/StringConcatFactory.java | 20 ++++++++++++++++++- .../concat/StringConcatFactoryInvariants.java | 10 +++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java index 008a4161bd5..bf20f3154f2 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java @@ -182,22 +182,30 @@ public final class StringConcatFactory { private static final ConcurrentMap CACHE; + /** + * Dump generated classes to disk, for debugging purposes. + */ + private static final ProxyClassesDumper DUMPER; + static { // Poke the privileged block once, taking everything we need: - final Object[] values = new Object[3]; + final Object[] values = new Object[4]; AccessController.doPrivileged((PrivilegedAction) () -> { values[0] = System.getProperty("java.lang.invoke.stringConcat"); values[1] = Boolean.getBoolean("java.lang.invoke.stringConcat.cache"); values[2] = Boolean.getBoolean("java.lang.invoke.stringConcat.debug"); + values[3] = System.getProperty("java.lang.invoke.stringConcat.dumpClasses"); return null; }); final String strategy = (String) values[0]; CACHE_ENABLE = (Boolean) values[1]; DEBUG = (Boolean) values[2]; + final String dumpPath = (String) values[3]; STRATEGY = (strategy == null) ? DEFAULT_STRATEGY : Strategy.valueOf(strategy); CACHE = CACHE_ENABLE ? new ConcurrentHashMap<>() : null; + DUMPER = (dumpPath == null) ? null : ProxyClassesDumper.getInstance(dumpPath); } private static final class Key { @@ -552,6 +560,12 @@ public final class StringConcatFactory { Objects.requireNonNull(o, "Cannot accept null constants"); } + if ((lookup.lookupModes() & MethodHandles.Lookup.PRIVATE) == 0) { + throw new StringConcatException(String.format( + "Invalid caller: %s", + lookup.lookupClass().getName())); + } + int cCount = 0; int oCount = 0; if (generateRecipe) { @@ -1035,6 +1049,10 @@ public final class StringConcatFactory { final byte[] classBytes = cw.toByteArray(); final Class innerClass = UNSAFE.defineAnonymousClass(targetClass, classBytes, null); + if (DUMPER != null) { + DUMPER.dumpClass(innerClass.getName(), classBytes); + } + try { UNSAFE.ensureClassInitialized(innerClass); return lookup.findStatic(innerClass, NAME_FACTORY, args); diff --git a/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java b/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java index a174e3e4ffe..35b771b7f4c 100644 --- a/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java +++ b/jdk/test/java/lang/String/concat/StringConcatFactoryInvariants.java @@ -66,7 +66,7 @@ public class StringConcatFactoryInvariants { private static final char TAG_CONST = '\u0002'; public static void main(String[] args) throws Throwable { - MethodHandles.Lookup lookup = MethodHandles.publicLookup(); + MethodHandles.Lookup lookup = MethodHandles.lookup(); String methodName = "foo"; MethodType mt = MethodType.methodType(String.class, String.class, int.class); String recipe = "" + TAG_ARG + TAG_ARG + TAG_CONST; @@ -236,6 +236,14 @@ public class StringConcatFactoryInvariants { // Advanced factory: test empty arguments ok("Ok to pass empty arguments", () -> StringConcatFactory.makeConcatWithConstants(lookup, methodName, mtEmpty, recipeEmpty)); + + // Simple factory: public Lookup is rejected + fail("Passing public Lookup", + () -> StringConcatFactory.makeConcat(MethodHandles.publicLookup(), methodName, mtEmpty)); + + // Advanced factory: public Lookup is rejected + fail("Passing public Lookup", + () -> StringConcatFactory.makeConcatWithConstants(MethodHandles.publicLookup(), methodName, mtEmpty, recipeEmpty)); } public static void ok(String msg, Callable runnable) { From b16bb1267ae9517ac31510a049982ced8fbbc9da Mon Sep 17 00:00:00 2001 From: Roger Riggs Date: Thu, 11 Feb 2016 11:19:03 -0500 Subject: [PATCH 10/11] 8142539: Incorrect definition of ZoneOffset.MIN 8140211: Example in the Documentation is wrong for java.time.ZonedDateTime.minusHours 8139529: java.time.temporal.ChronoUnit.FOREVER typo Reviewed-by: lancea, scolebourne --- .../share/classes/java/time/ZoneOffset.java | 2 +- .../classes/java/time/ZonedDateTime.java | 34 ++++++++++++------- .../java/time/temporal/ChronoUnit.java | 4 +-- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/time/ZoneOffset.java b/jdk/src/java.base/share/classes/java/time/ZoneOffset.java index a46b5e02705..c5d15ef8ccc 100644 --- a/jdk/src/java.base/share/classes/java/time/ZoneOffset.java +++ b/jdk/src/java.base/share/classes/java/time/ZoneOffset.java @@ -150,7 +150,7 @@ public final class ZoneOffset */ public static final ZoneOffset UTC = ZoneOffset.ofTotalSeconds(0); /** - * Constant for the maximum supported offset. + * Constant for the minimum supported offset. */ public static final ZoneOffset MIN = ZoneOffset.ofTotalSeconds(-MAX_SECONDS); /** diff --git a/jdk/src/java.base/share/classes/java/time/ZonedDateTime.java b/jdk/src/java.base/share/classes/java/time/ZonedDateTime.java index 8048b157010..29869dbf37b 100644 --- a/jdk/src/java.base/share/classes/java/time/ZonedDateTime.java +++ b/jdk/src/java.base/share/classes/java/time/ZonedDateTime.java @@ -1707,13 +1707,18 @@ public final class ZonedDateTime * Note that this is a different approach to that used by days, months and years, * thus adding one day is not the same as adding 24 hours. *

- * For example, consider a time-zone where the spring DST cutover means that the - * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00. + * For example, consider a time-zone, such as 'Europe/Paris', where the + * Autumn DST cutover means that the local times 02:00 to 02:59 occur twice + * changing from offset +02:00 in summer to +01:00 in winter. *

    - *
  • Adding one hour to 00:30+02:00 will result in 01:30+02:00 - *
  • Adding one hour to 01:30+02:00 will result in 01:30+01:00 - *
  • Adding one hour to 01:30+01:00 will result in 02:30+01:00 - *
  • Adding three hours to 00:30+02:00 will result in 02:30+01:00 + *
  • Adding one hour to 01:30+02:00 will result in 02:30+02:00 + * (both in summer time) + *
  • Adding one hour to 02:30+02:00 will result in 02:30+01:00 + * (moving from summer to winter time) + *
  • Adding one hour to 02:30+01:00 will result in 03:30+01:00 + * (both in winter time) + *
  • Adding three hours to 01:30+02:00 will result in 03:30+01:00 + * (moving from summer to winter time) *
*

* This instance is immutable and unaffected by this method call. @@ -1948,13 +1953,18 @@ public final class ZonedDateTime * Note that this is a different approach to that used by days, months and years, * thus subtracting one day is not the same as adding 24 hours. *

- * For example, consider a time-zone where the spring DST cutover means that the - * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00. + * For example, consider a time-zone, such as 'Europe/Paris', where the + * Autumn DST cutover means that the local times 02:00 to 02:59 occur twice + * changing from offset +02:00 in summer to +01:00 in winter. *

    - *
  • Subtracting one hour from 02:30+01:00 will result in 01:30+02:00 - *
  • Subtracting one hour from 01:30+01:00 will result in 01:30+02:00 - *
  • Subtracting one hour from 01:30+02:00 will result in 00:30+01:00 - *
  • Subtracting three hours from 02:30+01:00 will result in 00:30+02:00 + *
  • Subtracting one hour from 03:30+01:00 will result in 02:30+01:00 + * (both in winter time) + *
  • Subtracting one hour from 02:30+01:00 will result in 02:30+02:00 + * (moving from winter to summer time) + *
  • Subtracting one hour from 02:30+02:00 will result in 01:30+02:00 + * (both in summer time) + *
  • Subtracting three hours from 03:30+01:00 will result in 01:30+02:00 + * (moving from winter to summer time) *
*

* This instance is immutable and unaffected by this method call. diff --git a/jdk/src/java.base/share/classes/java/time/temporal/ChronoUnit.java b/jdk/src/java.base/share/classes/java/time/temporal/ChronoUnit.java index c7043272398..8f94e061d4d 100644 --- a/jdk/src/java.base/share/classes/java/time/temporal/ChronoUnit.java +++ b/jdk/src/java.base/share/classes/java/time/temporal/ChronoUnit.java @@ -184,8 +184,8 @@ public enum ChronoUnit implements TemporalUnit { * Artificial unit that represents the concept of forever. * This is primarily used with {@link TemporalField} to represent unbounded fields * such as the year or era. - * The estimated duration of the era is artificially defined as the largest duration - * supported by {@code Duration}. + * The estimated duration of this unit is artificially defined as the largest duration + * supported by {@link Duration}. */ FOREVER("Forever", Duration.ofSeconds(Long.MAX_VALUE, 999_999_999)); From 58140f51dfeb0d9b97822aeee777c89fd201f32d Mon Sep 17 00:00:00 2001 From: Ivan Gerasimov Date: Fri, 12 Feb 2016 00:20:16 +0300 Subject: [PATCH 11/11] 8059212: Modify sun/security/smartcardio manual regression tests so that they do not just fail if no cardreader found Reviewed-by: mullan --- .../sun/security/smartcardio/TestChannel.java | 7 +- .../sun/security/smartcardio/TestConnect.java | 23 ++----- .../smartcardio/TestConnectAgain.java | 7 +- .../sun/security/smartcardio/TestControl.java | 7 +- .../sun/security/smartcardio/TestDefault.java | 8 ++- .../sun/security/smartcardio/TestDirect.java | 8 ++- .../security/smartcardio/TestExclusive.java | 7 +- .../smartcardio/TestMultiplePresent.java | 13 +++- .../sun/security/smartcardio/TestPresent.java | 17 ++--- .../security/smartcardio/TestTransmit.java | 7 +- jdk/test/sun/security/smartcardio/Utils.java | 64 ++++++++++++++----- 11 files changed, 112 insertions(+), 56 deletions(-) diff --git a/jdk/test/sun/security/smartcardio/TestChannel.java b/jdk/test/sun/security/smartcardio/TestChannel.java index e14cf833da2..c7e022f7c21 100644 --- a/jdk/test/sun/security/smartcardio/TestChannel.java +++ b/jdk/test/sun/security/smartcardio/TestChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -47,6 +47,11 @@ public class TestChannel extends Utils { public static void main(String[] args) throws Exception { CardTerminal terminal = getTerminal(args); + if (terminal == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; + } // establish a connection with the card Card card = terminal.connect("T=0"); diff --git a/jdk/test/sun/security/smartcardio/TestConnect.java b/jdk/test/sun/security/smartcardio/TestConnect.java index e0789343761..467939e1059 100644 --- a/jdk/test/sun/security/smartcardio/TestConnect.java +++ b/jdk/test/sun/security/smartcardio/TestConnect.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -40,23 +40,12 @@ import javax.smartcardio.CardTerminal; public class TestConnect extends Utils { public static void main(String[] args) throws Exception { - TerminalFactory factory = TerminalFactory.getInstance("PC/SC", null, "SunPCSC"); - System.out.println(factory); - - List terminals = factory.terminals().list(); - System.out.println("Terminals: " + terminals); - if (terminals.isEmpty()) { - throw new Exception("No card terminals available"); + CardTerminal terminal = getTerminal(args, "SunPCSC"); + if (terminal == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; } - CardTerminal terminal = terminals.get(0); - - if (terminal.isCardPresent() == false) { - System.out.println("*** Insert card"); - if (terminal.waitForCardPresent(20 * 1000) == false) { - throw new Exception("no card available"); - } - } - System.out.println("card present: " + terminal.isCardPresent()); Card card = terminal.connect("*"); System.out.println("card: " + card); diff --git a/jdk/test/sun/security/smartcardio/TestConnectAgain.java b/jdk/test/sun/security/smartcardio/TestConnectAgain.java index e938a561dac..f4e6af21cba 100644 --- a/jdk/test/sun/security/smartcardio/TestConnectAgain.java +++ b/jdk/test/sun/security/smartcardio/TestConnectAgain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -40,6 +40,11 @@ public class TestConnectAgain extends Utils { public static void main(String[] args) throws Exception { CardTerminal terminal = getTerminal(args); + if (terminal == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; + } Card card = terminal.connect("T=0"); CardChannel channel = card.getBasicChannel(); diff --git a/jdk/test/sun/security/smartcardio/TestControl.java b/jdk/test/sun/security/smartcardio/TestControl.java index 5a690640311..682f715d1c4 100644 --- a/jdk/test/sun/security/smartcardio/TestControl.java +++ b/jdk/test/sun/security/smartcardio/TestControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -41,6 +41,11 @@ public class TestControl extends Utils { public static void main(String[] args) throws Exception { CardTerminal terminal = getTerminal(args); + if (terminal == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; + } // establish a connection with the card Card card = terminal.connect("T=0"); diff --git a/jdk/test/sun/security/smartcardio/TestDefault.java b/jdk/test/sun/security/smartcardio/TestDefault.java index 247537265e3..9f3a6660426 100644 --- a/jdk/test/sun/security/smartcardio/TestDefault.java +++ b/jdk/test/sun/security/smartcardio/TestDefault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -41,10 +41,12 @@ public class TestDefault { TerminalFactory factory = TerminalFactory.getDefault(); System.out.println("Type: " + factory.getType()); List terminals = factory.terminals().list(); - System.out.println("Terminals: " + terminals); if (terminals.isEmpty()) { - throw new Exception("no terminals"); + System.out.println("Skipping the test: " + + "no card terminals available"); + return; } + System.out.println("Terminals: " + terminals); System.out.println("OK."); } diff --git a/jdk/test/sun/security/smartcardio/TestDirect.java b/jdk/test/sun/security/smartcardio/TestDirect.java index 3dde7c3b63f..5c09ea907ab 100644 --- a/jdk/test/sun/security/smartcardio/TestDirect.java +++ b/jdk/test/sun/security/smartcardio/TestDirect.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 @@ -40,10 +40,12 @@ public class TestDirect { public static void main(String[] args) throws Exception { TerminalFactory terminalFactory = TerminalFactory.getDefault(); List cardTerminals = terminalFactory.terminals().list(); - System.out.println("Terminals: " + cardTerminals); if (cardTerminals.isEmpty()) { - throw new Exception("No card terminals available"); + System.out.println("Skipping the test: " + + "no card terminals available"); + return; } + System.out.println("Terminals: " + cardTerminals); CardTerminal cardTerminal = cardTerminals.get(0); Card card = cardTerminal.connect("DIRECT"); card.disconnect(true); diff --git a/jdk/test/sun/security/smartcardio/TestExclusive.java b/jdk/test/sun/security/smartcardio/TestExclusive.java index f41e2cf3e66..9e4416ac6d9 100644 --- a/jdk/test/sun/security/smartcardio/TestExclusive.java +++ b/jdk/test/sun/security/smartcardio/TestExclusive.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,11 @@ public class TestExclusive extends Utils { public static void main(String[] args) throws Exception { CardTerminal terminal = getTerminal(args); + if (terminal == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; + } // establish a connection with the card Card card = terminal.connect("T=0"); diff --git a/jdk/test/sun/security/smartcardio/TestMultiplePresent.java b/jdk/test/sun/security/smartcardio/TestMultiplePresent.java index 6be66c926dd..15e320d2475 100644 --- a/jdk/test/sun/security/smartcardio/TestMultiplePresent.java +++ b/jdk/test/sun/security/smartcardio/TestMultiplePresent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -41,7 +41,12 @@ public class TestMultiplePresent { public static void main(String[] args) throws Exception { Utils.setLibrary(args); - TerminalFactory factory = TerminalFactory.getInstance("PC/SC", null); + TerminalFactory factory = Utils.getTerminalFactory(null); + if (factory == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; + } System.out.println(factory); CardTerminals terminals = factory.terminals(); @@ -50,7 +55,9 @@ public class TestMultiplePresent { boolean multipleReaders = true; if (list.size() < 2) { if (list.isEmpty()) { - throw new Exception("no terminals"); + System.out.println("Skipping the test: " + + "no card terminals available"); + return; } System.out.println("Only one reader present, using simplified test"); multipleReaders = false; diff --git a/jdk/test/sun/security/smartcardio/TestPresent.java b/jdk/test/sun/security/smartcardio/TestPresent.java index 2728f903ca4..1f499e97c12 100644 --- a/jdk/test/sun/security/smartcardio/TestPresent.java +++ b/jdk/test/sun/security/smartcardio/TestPresent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -35,7 +35,7 @@ import java.util.List; import javax.smartcardio.CardTerminal; import javax.smartcardio.TerminalFactory; -public class TestPresent { +public class TestPresent extends Utils { private static class Timer { private long time = System.currentTimeMillis(); @@ -67,15 +67,12 @@ public class TestPresent { } public static void main(String[] args) throws Exception { - TerminalFactory factory = TerminalFactory.getInstance("PC/SC", null); - System.out.println(factory); - - List terminals = factory.terminals().list(); - System.out.println("Terminals: " + terminals); - if (terminals.isEmpty()) { - throw new Exception("No card terminals available"); + CardTerminal terminal = getTerminal(args); + if (terminal == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; } - CardTerminal terminal = terminals.get(0); while (terminal.isCardPresent()) { System.out.println("*** Remove card!"); diff --git a/jdk/test/sun/security/smartcardio/TestTransmit.java b/jdk/test/sun/security/smartcardio/TestTransmit.java index 2c484417317..85b32f6dd48 100644 --- a/jdk/test/sun/security/smartcardio/TestTransmit.java +++ b/jdk/test/sun/security/smartcardio/TestTransmit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -49,6 +49,11 @@ public class TestTransmit extends Utils { public static void main(String[] args) throws Exception { CardTerminal terminal = getTerminal(args); + if (terminal == null) { + System.out.println("Skipping the test: " + + "no card terminals available"); + return; + } Card card = terminal.connect("T=0"); CardChannel channel = card.getBasicChannel(); diff --git a/jdk/test/sun/security/smartcardio/Utils.java b/jdk/test/sun/security/smartcardio/Utils.java index b4edbcc292b..036b8dd3250 100644 --- a/jdk/test/sun/security/smartcardio/Utils.java +++ b/jdk/test/sun/security/smartcardio/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ import java.io.StringReader; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.List; import javax.smartcardio.CardTerminal; @@ -43,26 +44,59 @@ public class Utils { } } + static TerminalFactory getTerminalFactory(String provName) throws Exception { + try { + TerminalFactory factory = (provName == null) + ? TerminalFactory.getInstance("PC/SC", null) + : TerminalFactory.getInstance("PC/SC", null, provName); + System.out.println(factory); + return factory; + } catch (NoSuchAlgorithmException e) { + Throwable cause = e.getCause(); + if (cause != null && cause.getMessage().startsWith("PC/SC not available")) { + return null; + } + throw e; + } + } + static CardTerminal getTerminal(String[] args) throws Exception { + return getTerminal(args, null); + } + + static CardTerminal getTerminal(String[] args, String provider) throws Exception { setLibrary(args); - TerminalFactory factory = TerminalFactory.getInstance("PC/SC", null); - System.out.println(factory); + try { + TerminalFactory factory = (provider == null) + ? TerminalFactory.getInstance("PC/SC", null) + : TerminalFactory.getInstance("PC/SC", null, provider); + System.out.println(factory); - List terminals = factory.terminals().list(); - System.out.println("Terminals: " + terminals); - if (terminals.isEmpty()) { - throw new Exception("No card terminals available"); - } - CardTerminal terminal = terminals.get(0); - - if (terminal.isCardPresent() == false) { - System.out.println("*** Insert card"); - if (terminal.waitForCardPresent(20 * 1000) == false) { - throw new Exception("no card available"); + List terminals = factory.terminals().list(); + System.out.println("Terminals: " + terminals); + if (terminals.isEmpty()) { + return null; } + CardTerminal terminal = terminals.get(0); + + if (terminal.isCardPresent() == false) { + System.out.println("*** Insert card"); + if (terminal.waitForCardPresent(20 * 1000) == false) { + throw new Exception("no card available"); + } + } + System.out.println("card present: " + terminal.isCardPresent()); + + return terminal; + + } catch (NoSuchAlgorithmException e) { + Throwable cause = e.getCause(); + if (cause != null && cause.getMessage().startsWith("PC/SC not available")) { + return null; + } + throw e; } - return terminal; } static final byte[] C1 = parse("00 A4 04 00 07 A0 00 00 00 62 81 01 00");