diff --git a/.hgtags b/.hgtags index c0ec7d20a99..1bd0c05f284 100644 --- a/.hgtags +++ b/.hgtags @@ -243,3 +243,4 @@ f5b521ade7a35cea18df78ee86322207729f5611 jdk8-b118 87b743b2263cc53955266411b7797b365a0fb050 jdk8-b119 a1ee9743f4ee165eae59389a020f2552f895dac8 jdk8-b120 13b877757b0b1c0d5813298df85364f41d7ba6fe jdk9-b00 +f130ca87de6637acae7d99fcd7a8573eea1cbaed jdk9-b01 diff --git a/.hgtags-top-repo b/.hgtags-top-repo index cc3e3f4e682..6a7cb46c540 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -243,3 +243,4 @@ a4afb0a8d55ef75aef5b0d77b434070468fb89f8 jdk8-b117 9e90215673be68a3e77a9e444e4232076373734d jdk8-b119 cd3825b2983045784d6fc6d1729c799b08215752 jdk8-b120 1e1f86d5d4e22c15a9bf9f1581acddb8c59abae2 jdk9-b00 +50669e45cec4491de0d921d3118a3fe2e767020a jdk9-b01 diff --git a/common/autoconf/boot-jdk.m4 b/common/autoconf/boot-jdk.m4 index 27652953114..a4805a92c03 100644 --- a/common/autoconf/boot-jdk.m4 +++ b/common/autoconf/boot-jdk.m4 @@ -324,8 +324,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], fi # When is adding -client something that speeds up the JVM? # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) - ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA]) - ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA]) # Disable special log output when a debug build is used as Boot JDK... ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA]) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index cf6b1bf6e5e..43e26631193 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -3865,7 +3865,7 @@ fi #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1389186094 +DATE_WHEN_GENERATED=1389815815 ############################################################################### # @@ -11156,6 +11156,12 @@ fi as_fn_error $? "Update version must have a value" "$LINENO" 5 elif test "x$with_update_version" != x; then JDK_UPDATE_VERSION="$with_update_version" + # On macosx 10.7, it's not possible to set --with-update-version=0X due + # to a bug in expr (which reduces it to just X). To work around this, we + # always add a 0 to one digit update versions. + if test "${#JDK_UPDATE_VERSION}" = "1"; then + JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}" + fi fi @@ -16068,36 +16074,6 @@ fi # When is adding -client something that speeds up the JVM? # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) - $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5 - $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5 - OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1` - FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` - FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` - if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then - boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m" - JVM_ARG_OK=true - else - $ECHO "Arg failed:" >&5 - $ECHO "$OUTPUT" >&5 - JVM_ARG_OK=false - fi - - - $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5 - $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5 - OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1` - FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` - FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` - if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then - boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m" - JVM_ARG_OK=true - else - $ECHO "Arg failed:" >&5 - $ECHO "$OUTPUT" >&5 - JVM_ARG_OK=false - fi - - $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5 $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5 OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1` @@ -20011,9 +19987,9 @@ $as_echo "$PROPER_COMPILER_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 $as_echo "no, keeping CC" >&6; } - CC="$TEST_COMPILER" fi + COMPILER=$CC COMPILER_NAME=$COMPILER_NAME @@ -21590,9 +21566,9 @@ $as_echo "$PROPER_COMPILER_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 $as_echo "no, keeping CXX" >&6; } - CXX="$TEST_COMPILER" fi + COMPILER=$CXX COMPILER_NAME=$COMPILER_NAME diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 index 4397fb81123..9db8c238030 100644 --- a/common/autoconf/jdk-options.m4 +++ b/common/autoconf/jdk-options.m4 @@ -105,7 +105,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS], fi # Replace the commas with AND for use in the build directory name. - ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` + ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'` COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` if test "x$COUNT_VARIANTS" != "x,1"; then BUILDING_MULTIPLE_JVM_VARIANTS=yes @@ -423,6 +423,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], AC_MSG_ERROR([Update version must have a value]) elif test "x$with_update_version" != x; then JDK_UPDATE_VERSION="$with_update_version" + # On macosx 10.7, it's not possible to set --with-update-version=0X due + # to a bug in expr (which reduces it to just X). To work around this, we + # always add a 0 to one digit update versions. + if test "${#JDK_UPDATE_VERSION}" = "1"; then + JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}" + fi fi AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 index c8b66e89dd0..84793969b92 100644 --- a/common/autoconf/toolchain.m4 +++ b/common/autoconf/toolchain.m4 @@ -166,8 +166,8 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER], $1="$PROPER_COMPILER_$1" else AC_MSG_RESULT([no, keeping $1]) - $1="$TEST_COMPILER" fi + TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) ]) diff --git a/corba/.hgtags b/corba/.hgtags index b110af22954..914430fb54c 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -243,3 +243,4 @@ d6820a414f182a011a53a29a52370c696cd58dab jdk8-b118 379fc7609beb7a3d85ebc0cc21a8a51c60d3c7d3 jdk8-b119 53fd772d28c8a9f0f43adfc06f75f6b3cfa93cb5 jdk8-b120 a7d3638deb2f4e33217b1ecf889479e90f9e5b50 jdk9-b00 +79a8136b18c1c6848f500088f5a4b39f262f082d jdk9-b01 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java index 1b03be02dd1..0f3428ac029 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java @@ -82,11 +82,18 @@ public class AnyImpl extends Any super((ORB)orb); } - public org.omg.CORBA.portable.InputStream create_input_stream() - { - return new AnyInputStream( - (com.sun.corba.se.impl.encoding.EncapsInputStream) - super.create_input_stream()); + public org.omg.CORBA.portable.InputStream create_input_stream() { + final org.omg.CORBA.portable.InputStream is = super + .create_input_stream(); + AnyInputStream aIS = AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public AnyInputStream run() { + return new AnyInputStream( + (com.sun.corba.se.impl.encoding.EncapsInputStream) is); + } + }); + return aIS; } } diff --git a/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java b/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java index da7e9165449..7853812f89d 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2013, 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,11 +36,10 @@ import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry; import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; import com.sun.corba.se.spi.orb.ORB; - import com.sun.corba.se.spi.logging.CORBALogDomains; - import com.sun.corba.se.impl.logging.ORBUtilSystemException; +import sun.corba.EncapsInputStreamFactory; /** * Encapsulations are supposed to explicitly define their * code sets and GIOP version. The original resolution to issue 2784 @@ -148,7 +147,7 @@ public class EncapsInputStream extends CDRInputStream } public CDRInputStream dup() { - return new EncapsInputStream(this); + return EncapsInputStreamFactory.newEncapsInputStream(this); } protected CodeSetConversion.BTCConverter createCharBTCConverter() { diff --git a/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java b/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java index 5f1b0e8bde8..4f908dc8569 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2013, 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,8 @@ import com.sun.corba.se.impl.encoding.BufferManagerFactory; import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; import com.sun.corba.se.impl.orbutil.ORBConstants; +import sun.corba.EncapsInputStreamFactory; + /** * Encapsulations are supposed to explicitly define their * code sets and GIOP version. The original resolution to issue 2784 @@ -107,11 +109,11 @@ public class EncapsOutputStream extends CDROutputStream public org.omg.CORBA.portable.InputStream create_input_stream() { freeInternalCaches(); - return new EncapsInputStream(orb(), - getByteBuffer(), - getSize(), - isLittleEndian(), - getGIOPVersion()); + return EncapsInputStreamFactory.newEncapsInputStream(orb(), + getByteBuffer(), + getSize(), + isLittleEndian(), + getGIOPVersion()); } protected CodeSetConversion.CTBConverter createCharCTBConverter() { diff --git a/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java b/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java index 0bce54b930e..ae91457f161 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2013, 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 @@ -64,6 +64,8 @@ import com.sun.corba.se.impl.encoding.CDRInputStream; import com.sun.corba.se.impl.encoding.CDROutputStream; import com.sun.corba.se.impl.encoding.MarshalInputStream; +import sun.corba.EncapsInputStreamFactory; + public class TypeCodeInputStream extends EncapsInputStream implements TypeCodeReader { private Map typeMap = null; @@ -157,11 +159,13 @@ public class TypeCodeInputStream extends EncapsInputStream implements TypeCodeRe // create an encapsulation using the marshal buffer if (is instanceof CDRInputStream) { - encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length, - ((CDRInputStream)is).isLittleEndian(), - ((CDRInputStream)is).getGIOPVersion()); + encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb, + encapBuffer, encapBuffer.length, + ((CDRInputStream) is).isLittleEndian(), + ((CDRInputStream) is).getGIOPVersion()); } else { - encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length); + encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb, + encapBuffer, encapBuffer.length); } encap.setEnclosingInputStream(is); encap.makeEncapsulation(); diff --git a/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java b/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java index 94f6466013a..93f7c97c50d 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java @@ -61,6 +61,8 @@ import java.math.BigDecimal; import java.math.BigInteger; import java.nio.ByteBuffer; +import sun.corba.EncapsInputStreamFactory; + public final class TypeCodeOutputStream extends EncapsOutputStream { private OutputStream enclosure = null; @@ -77,9 +79,9 @@ public final class TypeCodeOutputStream extends EncapsOutputStream public org.omg.CORBA.portable.InputStream create_input_stream() { - //return new TypeCodeInputStream((ORB)orb(), getByteBuffer(), getIndex(), isLittleEndian()); - TypeCodeInputStream tcis - = new TypeCodeInputStream((ORB)orb(), getByteBuffer(), getIndex(), isLittleEndian(), getGIOPVersion()); + TypeCodeInputStream tcis = EncapsInputStreamFactory + .newTypeCodeInputStream((ORB) orb(), getByteBuffer(), + getIndex(), isLittleEndian(), getGIOPVersion()); //if (TypeCodeImpl.debug) { //System.out.println("Created TypeCodeInputStream " + tcis + " with no parent"); //tcis.printBuffer(); diff --git a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java index 6f469e2dc7d..235b8956de1 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java @@ -33,6 +33,8 @@ import org.omg.CORBA.LocalObject; import com.sun.corba.se.spi.ior.iiop.GIOPVersion; import com.sun.corba.se.spi.logging.CORBALogDomains; +import sun.corba.EncapsInputStreamFactory; + import com.sun.corba.se.impl.corba.AnyImpl; import com.sun.corba.se.impl.encoding.EncapsInputStream; import com.sun.corba.se.impl.encoding.EncapsOutputStream; @@ -193,8 +195,9 @@ public final class CDREncapsCodec // it is turned into a FormatMismatch exception. try { - EncapsInputStream cdrIn = new EncapsInputStream( orb, data, - data.length, giopVersion ); + EncapsInputStream cdrIn = EncapsInputStreamFactory.newEncapsInputStream( orb, data, + data.length, giopVersion ); + cdrIn.consumeEndian(); diff --git a/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java b/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java index 88b2518c990..e14b25ebb1b 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java @@ -370,7 +370,7 @@ public class IIOPInputStream * @exception IOException Any of the usual Input/Output related exceptions. * @since JDK1.1 */ - public final Object readObjectDelegate() throws IOException + public final synchronized Object readObjectDelegate() throws IOException { try { @@ -389,7 +389,7 @@ public class IIOPInputStream } } - final Object simpleReadObject(Class clz, + final synchronized Object simpleReadObject(Class clz, String repositoryID, com.sun.org.omg.SendingContext.CodeBase sender, int offset) @@ -461,7 +461,7 @@ public class IIOPInputStream return obj; } - public final void simpleSkipObject(String repositoryID, + public final synchronized void simpleSkipObject(String repositoryID, com.sun.org.omg.SendingContext.CodeBase sender) /* throws OptionalDataException, ClassNotFoundException, IOException */ { @@ -559,7 +559,7 @@ public class IIOPInputStream * objects. * @since JDK1.1 */ - public final void defaultReadObjectDelegate() + final synchronized void defaultReadObjectDelegate() /* throws IOException, ClassNotFoundException, NotActiveException */ { try { @@ -988,7 +988,7 @@ public class IIOPInputStream } } - private Object inputObject(Class clz, + private synchronized Object inputObject(Class clz, String repositoryID, com.sun.org.omg.SendingContext.CodeBase sender, int offset) @@ -1317,7 +1317,7 @@ public class IIOPInputStream * a form of custom marshaling. * */ - private Object inputObjectUsingFVD(Class clz, + private synchronized Object inputObjectUsingFVD(Class clz, String repositoryID, com.sun.org.omg.SendingContext.CodeBase sender, int offset) diff --git a/corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java b/corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java index 9ad13b37ab7..f4198e386de 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java @@ -201,7 +201,7 @@ public abstract class InputStreamHook extends ObjectInputStream readObjectState.endDefaultReadObject(this); } - public abstract void defaultReadObjectDelegate(); + abstract void defaultReadObjectDelegate(); abstract void readFields(java.util.Map fieldToValueMap) throws java.io.InvalidClassException, java.io.StreamCorruptedException, diff --git a/corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java b/corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java index 8f6f01b0da5..63cdcae2bee 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java @@ -47,6 +47,8 @@ import com.sun.corba.se.impl.encoding.CDROutputStream ; import com.sun.corba.se.impl.encoding.EncapsOutputStream ; import com.sun.corba.se.impl.encoding.EncapsInputStream ; +import sun.corba.EncapsInputStreamFactory; + /** * This static utility class contains various utility methods for reading and * writing CDR encapsulations. @@ -108,8 +110,8 @@ public class EncapsulationUtility static public InputStream getEncapsulationStream( InputStream is ) { byte[] data = readOctets( is ) ; - EncapsInputStream result = new EncapsInputStream( is.orb(), data, - data.length ) ; + EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data, + data.length ) ; result.consumeEndian() ; return result ; } diff --git a/corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java index 00840373662..d774994b977 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,8 @@ import com.sun.corba.se.impl.ior.ObjectKeyImpl ; import com.sun.corba.se.impl.logging.IORSystemException ; import com.sun.corba.se.impl.encoding.EncapsInputStream ; +import sun.corba.EncapsInputStreamFactory; + /** Based on the magic and scid, return the appropriate * ObjectKeyTemplate. Expects to be called with a valid @@ -217,7 +219,7 @@ public class ObjectKeyFactoryImpl implements ObjectKeyFactory public ObjectKey create( byte[] key ) { OctetSeqHolder osh = new OctetSeqHolder() ; - EncapsInputStream is = new EncapsInputStream( orb, key, key.length ) ; + EncapsInputStream is = EncapsInputStreamFactory.newEncapsInputStream( orb, key, key.length ); ObjectKeyTemplate oktemp = create( is, fullKey, osh ) ; if (oktemp == null) diff --git a/corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java index 4a7b0b921de..060dd3f338e 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java @@ -70,6 +70,8 @@ import com.sun.corba.se.impl.ior.EncapsulationUtility ; import com.sun.corba.se.impl.encoding.EncapsInputStream ; import com.sun.corba.se.impl.encoding.EncapsOutputStream ; +import sun.corba.EncapsInputStreamFactory; + import com.sun.corba.se.impl.util.JDKBridge; import com.sun.corba.se.impl.logging.IORSystemException; @@ -170,8 +172,8 @@ public class IIOPProfileImpl extends IdentifiableBase implements IIOPProfile throw wrapper.invalidTaggedProfile() ; } - EncapsInputStream istr = new EncapsInputStream((ORB)orb, profile.profile_data, - profile.profile_data.length); + EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data, + profile.profile_data.length); istr.consumeEndian(); init( istr ) ; } diff --git a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java index f05d0ca0673..ae7c9f8d97d 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2013 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 @@ package com.sun.corba.se.impl.presentation.rmi ; +import java.io.SerializablePermission; import java.lang.reflect.InvocationHandler ; import java.lang.reflect.Proxy ; @@ -38,11 +39,18 @@ public abstract class StubFactoryDynamicBase extends StubFactoryBase { protected final ClassLoader loader ; - public StubFactoryDynamicBase( PresentationManager.ClassData classData, - ClassLoader loader ) - { - super( classData ) ; + private static Void checkPermission() { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkPermission(new SerializablePermission( + "enableSubclassImplementation")); + } + return null; + } + private StubFactoryDynamicBase(Void unused, + PresentationManager.ClassData classData, ClassLoader loader) { + super(classData); // this.loader must not be null, or the newProxyInstance call // will fail. if (loader == null) { @@ -55,5 +63,11 @@ public abstract class StubFactoryDynamicBase extends StubFactoryBase } } + public StubFactoryDynamicBase( PresentationManager.ClassData classData, + ClassLoader loader ) + { + this (checkPermission(), classData, loader); + } + public abstract org.omg.CORBA.Object makeStub() ; } diff --git a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java index e3fe932f4e4..ae0587f76ad 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2013, 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,14 +25,22 @@ package com.sun.corba.se.impl.presentation.rmi; +import java.security.AccessController; +import java.security.PrivilegedAction; import com.sun.corba.se.spi.presentation.rmi.PresentationManager ; public class StubFactoryFactoryProxyImpl extends StubFactoryFactoryDynamicBase { public PresentationManager.StubFactory makeDynamicStubFactory( - PresentationManager pm, PresentationManager.ClassData classData, - ClassLoader classLoader ) + PresentationManager pm, final PresentationManager.ClassData classData, + final ClassLoader classLoader ) { - return new StubFactoryProxyImpl( classData, classLoader ) ; + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public StubFactoryProxyImpl run() { + return new StubFactoryProxyImpl(classData, classLoader); + } + }); } } diff --git a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java index 1878596aca3..5c669dda9f9 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2013, 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 @@ -115,6 +115,7 @@ import com.sun.corba.se.impl.util.JDKBridge; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentHashMap; +import sun.corba.EncapsInputStreamFactory; /** * ClientDelegate is the RMI client-side subcontract or representation @@ -847,8 +848,8 @@ public class CorbaClientRequestDispatcherImpl } byte[] data = ((UnknownServiceContext)sc).getData(); EncapsInputStream in = - new EncapsInputStream((ORB)messageMediator.getBroker(), - data, data.length); + EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(), + data, data.length); in.consumeEndian(); String msg = diff --git a/corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java index 27002a37d50..9f9a5f65e27 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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,7 +36,8 @@ import java.io.IOException; import java.util.Iterator; import java.rmi.RemoteException; import java.nio.ByteBuffer; - +import java.security.AccessController; +import java.security.PrivilegedAction; import javax.rmi.CORBA.Util; import javax.rmi.CORBA.Tie; @@ -111,6 +112,7 @@ import com.sun.corba.se.impl.protocol.giopmsgheaders.KeyAddr; import com.sun.corba.se.impl.protocol.giopmsgheaders.ProfileAddr; import com.sun.corba.se.impl.protocol.giopmsgheaders.ReferenceAddr; import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl; +import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; import com.sun.corba.se.impl.util.JDKBridge; /** @@ -156,10 +158,17 @@ public class SharedCDRClientRequestDispatcherImpl ByteBufferWithInfo bbwi = cdrOutputObject.getByteBufferWithInfo(); cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); - - CDRInputObject cdrInputObject = - new CDRInputObject(orb, null, bbwi.byteBuffer, - cdrOutputObject.getMessageHeader()); + final ORB inOrb = orb; + final ByteBuffer inBuffer = bbwi.byteBuffer; + final Message inMsg = cdrOutputObject.getMessageHeader(); + CDRInputObject cdrInputObject = AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public CDRInputObject run() { + return new CDRInputObject(inOrb, null, inBuffer, + inMsg); + } + }); messageMediator.setInputObject(cdrInputObject); cdrInputObject.setMessageMediator(messageMediator); @@ -192,9 +201,17 @@ public class SharedCDRClientRequestDispatcherImpl cdrOutputObject = (CDROutputObject) messageMediator.getOutputObject(); bbwi = cdrOutputObject.getByteBufferWithInfo(); cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); - cdrInputObject = - new CDRInputObject(orb, null, bbwi.byteBuffer, - cdrOutputObject.getMessageHeader()); + final ORB inOrb2 = orb; + final ByteBuffer inBuffer2 = bbwi.byteBuffer; + final Message inMsg2 = cdrOutputObject.getMessageHeader(); + cdrInputObject = AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public CDRInputObject run() { + return new CDRInputObject(inOrb2, null, inBuffer2, + inMsg2); + } + }); messageMediator.setInputObject(cdrInputObject); cdrInputObject.setMessageMediator(messageMediator); diff --git a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java index fb56e001f54..91976a2b5a2 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, 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,8 @@ import java.util.Collections ; import org.omg.CosNaming.NamingContextExt ; import org.omg.CosNaming.NamingContextExtHelper ; +import sun.corba.EncapsInputStreamFactory; + import com.sun.corba.se.spi.ior.IOR; import com.sun.corba.se.spi.ior.IORTemplate; import com.sun.corba.se.spi.ior.ObjectKey; @@ -114,8 +116,8 @@ public class INSURLOperationImpl implements Operation buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } - EncapsInputStream s = new EncapsInputStream(orb, buf, buf.length, - orb.getORBData().getGIOPVersion()); + EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, + orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; } diff --git a/corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java b/corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java index 13ff23435da..ea4569b1a14 100644 --- a/corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java +++ b/corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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 @@ -58,6 +58,9 @@ import com.sun.corba.se.impl.orbutil.ORBUtility ; import com.sun.corba.se.impl.util.Utility ; import com.sun.corba.se.impl.logging.ORBUtilSystemException ; +import sun.corba.EncapsInputStreamFactory; + + public class ServiceContexts { private static boolean isDebugging( OutputStream os ) { @@ -198,11 +201,11 @@ public class ServiceContexts { // Note: As of Jan 2001, no standard OMG or Sun service contexts // ship wchar data or are defined as using anything but GIOP 1.0 CDR. EncapsInputStream eis - = new EncapsInputStream(orb, - data, - data.length, - giopVersion, - codeBase); + = EncapsInputStreamFactory.newEncapsInputStream(orb, + data, + data.length, + giopVersion, + codeBase); eis.consumeEndian(); // Now the input stream passed to a ServiceContext diff --git a/corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java b/corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java index 2d5e788a88b..90d9ea65286 100644 --- a/corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java +++ b/corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, 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,10 @@ package org.omg.CORBA_2_3.portable; +import java.io.SerializablePermission; +import java.security.AccessController; +import java.security.PrivilegedAction; + /** * InputStream provides for the reading of all of the mapped IDL types * from the stream. It extends org.omg.CORBA.portable.InputStream. This @@ -43,6 +47,43 @@ package org.omg.CORBA_2_3.portable; public abstract class InputStream extends org.omg.CORBA.portable.InputStream { + + private static final String ALLOW_SUBCLASS_PROP = "jdk.corba.allowInputStreamSubclass"; + + private static final boolean allowSubclass = AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public Boolean run() { + String prop = System.getProperty(ALLOW_SUBCLASS_PROP); + return prop == null ? false : + (prop.equalsIgnoreCase("false") ? false : true); + } + }); + + private static Void checkPermission() { + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + if (!allowSubclass) + sm.checkPermission(new + SerializablePermission("enableSubclassImplementation")); + } + return null; + } + + private InputStream(Void ignore) { } + + /** + * Create a new instance of this class. + * + * throw SecurityException if SecurityManager is installed and + * enableSubclassImplementation SerializablePermission + * is not granted or jdk.corba.allowOutputStreamSubclass system + * property is either not set or is set to 'false' + */ + public InputStream() { + this(checkPermission()); + } + /** * Unmarshalls a value type from the input stream. * @return the value type unmarshalled from the input stream diff --git a/corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java b/corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java new file mode 100644 index 00000000000..236a680cada --- /dev/null +++ b/corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package sun.corba; + +import java.nio.ByteBuffer; +import java.security.AccessController; +import java.security.PrivilegedAction; + + +import com.sun.corba.se.impl.encoding.EncapsInputStream; +import com.sun.corba.se.impl.encoding.TypeCodeInputStream; +import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; +import com.sun.corba.se.pept.protocol.MessageMediator; +import com.sun.corba.se.spi.ior.iiop.GIOPVersion; +import com.sun.corba.se.spi.orb.ORB; +import com.sun.org.omg.SendingContext.CodeBase; + +public class EncapsInputStreamFactory { + + public static EncapsInputStream newEncapsInputStream( + final org.omg.CORBA.ORB orb, final byte[] buf, final int size, + final boolean littleEndian, final GIOPVersion version) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public EncapsInputStream run() { + return new EncapsInputStream(orb, buf, size, + littleEndian, version); + } + }); + } + + public static EncapsInputStream newEncapsInputStream( + final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer, + final int size, final boolean littleEndian, + final GIOPVersion version) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public EncapsInputStream run() { + return new EncapsInputStream(orb, byteBuffer, size, + littleEndian, version); + } + }); + } + + public static EncapsInputStream newEncapsInputStream( + final org.omg.CORBA.ORB orb, final byte[] data, final int size) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public EncapsInputStream run() { + return new EncapsInputStream(orb, data, size); + } + }); + } + + public static EncapsInputStream newEncapsInputStream( + final EncapsInputStream eis) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public EncapsInputStream run() { + return new EncapsInputStream(eis); + } + }); + } + + public static EncapsInputStream newEncapsInputStream( + final org.omg.CORBA.ORB orb, final byte[] data, final int size, + final GIOPVersion version) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public EncapsInputStream run() { + return new EncapsInputStream(orb, data, size, version); + } + }); + } + + public static EncapsInputStream newEncapsInputStream( + final org.omg.CORBA.ORB orb, final byte[] data, final int size, + final GIOPVersion version, final CodeBase codeBase) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public EncapsInputStream run() { + return new EncapsInputStream(orb, data, size, version, + codeBase); + } + }); + } + + public static TypeCodeInputStream newTypeCodeInputStream( + final org.omg.CORBA.ORB orb, final byte[] buf, final int size, + final boolean littleEndian, final GIOPVersion version) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public TypeCodeInputStream run() { + return new TypeCodeInputStream(orb, buf, size, + littleEndian, version); + } + }); + } + + public static TypeCodeInputStream newTypeCodeInputStream( + final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer, + final int size, final boolean littleEndian, + final GIOPVersion version) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public TypeCodeInputStream run() { + return new TypeCodeInputStream(orb, byteBuffer, size, + littleEndian, version); + } + }); + } + + public static TypeCodeInputStream newTypeCodeInputStream( + final org.omg.CORBA.ORB orb, final byte[] data, final int size) { + return AccessController + .doPrivileged(new PrivilegedAction() { + @Override + public TypeCodeInputStream run() { + return new TypeCodeInputStream(orb, data, size); + } + }); + } +} diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 7bab298f14e..7b9d7597d6e 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -403,3 +403,4 @@ ce42d815dd2130250acf6132b51b624001638f0d jdk8-b119 05fedd51e40da22c9460bf17c7185889e435db3d hs25-b62 fca262db9c4309f99d2f5542ab0780e45c2f1578 jdk8-b120 ce2d7e46f3c7e41241f3b407705a4071323a11ab jdk9-b00 +050a626a88951140df874f7b163e304d07b6c296 jdk9-b01 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java index d2ea2db855d..a5fac511d18 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java @@ -103,11 +103,12 @@ public class ClassLoaderStats extends Tool { } SystemDictionary dict = VM.getVM().getSystemDictionary(); - dict.classesDo(new SystemDictionary.ClassAndLoaderVisitor() { - public void visit(Klass k, Oop loader) { + dict.classesDo(new SystemDictionary.ClassVisitor() { + public void visit(Klass k) { if (! (k instanceof InstanceKlass)) { return; } + Oop loader = ((InstanceKlass) k).getClassLoader(); LoaderData ld = (loader != null) ? (LoaderData)loaderMap.get(loader) : bootstrapLoaderData; if (ld != null) { diff --git a/hotspot/make/Makefile b/hotspot/make/Makefile index 581a5daae12..e313baef93a 100644 --- a/hotspot/make/Makefile +++ b/hotspot/make/Makefile @@ -557,11 +557,11 @@ $(JDK_IMAGE_DIR)/jre/lib/rt.jar: # Testing the built JVM -RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -Dsun.java.launcher=gamma +RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -XXaltjvm=$(ALTJVM_DIR) -Dsun.java.launcher.is_altjvm=true generic_test: @$(ECHO) "Running with: $(ALTJVM_DIR)" - @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion - @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help + @$(RUN_JVM) -Xinternalversion + @$(RUN_JVM) -showversion -help # C2 test targets test_product test_optimized test_fastdebug test_debug: diff --git a/hotspot/make/bsd/makefiles/dtrace.make b/hotspot/make/bsd/makefiles/dtrace.make index 7bef4f8a616..c13672aed16 100644 --- a/hotspot/make/bsd/makefiles/dtrace.make +++ b/hotspot/make/bsd/makefiles/dtrace.make @@ -53,6 +53,7 @@ JVMOFFS.o = $(JVMOFFS).o GENOFFS = generate$(JVMOFFS) DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace +DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace DTRACE = dtrace DTRACE.o = $(DTRACE).o @@ -262,14 +263,14 @@ endif $(DtraceOutDir): mkdir $(DtraceOutDir) -$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d +$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d -$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d +$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d -$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d +$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h diff --git a/hotspot/make/hotspot.script b/hotspot/make/hotspot.script index 9177f6efef8..331cf6b38d4 100644 --- a/hotspot/make/hotspot.script +++ b/hotspot/make/hotspot.script @@ -49,7 +49,7 @@ then GDB=gdb fi -# This is the name of the gdb binary to use +# This is the name of the dbx binary to use if [ ! "$DBX" ] then DBX=dbx @@ -68,9 +68,16 @@ EMACS=emacs # End of user changeable parameters ----------------------------------------- # +OS=`uname -s` + # Make sure the paths are fully specified, i.e. they must begin with /. REL_MYDIR=`dirname $0` MYDIR=`cd $REL_MYDIR && pwd` +case "$OS" in +CYGWIN*) + MYDIR=`cygpath -m "$MYDIR"` + ;; +esac # # Look whether the user wants to run inside gdb @@ -102,8 +109,17 @@ else JDK=@@JDK_IMPORT_PATH@@ fi -if [ "${JDK}" = "" ]; then - echo "Failed to find JDK. Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty." +if [ "${JDK}" != "" ]; then + case "$OS" in + CYGWIN*) + JDK=`cygpath -m "$JDK"` + ;; + esac + +else + echo "Failed to find JDK." \ + "Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty." + exit 1 fi # We will set the LD_LIBRARY_PATH as follows: @@ -120,7 +136,6 @@ SBP=${MYDIR}:${JRE}/lib/${ARCH} # Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH -OS=`uname -s` if [ "${OS}" = "Darwin" ] then if [ -z "$DYLD_LIBRARY_PATH" ] @@ -141,7 +156,7 @@ else export LD_LIBRARY_PATH fi -JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS"; +JPARMS="-XXaltjvm=$MYDIR -Dsun.java.launcher.is_altjvm=true $@ $JAVA_ARGS"; # Locate the java launcher LAUNCHER=$JDK/bin/java @@ -152,6 +167,11 @@ fi GDBSRCDIR=$MYDIR BASEDIR=`cd $MYDIR/../../.. && pwd` +case "$OS" in +CYGWIN*) + BASEDIR=`cygpath -m "$BASEDIR"` + ;; +esac init_gdb() { # Create a gdb script in case we should run inside gdb diff --git a/hotspot/make/linux/makefiles/buildtree.make b/hotspot/make/linux/makefiles/buildtree.make index fd6c52513fe..67ef0e35d6c 100644 --- a/hotspot/make/linux/makefiles/buildtree.make +++ b/hotspot/make/linux/makefiles/buildtree.make @@ -124,7 +124,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS)) # For dependencies and recursive makes. BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make -BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make +BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make dtrace.make BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \ SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) @@ -361,6 +361,16 @@ sa.make: $(BUILDTREE_MAKE) echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ ) > $@ +dtrace.make: $(BUILDTREE_MAKE) + @echo Creating $@ ... + $(QUIETLY) ( \ + $(BUILDTREE_COMMENT); \ + echo; \ + echo include flags.make; \ + echo; \ + echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ + ) > $@ + FORCE: .PHONY: all FORCE diff --git a/hotspot/make/linux/makefiles/dtrace.make b/hotspot/make/linux/makefiles/dtrace.make index b50eab183de..3a053736aae 100644 --- a/hotspot/make/linux/makefiles/dtrace.make +++ b/hotspot/make/linux/makefiles/dtrace.make @@ -42,18 +42,39 @@ ifneq ($(ALT_SDT_H),) else SDT_H_FILE = /usr/include/sys/sdt.h endif + DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE)) REASON = "$(SDT_H_FILE) not found" -ifneq ($(DTRACE_ENABLED),) - CFLAGS += -DDTRACE_ENABLED -endif +endif # GCC version +endif # OPENJDK -endif + +DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace +DTRACE_PROG = dtrace +DtraceOutDir = $(GENERATED)/dtracefiles + +$(DtraceOutDir): + mkdir $(DtraceOutDir) + +$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d + +$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d + +$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d + +ifneq ($(DTRACE_ENABLED),) +CFLAGS += -DDTRACE_ENABLED +dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h +else +dtrace_gen_headers: + $(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)" endif # Phony target used in vm.make build target to check whether enabled. -.PHONY: dtraceCheck ifeq ($(DTRACE_ENABLED),) dtraceCheck: $(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)" @@ -61,5 +82,7 @@ else dtraceCheck: endif +.PHONY: dtrace_gen_headers dtraceCheck + # It doesn't support HAVE_DTRACE_H though. diff --git a/hotspot/make/linux/makefiles/top.make b/hotspot/make/linux/makefiles/top.make index 95e6e6856e8..8c6c2ca0194 100644 --- a/hotspot/make/linux/makefiles/top.make +++ b/hotspot/make/linux/makefiles/top.make @@ -80,7 +80,7 @@ default: vm_build_preliminaries the_vm @echo All done. # This is an explicit dependency for the sake of parallel makes. -vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff +vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff dtrace_stuff @# We need a null action here, so implicit rules don't get consulted. $(Cached_plat): $(Plat_File) @@ -102,6 +102,9 @@ trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags) sa_stuff: @$(MAKE) -f sa.make $(MFLAGS-adjusted) +dtrace_stuff: $(Cached_plat) $(adjust-mflags) + @$(MAKE) -f dtrace.make dtrace_gen_headers $(MFLAGS-adjusted) GENERATED=$(GENERATED) + # and the VM: must use other makefile with dependencies included # We have to go to great lengths to get control over the -jN argument diff --git a/hotspot/make/solaris/makefiles/dtrace.make b/hotspot/make/solaris/makefiles/dtrace.make index 3b32385ecad..5af625b54db 100644 --- a/hotspot/make/solaris/makefiles/dtrace.make +++ b/hotspot/make/solaris/makefiles/dtrace.make @@ -55,6 +55,7 @@ JVMOFFS.o = $(JVMOFFS).o GENOFFS = generate$(JVMOFFS) DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace +DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace DTRACE = dtrace DTRACE.o = $(DTRACE).o @@ -253,8 +254,8 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) endif endif -$(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \ - $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d +$(DTRACE).d: $(DTRACE_COMMON_SRCDIR)/hotspot.d $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d \ + $(DTRACE_COMMON_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d $(QUIETLY) cat $^ > $@ DTraced_Files = ciEnv.o \ @@ -332,14 +333,14 @@ $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files) $(DtraceOutDir): mkdir $(DtraceOutDir) -$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d +$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d -$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d +$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d -$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d +$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h diff --git a/hotspot/src/os/bsd/dtrace/hs_private.d b/hotspot/src/os/bsd/dtrace/hs_private.d deleted file mode 100644 index 50f4264a3c1..00000000000 --- a/hotspot/src/os/bsd/dtrace/hs_private.d +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2005, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hs_private { - probe hashtable__new_entry(void*, uint32_t, uintptr_t, void*); - probe safepoint__begin(); - probe safepoint__end(); - probe cms__initmark__begin(); - probe cms__initmark__end(); - probe cms__remark__begin(); - probe cms__remark__end(); -}; - -#pragma D attributes Private/Private/Common provider hs_private provider -#pragma D attributes Private/Private/Unknown provider hs_private module -#pragma D attributes Private/Private/Unknown provider hs_private function -#pragma D attributes Private/Private/Common provider hs_private name -#pragma D attributes Private/Private/Common provider hs_private args - diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp index 456daba559c..cadf960b1ac 100644 --- a/hotspot/src/os/bsd/vm/os_bsd.cpp +++ b/hotspot/src/os/bsd/vm/os_bsd.cpp @@ -1788,12 +1788,14 @@ void os::jvm_path(char *buf, jint buflen) { if (rp == NULL) return; - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Typical value for buf is - // "/jre/lib///libjvm". If "/jre/lib/" appears at - // the right place in the string, then assume we are installed in a JDK and - // we're done. Otherwise, check for a JAVA_HOME environment variable and - // construct a path to the JVM being overridden. + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Typical + // value for buf is "/jre/lib///libjvm.so" + // or "/jre/lib//libjvm.dylib". If "/jre/lib/" + // appears at the right place in the string, then assume we are + // installed in a JDK and we're done. Otherwise, check for a + // JAVA_HOME environment variable and construct a path to the JVM + // being overridden. const char *p = buf + strlen(buf) - 1; for (int count = 0; p > buf && count < 5; ++count) { diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index d0751f005ad..1e3fc78b505 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -2371,13 +2371,14 @@ void os::jvm_path(char *buf, jint buflen) { if (rp == NULL) return; - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Typical value for buf is - // "/jre/lib///libjvm.so". If "/jre/lib/" appears at - // the right place in the string, then assume we are installed in a JDK and - // we're done. Otherwise, check for a JAVA_HOME environment variable and fix - // up the path so it looks like libjvm.so is installed there (append a - // fake suffix hotspot/libjvm.so). + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Typical + // value for buf is "/jre/lib///libjvm.so". + // If "/jre/lib/" appears at the right place in the string, then + // assume we are installed in a JDK and we're done. Otherwise, check + // for a JAVA_HOME environment variable and fix up the path so it + // looks like libjvm.so is installed there (append a fake suffix + // hotspot/libjvm.so). const char *p = buf + strlen(buf) - 1; for (int count = 0; p > buf && count < 5; ++count) { for (--p; p > buf && *p != '/'; --p) diff --git a/hotspot/src/os/bsd/dtrace/hotspot.d b/hotspot/src/os/posix/dtrace/hotspot.d similarity index 100% rename from hotspot/src/os/bsd/dtrace/hotspot.d rename to hotspot/src/os/posix/dtrace/hotspot.d diff --git a/hotspot/src/os/bsd/dtrace/hotspot_jni.d b/hotspot/src/os/posix/dtrace/hotspot_jni.d similarity index 100% rename from hotspot/src/os/bsd/dtrace/hotspot_jni.d rename to hotspot/src/os/posix/dtrace/hotspot_jni.d diff --git a/hotspot/src/os/solaris/dtrace/hs_private.d b/hotspot/src/os/posix/dtrace/hs_private.d similarity index 100% rename from hotspot/src/os/solaris/dtrace/hs_private.d rename to hotspot/src/os/posix/dtrace/hs_private.d diff --git a/hotspot/src/os/solaris/dtrace/hotspot.d b/hotspot/src/os/solaris/dtrace/hotspot.d deleted file mode 100644 index b3679eaba62..00000000000 --- a/hotspot/src/os/solaris/dtrace/hotspot.d +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2005, 2010, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hotspot { - probe class__loaded(char*, uintptr_t, void*, uintptr_t); - probe class__unloaded(char*, uintptr_t, void*, uintptr_t); - probe class__initialization__required(char*, uintptr_t, void*, intptr_t); - probe class__initialization__recursive(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__concurrent(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__erroneous(char*, uintptr_t, void*, intptr_t, int); - probe class__initialization__super__failed(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__clinit(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__error(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__end(char*, uintptr_t, void*, intptr_t,int); - probe vm__init__begin(); - probe vm__init__end(); - probe vm__shutdown(); - probe vmops__request(char*, uintptr_t, int); - probe vmops__begin(char*, uintptr_t, int); - probe vmops__end(char*, uintptr_t, int); - probe gc__begin(uintptr_t); - probe gc__end(); - probe mem__pool__gc__begin( - char*, uintptr_t, char*, uintptr_t, - uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe mem__pool__gc__end( - char*, uintptr_t, char*, uintptr_t, - uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__start(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__stop(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__sleep__begin(long long); - probe thread__sleep__end(int); - probe thread__yield(); - probe thread__park__begin(uintptr_t, int, long long); - probe thread__park__end(uintptr_t); - probe thread__unpark(uintptr_t); - probe method__compile__begin( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); - probe method__compile__end( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, - char*, uintptr_t, uintptr_t); - probe compiled__method__load( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, void*, uintptr_t); - probe compiled__method__unload( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); - probe monitor__contended__enter(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__contended__entered(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__contended__exit(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__wait(uintptr_t, uintptr_t, char*, uintptr_t, uintptr_t); - probe monitor__waited(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__notify(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__notifyAll(uintptr_t, uintptr_t, char*, uintptr_t); - - probe object__alloc(int, char*, uintptr_t, uintptr_t); - probe method__entry( - int, char*, int, char*, int, char*, int); - probe method__return( - int, char*, int, char*, int, char*, int); -}; - -#pragma D attributes Evolving/Evolving/Common provider hotspot provider -#pragma D attributes Private/Private/Unknown provider hotspot module -#pragma D attributes Private/Private/Unknown provider hotspot function -#pragma D attributes Evolving/Evolving/Common provider hotspot name -#pragma D attributes Evolving/Evolving/Common provider hotspot args diff --git a/hotspot/src/os/solaris/dtrace/hotspot_jni.d b/hotspot/src/os/solaris/dtrace/hotspot_jni.d deleted file mode 100644 index cca1c517650..00000000000 --- a/hotspot/src/os/solaris/dtrace/hotspot_jni.d +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Copyright (c) 2005, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hotspot_jni { - probe AllocObject__entry(void*, void*); - probe AllocObject__return(void*); - probe AttachCurrentThreadAsDaemon__entry(void*, void**, void*); - probe AttachCurrentThreadAsDaemon__return(uint32_t); - probe AttachCurrentThread__entry(void*, void**, void*); - probe AttachCurrentThread__return(uint32_t); - probe CallBooleanMethodA__entry(void*, void*, uintptr_t); - probe CallBooleanMethodA__return(uintptr_t); - probe CallBooleanMethod__entry(void*, void*, uintptr_t); - probe CallBooleanMethod__return(uintptr_t); - probe CallBooleanMethodV__entry(void*, void*, uintptr_t); - probe CallBooleanMethodV__return(uintptr_t); - probe CallByteMethodA__entry(void*, void*, uintptr_t); - probe CallByteMethodA__return(char); - probe CallByteMethod__entry(void*, void*, uintptr_t); - probe CallByteMethod__return(char); - probe CallByteMethodV__entry(void*, void*, uintptr_t); - probe CallByteMethodV__return(char); - probe CallCharMethodA__entry(void*, void*, uintptr_t); - probe CallCharMethodA__return(uint16_t); - probe CallCharMethod__entry(void*, void*, uintptr_t); - probe CallCharMethod__return(uint16_t); - probe CallCharMethodV__entry(void*, void*, uintptr_t); - probe CallCharMethodV__return(uint16_t); - probe CallDoubleMethodA__entry(void*, void*, uintptr_t); - probe CallDoubleMethodA__return(); - probe CallDoubleMethod__entry(void*, void*, uintptr_t); - probe CallDoubleMethod__return(); - probe CallDoubleMethodV__entry(void*, void*, uintptr_t); - probe CallDoubleMethodV__return(); - probe CallFloatMethodA__entry(void*, void*, uintptr_t); - probe CallFloatMethodA__return(); - probe CallFloatMethod__entry(void*, void*, uintptr_t); - probe CallFloatMethod__return(); - probe CallFloatMethodV__entry(void*, void*, uintptr_t); - probe CallFloatMethodV__return(); - probe CallIntMethodA__entry(void*, void*, uintptr_t); - probe CallIntMethodA__return(uint32_t); - probe CallIntMethod__entry(void*, void*, uintptr_t); - probe CallIntMethod__return(uint32_t); - probe CallIntMethodV__entry(void*, void*, uintptr_t); - probe CallIntMethodV__return(uint32_t); - probe CallLongMethodA__entry(void*, void*, uintptr_t); - probe CallLongMethodA__return(uintptr_t); - probe CallLongMethod__entry(void*, void*, uintptr_t); - probe CallLongMethod__return(uintptr_t); - probe CallLongMethodV__entry(void*, void*, uintptr_t); - probe CallLongMethodV__return(uintptr_t); - probe CallNonvirtualBooleanMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethodA__return(uintptr_t); - probe CallNonvirtualBooleanMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethod__return(uintptr_t); - probe CallNonvirtualBooleanMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethodV__return(uintptr_t); - probe CallNonvirtualByteMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethodA__return(char); - probe CallNonvirtualByteMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethod__return(char); - probe CallNonvirtualByteMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethodV__return(char); - probe CallNonvirtualCharMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethodA__return(uint16_t); - probe CallNonvirtualCharMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethod__return(uint16_t); - probe CallNonvirtualCharMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethodV__return(uint16_t); - probe CallNonvirtualDoubleMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethodA__return(); - probe CallNonvirtualDoubleMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethod__return(); - probe CallNonvirtualDoubleMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethodV__return(); - probe CallNonvirtualFloatMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethodA__return(); - probe CallNonvirtualFloatMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethod__return(); - probe CallNonvirtualFloatMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethodV__return(); - probe CallNonvirtualIntMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethodA__return(uint32_t); - probe CallNonvirtualIntMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethod__return(uint32_t); - probe CallNonvirtualIntMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethodV__return(uint32_t); - probe CallNonvirtualLongMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethodA__return(uintptr_t); - probe CallNonvirtualLongMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethod__return(uintptr_t); - probe CallNonvirtualLongMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethodV__return(uintptr_t); - probe CallNonvirtualObjectMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethodA__return(void*); - probe CallNonvirtualObjectMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethod__return(void*); - probe CallNonvirtualObjectMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethodV__return(void*); - probe CallNonvirtualShortMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethodA__return(uint16_t); - probe CallNonvirtualShortMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethod__return(uint16_t); - probe CallNonvirtualShortMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethodV__return(uint16_t); - probe CallNonvirtualVoidMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethodA__return(); - probe CallNonvirtualVoidMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethod__return(); - probe CallNonvirtualVoidMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethodV__return(); - probe CallObjectMethodA__entry(void*, void*, uintptr_t); - probe CallObjectMethodA__return(void*); - probe CallObjectMethod__entry(void*, void*, uintptr_t); - probe CallObjectMethod__return(void*); - probe CallObjectMethodV__entry(void*, void*, uintptr_t); - probe CallObjectMethodV__return(void*); - probe CallShortMethodA__entry(void*, void*, uintptr_t); - probe CallShortMethodA__return(uint16_t); - probe CallShortMethod__entry(void*, void*, uintptr_t); - probe CallShortMethod__return(uint16_t); - probe CallShortMethodV__entry(void*, void*, uintptr_t); - probe CallShortMethodV__return(uint16_t); - probe CallStaticBooleanMethodA__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethodA__return(uintptr_t); - probe CallStaticBooleanMethod__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethod__return(uintptr_t); - probe CallStaticBooleanMethodV__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethodV__return(uintptr_t); - probe CallStaticByteMethodA__entry(void*, void*, uintptr_t); - probe CallStaticByteMethodA__return(char); - probe CallStaticByteMethod__entry(void*, void*, uintptr_t); - probe CallStaticByteMethod__return(char); - probe CallStaticByteMethodV__entry(void*, void*, uintptr_t); - probe CallStaticByteMethodV__return(char); - probe CallStaticCharMethodA__entry(void*, void*, uintptr_t); - probe CallStaticCharMethodA__return(uint16_t); - probe CallStaticCharMethod__entry(void*, void*, uintptr_t); - probe CallStaticCharMethod__return(uint16_t); - probe CallStaticCharMethodV__entry(void*, void*, uintptr_t); - probe CallStaticCharMethodV__return(uint16_t); - probe CallStaticDoubleMethodA__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethodA__return(); - probe CallStaticDoubleMethod__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethod__return(); - probe CallStaticDoubleMethodV__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethodV__return(); - probe CallStaticFloatMethodA__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethodA__return(); - probe CallStaticFloatMethod__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethod__return(); - probe CallStaticFloatMethodV__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethodV__return(); - probe CallStaticIntMethodA__entry(void*, void*, uintptr_t); - probe CallStaticIntMethodA__return(uint32_t); - probe CallStaticIntMethod__entry(void*, void*, uintptr_t); - probe CallStaticIntMethod__return(uint32_t); - probe CallStaticIntMethodV__entry(void*, void*, uintptr_t); - probe CallStaticIntMethodV__return(uint32_t); - probe CallStaticLongMethodA__entry(void*, void*, uintptr_t); - probe CallStaticLongMethodA__return(uintptr_t); - probe CallStaticLongMethod__entry(void*, void*, uintptr_t); - probe CallStaticLongMethod__return(uintptr_t); - probe CallStaticLongMethodV__entry(void*, void*, uintptr_t); - probe CallStaticLongMethodV__return(uintptr_t); - probe CallStaticObjectMethodA__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethodA__return(void*); - probe CallStaticObjectMethod__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethod__return(void*); - probe CallStaticObjectMethodV__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethodV__return(void*); - probe CallStaticShortMethodA__entry(void*, void*, uintptr_t); - probe CallStaticShortMethodA__return(uint16_t); - probe CallStaticShortMethod__entry(void*, void*, uintptr_t); - probe CallStaticShortMethod__return(uint16_t); - probe CallStaticShortMethodV__entry(void*, void*, uintptr_t); - probe CallStaticShortMethodV__return(uint16_t); - probe CallStaticVoidMethodA__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethodA__return(); - probe CallStaticVoidMethod__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethod__return(); - probe CallStaticVoidMethodV__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethodV__return(); - probe CallVoidMethodA__entry(void*, void*, uintptr_t); - probe CallVoidMethodA__return(); - probe CallVoidMethod__entry(void*, void*, uintptr_t); - probe CallVoidMethod__return(); - probe CallVoidMethodV__entry(void*, void*, uintptr_t); - probe CallVoidMethodV__return(); - probe CreateJavaVM__entry(void**, void**, void*); - probe CreateJavaVM__return(uint32_t); - probe DefineClass__entry(void*, const char*, void*, char*, uintptr_t); - probe DefineClass__return(void*); - probe DeleteGlobalRef__entry(void*, void*); - probe DeleteGlobalRef__return(); - probe DeleteLocalRef__entry(void*, void*); - probe DeleteLocalRef__return(); - probe DeleteWeakGlobalRef__entry(void*, void*); - probe DeleteWeakGlobalRef__return(); - probe DestroyJavaVM__entry(void*); - probe DestroyJavaVM__return(uint32_t); - probe DetachCurrentThread__entry(void*); - probe DetachCurrentThread__return(uint32_t); - probe EnsureLocalCapacity__entry(void*, uint32_t); - probe EnsureLocalCapacity__return(uint32_t); - probe ExceptionCheck__entry(void*); - probe ExceptionCheck__return(uintptr_t); - probe ExceptionClear__entry(void*); - probe ExceptionClear__return(); - probe ExceptionDescribe__entry(void*); - probe ExceptionDescribe__return(); - probe ExceptionOccurred__entry(void*); - probe ExceptionOccurred__return(void*); - probe FatalError__entry(void* env, const char*); - probe FindClass__entry(void*, const char*); - probe FindClass__return(void*); - probe FromReflectedField__entry(void*, void*); - probe FromReflectedField__return(uintptr_t); - probe FromReflectedMethod__entry(void*, void*); - probe FromReflectedMethod__return(uintptr_t); - probe GetArrayLength__entry(void*, void*); - probe GetArrayLength__return(uintptr_t); - probe GetBooleanArrayElements__entry(void*, void*, uintptr_t*); - probe GetBooleanArrayElements__return(uintptr_t*); - probe GetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); - probe GetBooleanArrayRegion__return(); - probe GetBooleanField__entry(void*, void*, uintptr_t); - probe GetBooleanField__return(uintptr_t); - probe GetByteArrayElements__entry(void*, void*, uintptr_t*); - probe GetByteArrayElements__return(char*); - probe GetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); - probe GetByteArrayRegion__return(); - probe GetByteField__entry(void*, void*, uintptr_t); - probe GetByteField__return(char); - probe GetCharArrayElements__entry(void*, void*, uintptr_t*); - probe GetCharArrayElements__return(uint16_t*); - probe GetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetCharArrayRegion__return(); - probe GetCharField__entry(void*, void*, uintptr_t); - probe GetCharField__return(uint16_t); - probe GetCreatedJavaVMs__entry(void**, uintptr_t, uintptr_t*); - probe GetCreatedJavaVMs__return(uintptr_t); - probe GetDefaultJavaVMInitArgs__entry(void*); - probe GetDefaultJavaVMInitArgs__return(uint32_t); - probe GetDirectBufferAddress__entry(void*, void*); - probe GetDirectBufferAddress__return(void*); - probe GetDirectBufferCapacity__entry(void*, void*); - probe GetDirectBufferCapacity__return(uintptr_t); - probe GetDoubleArrayElements__entry(void*, void*, uintptr_t*); - probe GetDoubleArrayElements__return(double*); - probe GetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, double*); - probe GetDoubleArrayRegion__return(); - probe GetDoubleField__entry(void*, void*, uintptr_t); - probe GetDoubleField__return(); - probe GetEnv__entry(void*, void*, uint32_t); - probe GetEnv__return(uint32_t); - probe GetFieldID__entry(void*, void*, const char*, const char*); - probe GetFieldID__return(uintptr_t); - probe GetFloatArrayElements__entry(void*, void*, uintptr_t*); - probe GetFloatArrayElements__return(float*); - probe GetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, float*); - probe GetFloatArrayRegion__return(); - probe GetFloatField__entry(void*, void*, uintptr_t); - probe GetFloatField__return(); - probe GetIntArrayElements__entry(void*, void*, uintptr_t*); - probe GetIntArrayElements__return(uint32_t*); - probe GetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint32_t*); - probe GetIntArrayRegion__return(); - probe GetIntField__entry(void*, void*, uintptr_t); - probe GetIntField__return(uint32_t); - probe GetJavaVM__entry(void*, void**); - probe GetJavaVM__return(uint32_t); - probe GetLongArrayElements__entry(void*, void*, uintptr_t*); - probe GetLongArrayElements__return(uintptr_t*); - probe GetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); - probe GetLongArrayRegion__return(); - probe GetLongField__entry(void*, void*, uintptr_t); - probe GetLongField__return(uintptr_t); - probe GetMethodID__entry(void*, void*, const char*, const char*); - probe GetMethodID__return(uintptr_t); - probe GetObjectArrayElement__entry(void*, void*, uintptr_t); - probe GetObjectArrayElement__return(void*); - probe GetObjectClass__entry(void*, void*); - probe GetObjectClass__return(void*); - probe GetObjectField__entry(void*, void*, uintptr_t); - probe GetObjectField__return(void*); - probe GetObjectRefType__entry(void*, void*); - probe GetObjectRefType__return(void*); - probe GetPrimitiveArrayCritical__entry(void*, void*, uintptr_t*); - probe GetPrimitiveArrayCritical__return(void*); - probe GetShortArrayElements__entry(void*, void*, uintptr_t*); - probe GetShortArrayElements__return(uint16_t*); - probe GetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetShortArrayRegion__return(); - probe GetShortField__entry(void*, void*, uintptr_t); - probe GetShortField__return(uint16_t); - probe GetStaticBooleanField__entry(void*, void*, uintptr_t); - probe GetStaticBooleanField__return(uintptr_t); - probe GetStaticByteField__entry(void*, void*, uintptr_t); - probe GetStaticByteField__return(char); - probe GetStaticCharField__entry(void*, void*, uintptr_t); - probe GetStaticCharField__return(uint16_t); - probe GetStaticDoubleField__entry(void*, void*, uintptr_t); - probe GetStaticDoubleField__return(); - probe GetStaticFieldID__entry(void*, void*, const char*, const char*); - probe GetStaticFieldID__return(uintptr_t); - probe GetStaticFloatField__entry(void*, void*, uintptr_t); - probe GetStaticFloatField__return(); - probe GetStaticIntField__entry(void*, void*, uintptr_t); - probe GetStaticIntField__return(uint32_t); - probe GetStaticLongField__entry(void*, void*, uintptr_t); - probe GetStaticLongField__return(uintptr_t); - probe GetStaticMethodID__entry(void*, void*, const char*, const char*); - probe GetStaticMethodID__return(uintptr_t); - probe GetStaticObjectField__entry(void*, void*, uintptr_t); - probe GetStaticObjectField__return(void*); - probe GetStaticShortField__entry(void*, void*, uintptr_t); - probe GetStaticShortField__return(uint16_t); - probe GetStringChars__entry(void*, void*, uintptr_t*); - probe GetStringChars__return(const uint16_t*); - probe GetStringCritical__entry(void*, void*, uintptr_t*); - probe GetStringCritical__return(const uint16_t*); - probe GetStringLength__entry(void*, void*); - probe GetStringLength__return(uintptr_t); - probe GetStringRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetStringRegion__return(); - probe GetStringUTFChars__entry(void*, void*, uintptr_t*); - probe GetStringUTFChars__return(const char*); - probe GetStringUTFLength__entry(void*, void*); - probe GetStringUTFLength__return(uintptr_t); - probe GetStringUTFRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); - probe GetStringUTFRegion__return(); - probe GetSuperclass__entry(void*, void*); - probe GetSuperclass__return(void*); - probe GetVersion__entry(void*); - probe GetVersion__return(uint32_t); - probe IsAssignableFrom__entry(void*, void*, void*); - probe IsAssignableFrom__return(uintptr_t); - probe IsInstanceOf__entry(void*, void*, void*); - probe IsInstanceOf__return(uintptr_t); - probe IsSameObject__entry(void*, void*, void*); - probe IsSameObject__return(uintptr_t); - probe MonitorEnter__entry(void*, void*); - probe MonitorEnter__return(uint32_t); - probe MonitorExit__entry(void*, void*); - probe MonitorExit__return(uint32_t); - probe NewBooleanArray__entry(void*, uintptr_t); - probe NewBooleanArray__return(void*); - probe NewByteArray__entry(void*, uintptr_t); - probe NewByteArray__return(void*); - probe NewCharArray__entry(void*, uintptr_t); - probe NewCharArray__return(void*); - probe NewDirectByteBuffer__entry(void*, void*, uintptr_t); - probe NewDirectByteBuffer__return(void*); - probe NewDoubleArray__entry(void*, uintptr_t); - probe NewDoubleArray__return(void*); - probe NewFloatArray__entry(void*, uintptr_t); - probe NewFloatArray__return(void*); - probe NewGlobalRef__entry(void*, void*); - probe NewGlobalRef__return(void*); - probe NewIntArray__entry(void*, uintptr_t); - probe NewIntArray__return(void*); - probe NewLocalRef__entry(void*, void*); - probe NewLocalRef__return(void*); - probe NewLongArray__entry(void*, uintptr_t); - probe NewLongArray__return(void*); - probe NewObjectA__entry(void*, void*, uintptr_t); - probe NewObjectA__return(void*); - probe NewObjectArray__entry(void*, uintptr_t, void*, void*); - probe NewObjectArray__return(void*); - probe NewObject__entry(void*, void*, uintptr_t); - probe NewObject__return(void*); - probe NewObjectV__entry(void*, void*, uintptr_t); - probe NewObjectV__return(void*); - probe NewShortArray__entry(void*, uintptr_t); - probe NewShortArray__return(void*); - probe NewString__entry(void*, const uint16_t*, uintptr_t); - probe NewString__return(void*); - probe NewStringUTF__entry(void*, const char*); - probe NewStringUTF__return(void*); - probe NewWeakGlobalRef__entry(void*, void*); - probe NewWeakGlobalRef__return(void*); - probe PopLocalFrame__entry(void*, void*); - probe PopLocalFrame__return(void*); - probe PushLocalFrame__entry(void*, uint32_t); - probe PushLocalFrame__return(uint32_t); - probe RegisterNatives__entry(void*, void*, const void*, uint32_t); - probe RegisterNatives__return(uint32_t); - probe ReleaseBooleanArrayElements__entry(void*, void*, uintptr_t*, uint32_t); - probe ReleaseBooleanArrayElements__return(); - probe ReleaseByteArrayElements__entry(void*, void*, char*, uint32_t); - probe ReleaseByteArrayElements__return(); - probe ReleaseCharArrayElements__entry(void*, void*, uint16_t*, uint32_t); - probe ReleaseCharArrayElements__return(); - probe ReleaseDoubleArrayElements__entry(void*, void*, double*, uint32_t); - probe ReleaseDoubleArrayElements__return(); - probe ReleaseFloatArrayElements__entry(void*, void*, float*, uint32_t); - probe ReleaseFloatArrayElements__return(); - probe ReleaseIntArrayElements__entry(void*, void*, uint32_t*, uint32_t); - probe ReleaseIntArrayElements__return(); - probe ReleaseLongArrayElements__entry(void*, void*, uintptr_t*, uint32_t); - probe ReleaseLongArrayElements__return(); - probe ReleasePrimitiveArrayCritical__entry(void*, void*, void*, uint32_t); - probe ReleasePrimitiveArrayCritical__return(); - probe ReleaseShortArrayElements__entry(void*, void*, uint16_t*, uint32_t); - probe ReleaseShortArrayElements__return(); - probe ReleaseStringChars__entry(void*, void*, const uint16_t*); - probe ReleaseStringChars__return(); - probe ReleaseStringCritical__entry(void*, void*, const uint16_t*); - probe ReleaseStringCritical__return(); - probe ReleaseStringUTFChars__entry(void*, void*, const char*); - probe ReleaseStringUTFChars__return(); - probe SetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); - probe SetBooleanArrayRegion__return(); - probe SetBooleanField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetBooleanField__return(); - probe SetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const char*); - probe SetByteArrayRegion__return(); - probe SetByteField__entry(void*, void*, uintptr_t, char); - probe SetByteField__return(); - probe SetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); - probe SetCharArrayRegion__return(); - probe SetCharField__entry(void*, void*, uintptr_t, uint16_t); - probe SetCharField__return(); - probe SetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const double*); - probe SetDoubleArrayRegion__return(); - probe SetDoubleField__entry(void*, void*, uintptr_t); - probe SetDoubleField__return(); - probe SetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const float*); - probe SetFloatArrayRegion__return(); - probe SetFloatField__entry(void*, void*, uintptr_t); - probe SetFloatField__return(); - probe SetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint32_t*); - probe SetIntArrayRegion__return(); - probe SetIntField__entry(void*, void*, uintptr_t, uint32_t); - probe SetIntField__return(); - probe SetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); - probe SetLongArrayRegion__return(); - probe SetLongField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetLongField__return(); - probe SetObjectArrayElement__entry(void*, void*, uintptr_t, void*); - probe SetObjectArrayElement__return(); - probe SetObjectField__entry(void*, void*, uintptr_t, void*); - probe SetObjectField__return(); - probe SetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); - probe SetShortArrayRegion__return(); - probe SetShortField__entry(void*, void*, uintptr_t, uint16_t); - probe SetShortField__return(); - probe SetStaticBooleanField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetStaticBooleanField__return(); - probe SetStaticByteField__entry(void*, void*, uintptr_t, char); - probe SetStaticByteField__return(); - probe SetStaticCharField__entry(void*, void*, uintptr_t, uint16_t); - probe SetStaticCharField__return(); - probe SetStaticDoubleField__entry(void*, void*, uintptr_t); - probe SetStaticDoubleField__return(); - probe SetStaticFloatField__entry(void*, void*, uintptr_t); - probe SetStaticFloatField__return(); - probe SetStaticIntField__entry(void*, void*, uintptr_t, uint32_t); - probe SetStaticIntField__return(); - probe SetStaticLongField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetStaticLongField__return(); - probe SetStaticObjectField__entry(void*, void*, uintptr_t, void*); - probe SetStaticObjectField__return(); - probe SetStaticShortField__entry(void*, void*, uintptr_t, uint16_t); - probe SetStaticShortField__return(); - probe Throw__entry(void*, void*); - probe Throw__return(intptr_t); - probe ThrowNew__entry(void*, void*, const char*); - probe ThrowNew__return(intptr_t); - probe ToReflectedField__entry(void*, void*, uintptr_t, uintptr_t); - probe ToReflectedField__return(void*); - probe ToReflectedMethod__entry(void*, void*, uintptr_t, uintptr_t); - probe ToReflectedMethod__return(void*); - probe UnregisterNatives__entry(void*, void*); - probe UnregisterNatives__return(uint32_t); -}; - -#pragma D attributes Standard/Standard/Common provider hotspot_jni provider -#pragma D attributes Private/Private/Unknown provider hotspot_jni module -#pragma D attributes Private/Private/Unknown provider hotspot_jni function -#pragma D attributes Standard/Standard/Common provider hotspot_jni name -#pragma D attributes Evolving/Evolving/Common provider hotspot_jni args - diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp index 533bbb76650..396e9df542e 100644 --- a/hotspot/src/os/solaris/vm/os_solaris.cpp +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp @@ -2441,13 +2441,14 @@ void os::jvm_path(char *buf, jint buflen) { return; } - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Typical value for buf is - // "/jre/lib///libjvm.so". If "/jre/lib/" appears at - // the right place in the string, then assume we are installed in a JDK and - // we're done. Otherwise, check for a JAVA_HOME environment variable and fix - // up the path so it looks like libjvm.so is installed there (append a - // fake suffix hotspot/libjvm.so). + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Typical + // value for buf is "/jre/lib///libjvm.so". + // If "/jre/lib/" appears at the right place in the string, then + // assume we are installed in a JDK and we're done. Otherwise, check + // for a JAVA_HOME environment variable and fix up the path so it + // looks like libjvm.so is installed there (append a fake suffix + // hotspot/libjvm.so). const char *p = buf + strlen(buf) - 1; for (int count = 0; p > buf && count < 5; ++count) { for (--p; p > buf && *p != '/'; --p) diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp index 5cf47426595..2fa8269ee5e 100644 --- a/hotspot/src/os/windows/vm/os_windows.cpp +++ b/hotspot/src/os/windows/vm/os_windows.cpp @@ -1810,32 +1810,30 @@ void os::jvm_path(char *buf, jint buflen) { } buf[0] = '\0'; - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Check for an - // JAVA_HOME environment variable - // and fix up the path so it looks like - // libjvm.so is installed there (append a fake suffix - // hotspot/libjvm.so). - char* java_home_var = ::getenv("JAVA_HOME"); - if (java_home_var != NULL && java_home_var[0] != 0) { + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Check + // for a JAVA_HOME environment variable and fix up the path so it + // looks like jvm.dll is installed there (append a fake suffix + // hotspot/jvm.dll). + char* java_home_var = ::getenv("JAVA_HOME"); + if (java_home_var != NULL && java_home_var[0] != 0) { + strncpy(buf, java_home_var, buflen); - strncpy(buf, java_home_var, buflen); - - // determine if this is a legacy image or modules image - // modules image doesn't have "jre" subdirectory - size_t len = strlen(buf); - char* jrebin_p = buf + len; - jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\"); - if (0 != _access(buf, 0)) { - jio_snprintf(jrebin_p, buflen-len, "\\bin\\"); - } - len = strlen(buf); - jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll"); - } + // determine if this is a legacy image or modules image + // modules image doesn't have "jre" subdirectory + size_t len = strlen(buf); + char* jrebin_p = buf + len; + jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\"); + if (0 != _access(buf, 0)) { + jio_snprintf(jrebin_p, buflen-len, "\\bin\\"); + } + len = strlen(buf); + jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll"); + } } - if(buf[0] == '\0') { - GetModuleFileName(vm_lib_handle, buf, buflen); + if (buf[0] == '\0') { + GetModuleFileName(vm_lib_handle, buf, buflen); } strcpy(saved_jvm_path, buf); } diff --git a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java index 6216a84adb1..0e0c846c318 100644 --- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java +++ b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java @@ -161,7 +161,18 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 { for (BuildConfig cfg : allConfigs) { startTag(cfg, "PropertyGroup"); tagData("LocalDebuggerCommand", cfg.get("JdkTargetRoot") + "\\bin\\java.exe"); - tagData("LocalDebuggerCommandArguments", "-XXaltjvm=$(TargetDir) -Dsun.java.launcher=gamma"); + // The JVM loads some libraries using a path relative to + // itself because it expects to be in a JRE or a JDK. The java + // launcher's '-XXaltjvm=' option allows the JVM to be outside + // the JRE or JDK so '-Dsun.java.launcher.is_altjvm=true' + // forces a fake JAVA_HOME relative path to be used to + // find the other libraries. The '-XX:+PauseAtExit' option + // causes the VM to wait for key press before exiting; this + // allows any stdout or stderr messages to be seen before + // the cmdtool exits. + tagData("LocalDebuggerCommandArguments", "-XXaltjvm=$(TargetDir) " + + "-Dsun.java.launcher.is_altjvm=true " + + "-XX:+UnlockDiagnosticVMOptions -XX:+PauseAtExit"); tagData("LocalDebuggerEnvironment", "JAVA_HOME=" + cfg.get("JdkTargetRoot")); endTag(); } diff --git a/hotspot/src/share/vm/interpreter/linkResolver.cpp b/hotspot/src/share/vm/interpreter/linkResolver.cpp index 52c88bd3a66..aa11784b718 100644 --- a/hotspot/src/share/vm/interpreter/linkResolver.cpp +++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp @@ -564,16 +564,7 @@ void LinkResolver::resolve_method(methodHandle& resolved_method, KlassHandle res } } - // 5. check if method is concrete - if (resolved_method->is_abstract() && !resolved_klass->is_abstract()) { - ResourceMark rm(THREAD); - THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), - Method::name_and_sig_as_C_string(resolved_klass(), - method_name, - method_signature)); - } - - // 6. access checks, access checking may be turned off when calling from within the VM. + // 5. access checks, access checking may be turned off when calling from within the VM. if (check_access) { assert(current_klass.not_null() , "current_klass should not be null"); diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp index a4201f1e84b..5d3327d1c23 100644 --- a/hotspot/src/share/vm/prims/jni.cpp +++ b/hotspot/src/share/vm/prims/jni.cpp @@ -1320,9 +1320,13 @@ static void jni_invoke_nonstatic(JNIEnv *env, JavaValue* result, jobject receive // interface call KlassHandle h_holder(THREAD, holder); - int itbl_index = m->itable_index(); - Klass* k = h_recv->klass(); - selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK); + if (call_type == JNI_VIRTUAL) { + int itbl_index = m->itable_index(); + Klass* k = h_recv->klass(); + selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK); + } else { + selected_method = m; + } } } diff --git a/hotspot/src/share/vm/prims/jvmtiEnv.cpp b/hotspot/src/share/vm/prims/jvmtiEnv.cpp index 318fe4e0b7e..6a197a84996 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp @@ -1360,8 +1360,10 @@ JvmtiEnv::GetFrameCount(JavaThread* java_thread, jint* count_ptr) { if (state == NULL) { return JVMTI_ERROR_THREAD_NOT_ALIVE; } - uint32_t debug_bits = 0; - if (is_thread_fully_suspended(java_thread, true, &debug_bits)) { + + // It is only safe to perform the direct operation on the current + // thread. All other usage needs to use a vm-safepoint-op for safety. + if (java_thread == JavaThread::current()) { err = get_frame_count(state, count_ptr); } else { // get java stack frame count at safepoint. @@ -1476,9 +1478,10 @@ JvmtiEnv::PopFrame(JavaThread* java_thread) { jvmtiError JvmtiEnv::GetFrameLocation(JavaThread* java_thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr) { jvmtiError err = JVMTI_ERROR_NONE; - uint32_t debug_bits = 0; - if (is_thread_fully_suspended(java_thread, true, &debug_bits)) { + // It is only safe to perform the direct operation on the current + // thread. All other usage needs to use a vm-safepoint-op for safety. + if (java_thread == JavaThread::current()) { err = get_frame_location(java_thread, depth, method_ptr, location_ptr); } else { // JVMTI get java stack frame location at safepoint. diff --git a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp index 084e19b45e4..0682118c88a 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp +++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp @@ -533,7 +533,11 @@ public: VMOp_Type type() const { return VMOp_GetFrameCount; } jvmtiError result() { return _result; } void doit() { - _result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr); + _result = JVMTI_ERROR_THREAD_NOT_ALIVE; + JavaThread* jt = _state->get_thread(); + if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) { + _result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr); + } } }; @@ -559,8 +563,12 @@ public: VMOp_Type type() const { return VMOp_GetFrameLocation; } jvmtiError result() { return _result; } void doit() { - _result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth, - _method_ptr, _location_ptr); + _result = JVMTI_ERROR_THREAD_NOT_ALIVE; + if (Threads::includes(_java_thread) && !_java_thread->is_exiting() && + _java_thread->threadObj() != NULL) { + _result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth, + _method_ptr, _location_ptr); + } } }; diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 7dc8afec0f7..13dc79c2fe2 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -101,7 +101,7 @@ bool Arguments::_xdebug_mode = false; const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; int Arguments::_sun_java_launcher_pid = -1; -bool Arguments::_created_by_gamma_launcher = false; +bool Arguments::_sun_java_launcher_is_altjvm = false; // These parameters are reset in method parse_vm_init_args(JavaVMInitArgs*) bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; @@ -151,7 +151,8 @@ static void logOption(const char* opt) { // Process java launcher properties. void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) { - // See if sun.java.launcher or sun.java.launcher.pid is defined. + // See if sun.java.launcher, sun.java.launcher.is_altjvm or + // sun.java.launcher.pid is defined. // Must do this before setting up other system properties, // as some of them may depend on launcher type. for (int index = 0; index < args->nOptions; index++) { @@ -162,6 +163,12 @@ void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) { process_java_launcher_argument(tail, option->extraInfo); continue; } + if (match_option(option, "-Dsun.java.launcher.is_altjvm=", &tail)) { + if (strcmp(tail, "true") == 0) { + _sun_java_launcher_is_altjvm = true; + } + continue; + } if (match_option(option, "-Dsun.java.launcher.pid=", &tail)) { _sun_java_launcher_pid = atoi(tail); continue; @@ -1013,9 +1020,10 @@ bool Arguments::add_property(const char* prop) { _java_command = value; // Record value in Arguments, but let it get passed to Java. - } else if (strcmp(key, "sun.java.launcher.pid") == 0) { - // launcher.pid property is private and is processed - // in process_sun_java_launcher_properties(); + } else if (strcmp(key, "sun.java.launcher.is_altjvm") == 0 || + strcmp(key, "sun.java.launcher.pid") == 0) { + // sun.java.launcher.is_altjvm and sun.java.launcher.pid property are + // private and are processed in process_sun_java_launcher_properties(); // the sun.java.launcher property is passed on to the java application FreeHeap(key); if (eq != NULL) { @@ -1810,9 +1818,6 @@ void Arguments::process_java_compiler_argument(char* arg) { void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) { _sun_java_launcher = strdup(launcher); - if (strcmp("gamma", _sun_java_launcher) == 0) { - _created_by_gamma_launcher = true; - } } bool Arguments::created_by_java_launcher() { @@ -1820,8 +1825,8 @@ bool Arguments::created_by_java_launcher() { return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0; } -bool Arguments::created_by_gamma_launcher() { - return _created_by_gamma_launcher; +bool Arguments::sun_java_launcher_is_altjvm() { + return _sun_java_launcher_is_altjvm; } //=========================================================================================================== @@ -3809,16 +3814,6 @@ jint Arguments::apply_ergo() { } } - // set PauseAtExit if the gamma launcher was used and a debugger is attached - // but only if not already set on the commandline - if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) { - bool set = false; - CommandLineFlags::wasSetOnCmdline("PauseAtExit", &set); - if (!set) { - FLAG_SET_DEFAULT(PauseAtExit, true); - } - } - return JNI_OK; } diff --git a/hotspot/src/share/vm/runtime/arguments.hpp b/hotspot/src/share/vm/runtime/arguments.hpp index 19aba5ea17a..f898c24b22d 100644 --- a/hotspot/src/share/vm/runtime/arguments.hpp +++ b/hotspot/src/share/vm/runtime/arguments.hpp @@ -269,14 +269,14 @@ class Arguments : AllStatic { static const char* _java_vendor_url_bug; // sun.java.launcher, private property to provide information about - // java/gamma launcher + // java launcher static const char* _sun_java_launcher; // sun.java.launcher.pid, private property static int _sun_java_launcher_pid; - // was this VM created by the gamma launcher - static bool _created_by_gamma_launcher; + // was this VM created via the -XXaltjvm= option + static bool _sun_java_launcher_is_altjvm; // Option flags static bool _has_profile; @@ -498,8 +498,8 @@ class Arguments : AllStatic { static const char* sun_java_launcher() { return _sun_java_launcher; } // Was VM created by a Java launcher? static bool created_by_java_launcher(); - // Was VM created by the gamma Java launcher? - static bool created_by_gamma_launcher(); + // -Dsun.java.launcher.is_altjvm + static bool sun_java_launcher_is_altjvm(); // -Dsun.java.launcher.pid static int sun_java_launcher_pid() { return _sun_java_launcher_pid; } diff --git a/hotspot/src/share/vm/utilities/dtrace.hpp b/hotspot/src/share/vm/utilities/dtrace.hpp index 73f5f7c3fba..92d99de204a 100644 --- a/hotspot/src/share/vm/utilities/dtrace.hpp +++ b/hotspot/src/share/vm/utilities/dtrace.hpp @@ -38,24 +38,20 @@ #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \ do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0) -#define USDT2 1 -#include "dtracefiles/hotspot.h" -#include "dtracefiles/hotspot_jni.h" -#include "dtracefiles/hs_private.h" #elif defined(LINUX) #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() -#define USDT1 1 #elif defined(__APPLE__) #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() -#define USDT2 1 #include -#include "dtracefiles/hotspot.h" -#include "dtracefiles/hotspot_jni.h" -#include "dtracefiles/hs_private.h" #else #error "dtrace enabled for unknown os" #endif /* defined(SOLARIS) */ +#define USDT2 1 +#include "dtracefiles/hotspot.h" +#include "dtracefiles/hotspot_jni.h" +#include "dtracefiles/hs_private.h" + #else /* defined(DTRACE_ENABLED) */ #define DTRACE_ONLY(x) diff --git a/hotspot/test/runtime/lambda-features/TestConcreteClassWithAbstractMethod.java b/hotspot/test/runtime/lambda-features/TestConcreteClassWithAbstractMethod.java new file mode 100644 index 00000000000..0fd1a426679 --- /dev/null +++ b/hotspot/test/runtime/lambda-features/TestConcreteClassWithAbstractMethod.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test + * @bug 8032010 + * @summary method lookup on an abstract method in a concrete class should be successful + * @run main TestConcreteClassWithAbstractMethod + */ + +import jdk.internal.org.objectweb.asm.ClassWriter; +import jdk.internal.org.objectweb.asm.MethodVisitor; + +import static jdk.internal.org.objectweb.asm.Opcodes.*; + +/* + * class T1 { public int m() {} } + * class T2 { public abstract int m(); } + * class T3 { public int m() {} } + * + * Call site: T3.test() { invokevirtual T2.m() } + * T3.m() should be invoked + */ +public class TestConcreteClassWithAbstractMethod { + static final String classT1 = "p1.T1"; + static final String classT2 = "p1.T2"; + static final String classT3 = "p1.T3"; + + static final String callerName = classT3; + + public static void main(String[] args) throws Exception { + ClassLoader cl = new ClassLoader() { + public Class loadClass(String name) throws ClassNotFoundException { + if (findLoadedClass(name) != null) { + return findLoadedClass(name); + } + + if (classT1.equals(name)) { + byte[] classFile = dumpT1(); + return defineClass(classT1, classFile, 0, classFile.length); + } + if (classT2.equals(name)) { + byte[] classFile = dumpT2(); + return defineClass(classT2, classFile, 0, classFile.length); + } + if (classT3.equals(name)) { + byte[] classFile = dumpT3(); + return defineClass(classT3, classFile, 0, classFile.length); + } + + return super.loadClass(name); + } + }; + + cl.loadClass(classT1); + cl.loadClass(classT2); + cl.loadClass(classT3); + + //cl.loadClass(callerName).getDeclaredMethod("m"); + cl.loadClass(callerName).newInstance(); + + int result = (Integer)cl.loadClass(callerName).getDeclaredMethod("test").invoke(null); + System.out.println(""+result); + } + + public static byte[] dumpT1() { + ClassWriter cw = new ClassWriter(0); + MethodVisitor mv; + + cw.visit(52, ACC_PUBLIC | ACC_SUPER, "p1/T1", null, "java/lang/Object", null); + { + mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "", "()V", false); + mv.visitInsn(RETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null); + mv.visitCode(); + mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("p1/T1.m()"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "print", "(Ljava/lang/String;)V", false); + mv.visitIntInsn(BIPUSH, 3); + mv.visitInsn(IRETURN); + mv.visitMaxs(2, 1); + mv.visitEnd(); + } + cw.visitEnd(); + + return cw.toByteArray(); + } + + public static byte[] dumpT2() { + ClassWriter cw = new ClassWriter(0); + MethodVisitor mv; + + cw.visit(52, ACC_PUBLIC | ACC_SUPER, "p1/T2", null, "p1/T1", null); + { + mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "p1/T1", "", "()V", false); + mv.visitInsn(RETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC + ACC_ABSTRACT, "m", "()I", null, null); + mv.visitEnd(); + } + cw.visitEnd(); + + return cw.toByteArray(); + } + + public static byte[] dumpT3() { + ClassWriter cw = new ClassWriter(0); + MethodVisitor mv; + + cw.visit(52, ACC_PUBLIC + ACC_SUPER, "p1/T3", null, "p1/T2", null); + + { + mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "p1/T2", "", "()V", false); + mv.visitInsn(RETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null); + mv.visitCode(); + mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("p1/T3.m()"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "print", "(Ljava/lang/String;)V", false); + mv.visitIntInsn(BIPUSH, 2); + mv.visitInsn(IRETURN); + mv.visitMaxs(2, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "test", "()I", null, null); + mv.visitCode(); + mv.visitTypeInsn(NEW, "p1/T3"); + mv.visitInsn(DUP); + mv.visitMethodInsn(INVOKESPECIAL, "p1/T3", "", "()V", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "p1/T2", "m", "()I", false); + mv.visitInsn(IRETURN); + mv.visitMaxs(3, 2); + mv.visitEnd(); + } + cw.visitEnd(); + + return cw.toByteArray(); + } +} diff --git a/jaxp/.hgtags b/jaxp/.hgtags index dff54dcb33a..dc38862e746 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -243,3 +243,4 @@ e4e5069250e717defcb556e2f6be291460988c51 jdk8-b118 69a930376c70beb9877970128bad0f04cb0c6eb1 jdk8-b119 64d8b228a72cf9082b1a9a881c81188ccffde234 jdk8-b120 4045edd35e8ba73bfdc23ce8961b9640d4145fe5 jdk9-b00 +e5256f530a9b5f2d677ca245de44a617ffb58f52 jdk9-b01 diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java b/jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java index 3c58d9bf664..095a6e74b96 100644 --- a/jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java +++ b/jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java @@ -79,7 +79,7 @@ public final class XalanConstants { /** * JDK maximum general entity size limit */ - public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = + public static final String JDK_GENERAL_ENTITY_SIZE_LIMIT = ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; /** * JDK maximum parameter entity size limit @@ -129,7 +129,7 @@ public final class XalanConstants { /** * JDK maximum general entity size limit */ - public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; + public static final String SP_GENERAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; /** * JDK maximum parameter entity size limit */ diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java b/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java index 7f25db946c3..aa8bea5b0ce 100644 --- a/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java +++ b/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java @@ -52,6 +52,8 @@ import org.w3c.dom.Text; */ public class ExsltStrings extends ExsltBase { + static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"; + /** * The str:align function aligns a string within another string. *

@@ -225,7 +227,7 @@ public class ExsltStrings extends ExsltBase token = str.substring(fromIndex); } - Document doc = DocumentHolder.m_doc; + Document doc = getDocument(); synchronized (doc) { Element element = doc.createElement("token"); @@ -289,7 +291,7 @@ public class ExsltStrings extends ExsltBase { StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims); - Document doc = DocumentHolder.m_doc; + Document doc = getDocument(); synchronized (doc) { while (lTokenizer.hasMoreTokens()) @@ -305,7 +307,7 @@ public class ExsltStrings extends ExsltBase else { - Document doc = DocumentHolder.m_doc; + Document doc = getDocument(); synchronized (doc) { for (int i = 0; i < toTokenize.length(); i++) @@ -327,31 +329,23 @@ public class ExsltStrings extends ExsltBase { return tokenize(toTokenize, " \t\n\r"); } + /** - * This class is not loaded until first referenced (see Java Language - * Specification by Gosling/Joy/Steele, section 12.4.1) - * - * The static members are created when this class is first referenced, as a - * lazy initialization not needing checking against null or any - * synchronization. - * + * @return an instance of DOM Document */ - private static class DocumentHolder - { - // Reuse the Document object to reduce memory usage. - private static final Document m_doc; - static { - try - { - m_doc =DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); + private static Document getDocument() + { + try + { + if (System.getSecurityManager() == null) { + return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); + } else { + return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument(); } - - catch(ParserConfigurationException pce) - { - throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); - } - + } + catch(ParserConfigurationException pce) + { + throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); } } - } diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java b/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java index 27e4083617d..23082e87aa4 100644 --- a/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java +++ b/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java @@ -56,6 +56,7 @@ import org.xml.sax.SAXNotSupportedException; */ public class Extensions { + static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"; /** * Constructor Extensions * @@ -114,23 +115,14 @@ public class Extensions // This no longer will work right since the DTM. // Document myDoc = myProcessor.getContextNode().getOwnerDocument(); - try - { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - DocumentBuilder db = dbf.newDocumentBuilder(); - Document myDoc = db.newDocument(); + Document myDoc = getDocument(); Text textNode = myDoc.createTextNode(textNodeValue); DocumentFragment docFrag = myDoc.createDocumentFragment(); docFrag.appendChild(textNode); - return new NodeSet(docFrag); - } - catch(ParserConfigurationException pce) - { - throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); - } + return new NodeSet(docFrag); } } @@ -249,8 +241,7 @@ public class Extensions public static NodeList tokenize(String toTokenize, String delims) { - Document doc = DocumentHolder.m_doc; - + Document doc = getDocument(); StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims); NodeSet resultSet = new NodeSet(); @@ -308,17 +299,7 @@ public class Extensions public static Node checkEnvironment(ExpressionContext myContext) { - Document factoryDocument; - try - { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - DocumentBuilder db = dbf.newDocumentBuilder(); - factoryDocument = db.newDocument(); - } - catch(ParserConfigurationException pce) - { - throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); - } + Document factoryDocument = getDocument(); Node resultNode = null; try @@ -391,30 +372,21 @@ public class Extensions } /** - * This class is not loaded until first referenced (see Java Language - * Specification by Gosling/Joy/Steele, section 12.4.1) - * - * The static members are created when this class is first referenced, as a - * lazy initialization not needing checking against null or any - * synchronization. - * + * @return an instance of DOM Document */ - private static class DocumentHolder - { - // Reuse the Document object to reduce memory usage. - private static final Document m_doc; - static + private static Document getDocument() + { + try { - try - { - m_doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); + if (System.getSecurityManager() == null) { + return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); + } else { + return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument(); } - - catch(ParserConfigurationException pce) - { - throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); - } - + } + catch(ParserConfigurationException pce) + { + throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); } } } diff --git a/jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java b/jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java index e861c21c3a0..ad700329a9d 100644 --- a/jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java +++ b/jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java @@ -73,8 +73,8 @@ public final class XMLSecurityManager { XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), TOTAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_TOTAL_ENTITY_SIZE_LIMIT, XalanConstants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), - GENEAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_GENEAL_ENTITY_SIZE_LIMIT, - XalanConstants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), + GENERAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_GENERAL_ENTITY_SIZE_LIMIT, + XalanConstants.SP_GENERAL_ENTITY_SIZE_LIMIT, 0, 0), PARAMETER_ENTITY_SIZE_LIMIT(XalanConstants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, XalanConstants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java b/jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java index 659aa7a884a..4eab0fadfe9 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java @@ -240,7 +240,7 @@ public final class Constants { /** * JDK maximum general entity size limit */ - public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = + public static final String JDK_GENERAL_ENTITY_SIZE_LIMIT = ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; /** * JDK maximum parameter entity size limit @@ -287,7 +287,7 @@ public final class Constants { /** * JDK maximum general entity size limit */ - public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; + public static final String SP_GENERAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; /** * JDK maximum parameter entity size limit */ diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java index 2a43d7a67a1..f945b0a6e5e 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java @@ -44,6 +44,7 @@ import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; import com.sun.org.apache.xerces.internal.impl.Constants; +import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; import com.sun.xml.internal.stream.Entity; @@ -262,6 +263,11 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler { fEntityManager.startDTDEntity(inputSource); } // setInputSource(XMLInputSource) + + public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) { + fLimitAnalyzer = limitAnalyzer; + } + /** * Scans the external subset of the document. * @@ -1625,10 +1631,10 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler { XMLString literal = fString; XMLString literal2 = fString; int countChar = 0; - if (fLimitAnalyzer == null && fSecurityManager != null) { - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); - fLimitAnalyzer.startEntity(entityName); - } + if (fLimitAnalyzer == null ) { + fLimitAnalyzer = new XMLLimitAnalyzer(); + } + fLimitAnalyzer.startEntity(entityName); if (fEntityScanner.scanLiteral(quote, fString) != quote) { fStringBuffer.clear(); @@ -2145,6 +2151,8 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler { // set starting state setScannerState(SCANNER_STATE_TEXT_DECL); //new SymbolTable()); + + fLimitAnalyzer = new XMLLimitAnalyzer(); } /** @@ -2164,18 +2172,18 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler { */ private void checkLimit(String entityName, int len) { if (fLimitAnalyzer == null) { - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); + fLimitAnalyzer = new XMLLimitAnalyzer(); } fLimitAnalyzer.addValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName, len); - if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("MaxEntitySizeLimit", new Object[]{entityName, fLimitAnalyzer.getValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), fSecurityManager.getLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)}); } - if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("TotalEntitySizeLimit", new Object[]{fLimitAnalyzer.getTotalValue(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), fSecurityManager.getLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java index 27950c3cf49..c3e1910728b 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java @@ -659,12 +659,12 @@ public class XMLDocumentFragmentScannerImpl dtdGrammarUtil = null; if (fSecurityManager != null) { - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT); } else { - fLimitAnalyzer = null; fElementAttributeLimit = 0; } + fLimitAnalyzer = new XMLLimitAnalyzer(); + fEntityManager.setLimitAnalyzer(fLimitAnalyzer); } /** @@ -3154,16 +3154,16 @@ public class XMLDocumentFragmentScannerImpl */ protected void checkLimit(XMLStringBuffer buffer) { if (fLimitAnalyzer.isTracking(fCurrentEntityName)) { - fLimitAnalyzer.addValue(Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length); - if (fSecurityManager.isOverLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + fLimitAnalyzer.addValue(Limit.GENERAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length); + if (fSecurityManager.isOverLimit(Limit.GENERAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("MaxEntitySizeLimit", new Object[]{fCurrentEntityName, - fLimitAnalyzer.getValue(Limit.GENEAL_ENTITY_SIZE_LIMIT), - fSecurityManager.getLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT), - fSecurityManager.getStateLiteral(Limit.GENEAL_ENTITY_SIZE_LIMIT)}); + fLimitAnalyzer.getValue(Limit.GENERAL_ENTITY_SIZE_LIMIT), + fSecurityManager.getLimit(Limit.GENERAL_ENTITY_SIZE_LIMIT), + fSecurityManager.getStateLiteral(Limit.GENERAL_ENTITY_SIZE_LIMIT)}); } - if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("TotalEntitySizeLimit", new Object[]{fLimitAnalyzer.getTotalValue(Limit.TOTAL_ENTITY_SIZE_LIMIT), fSecurityManager.getLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT), diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java index 0b30b0a0d1b..c2d58bd4070 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java @@ -1090,6 +1090,8 @@ public class XMLDocumentScannerImpl ((XMLDTDScannerImpl)fDTDScanner).reset(fPropertyManager); } + + fDTDScanner.setLimitAnalyzer(fLimitAnalyzer); do { again = false; switch (fScannerState) { diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java index 59f3aa00e2d..09a82608c14 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java @@ -1300,8 +1300,8 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver { if(fLimitAnalyzer != null) { fLimitAnalyzer.addValue(entityExpansionIndex, name, 1); } - if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex)){ - fSecurityManager.debugPrint(); + if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex, fLimitAnalyzer)){ + fSecurityManager.debugPrint(fLimitAnalyzer); fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"EntityExpansionLimitExceeded", new Object[]{fSecurityManager.getLimitValueByIndex(entityExpansionIndex)}, XMLErrorReporter.SEVERITY_FATAL_ERROR ); @@ -1368,9 +1368,9 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver { //close the reader try{ if (fLimitAnalyzer != null) { - fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name); + fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENERAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name); if (fCurrentEntity.name.equals("[xml]")) { - fSecurityManager.debugPrint(); + fSecurityManager.debugPrint(fLimitAnalyzer); } } fCurrentEntity.close(); @@ -1439,7 +1439,6 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver { fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); // initialize state //fStandalone = false; @@ -1501,7 +1500,6 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver { fStaxEntityResolver = (StaxEntityResolverWrapper)componentManager.getProperty(STAX_ENTITY_RESOLVER, null); fValidationManager = (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER, null); fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER, null); - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT); // JAXP 1.5 feature @@ -1659,7 +1657,6 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver { if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() && propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) { fSecurityManager = (XMLSecurityManager)value; - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); } } @@ -1668,8 +1665,13 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver { { XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)value; fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); - } } + } + + public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) { + this.fLimitAnalyzer = fLimitAnalyzer; + } + /** * Returns a list of property identifiers that are recognized by * this component. This method may return null if no properties diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java b/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java index 82667edeed0..4c30871a813 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java @@ -77,7 +77,6 @@ public final class XMLLimitAnalyzer { } } - private XMLSecurityManager securityManager; /** * Max value accumulated for each property */ @@ -101,8 +100,7 @@ public final class XMLLimitAnalyzer { * Default constructor. Establishes default values for known security * vulnerabilities. */ - public XMLLimitAnalyzer(XMLSecurityManager securityManager) { - this.securityManager = securityManager; + public XMLLimitAnalyzer() { values = new int[Limit.values().length]; totalValue = new int[Limit.values().length]; names = new String[Limit.values().length]; @@ -157,7 +155,7 @@ public final class XMLLimitAnalyzer { } - if (index == Limit.GENEAL_ENTITY_SIZE_LIMIT.ordinal() || + if (index == Limit.GENERAL_ENTITY_SIZE_LIMIT.ordinal() || index == Limit.PARAMETER_ENTITY_SIZE_LIMIT.ordinal()) { totalValue[Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()] += value; } @@ -221,7 +219,7 @@ public final class XMLLimitAnalyzer { } } - public void debugPrint() { + public void debugPrint(XMLSecurityManager securityManager) { Formatter formatter = new Formatter(); System.out.println(formatter.format("%30s %15s %15s %15s %30s", "Property","Limit","Total size","Size","Entity Name")); diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java b/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java index a28e80dc81a..96e196e2227 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java @@ -65,7 +65,7 @@ public final class XMLSecurityManager { MAX_OCCUR_NODE_LIMIT(Constants.JDK_MAX_OCCUR_LIMIT, Constants.SP_MAX_OCCUR_LIMIT, 0, 5000), ELEMENT_ATTRIBUTE_LIMIT(Constants.JDK_ELEMENT_ATTRIBUTE_LIMIT, Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), TOTAL_ENTITY_SIZE_LIMIT(Constants.JDK_TOTAL_ENTITY_SIZE_LIMIT, Constants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), - GENEAL_ENTITY_SIZE_LIMIT(Constants.JDK_GENEAL_ENTITY_SIZE_LIMIT, Constants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), + GENERAL_ENTITY_SIZE_LIMIT(Constants.JDK_GENERAL_ENTITY_SIZE_LIMIT, Constants.SP_GENERAL_ENTITY_SIZE_LIMIT, 0, 0), PARAMETER_ENTITY_SIZE_LIMIT(Constants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, Constants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); final String apiProperty; @@ -148,7 +148,6 @@ public final class XMLSecurityManager { private boolean[] isSet; - private XMLLimitAnalyzer limitAnalyzer; /** * Index of the special entityCountInfo property */ @@ -169,7 +168,6 @@ public final class XMLSecurityManager { * @param secureProcessing */ public XMLSecurityManager(boolean secureProcessing) { - limitAnalyzer = new XMLLimitAnalyzer(this); values = new int[Limit.values().length]; states = new State[Limit.values().length]; isSet = new boolean[Limit.values().length]; @@ -249,13 +247,15 @@ public final class XMLSecurityManager { if (index == indexEntityCountInfo) { printEntityCountInfo = (String)value; } else { - int temp = 0; - try { + int temp; + if (Integer.class.isAssignableFrom(value.getClass())) { + temp = ((Integer)value).intValue(); + } else { temp = Integer.parseInt((String) value); if (temp < 0) { temp = 0; } - } catch (NumberFormatException e) {} + } setLimit(index, state, temp); } } @@ -387,8 +387,9 @@ public final class XMLSecurityManager { * @param size the size (count or length) of the entity * @return true if the size is over the limit, false otherwise */ - public boolean isOverLimit(Limit limit, String entityName, int size) { - return isOverLimit(limit.ordinal(), entityName, size); + public boolean isOverLimit(Limit limit, String entityName, int size, + XMLLimitAnalyzer limitAnalyzer) { + return isOverLimit(limit.ordinal(), entityName, size, limitAnalyzer); } /** @@ -400,7 +401,8 @@ public final class XMLSecurityManager { * @param size the size (count or length) of the entity * @return true if the size is over the limit, false otherwise */ - public boolean isOverLimit(int index, String entityName, int size) { + public boolean isOverLimit(int index, String entityName, int size, + XMLLimitAnalyzer limitAnalyzer) { if (values[index] == NO_LIMIT) { return false; } @@ -418,11 +420,11 @@ public final class XMLSecurityManager { * @param size the size (count or length) of the entity * @return true if the size is over the limit, false otherwise */ - public boolean isOverLimit(Limit limit) { - return isOverLimit(limit.ordinal()); + public boolean isOverLimit(Limit limit, XMLLimitAnalyzer limitAnalyzer) { + return isOverLimit(limit.ordinal(), limitAnalyzer); } - public boolean isOverLimit(int index) { + public boolean isOverLimit(int index, XMLLimitAnalyzer limitAnalyzer) { if (values[index] == NO_LIMIT) { return false; } @@ -436,29 +438,12 @@ public final class XMLSecurityManager { } } - public void debugPrint() { + public void debugPrint(XMLLimitAnalyzer limitAnalyzer) { if (printEntityCountInfo.equals(Constants.JDK_YES)) { - limitAnalyzer.debugPrint(); + limitAnalyzer.debugPrint(this); } } - /** - * Return the limit analyzer - * - * @return the limit analyzer - */ - public XMLLimitAnalyzer getLimitAnalyzer() { - return limitAnalyzer; - } - - /** - * Set limit analyzer - * - * @param analyzer a limit analyzer - */ - public void setLimitAnalyzer(XMLLimitAnalyzer analyzer) { - limitAnalyzer = analyzer; - } /** * Indicate if a property is set explicitly diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java b/jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java index 495c96bfd1b..49dea56b194 100644 --- a/jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java +++ b/jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java @@ -20,6 +20,7 @@ package com.sun.org.apache.xerces.internal.xni.parser; +import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; import java.io.IOException; import com.sun.org.apache.xerces.internal.xni.XNIException; @@ -95,4 +96,5 @@ public interface XMLDTDScanner public boolean scanDTDExternalSubset(boolean complete) throws IOException, XNIException; + public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer); } // interface XMLDTDScanner diff --git a/jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java b/jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java index 247bd40fdd0..ab8cd27c647 100644 --- a/jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java +++ b/jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java @@ -24,20 +24,17 @@ package com.sun.org.apache.xml.internal.resolver; import com.sun.org.apache.xerces.internal.utils.SecuritySupport; +import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver; +import com.sun.org.apache.xml.internal.resolver.helpers.Debug; import java.io.InputStream; - -import java.net.URL; import java.net.MalformedURLException; - +import java.net.URL; import java.util.MissingResourceException; import java.util.PropertyResourceBundle; import java.util.ResourceBundle; import java.util.StringTokenizer; import java.util.Vector; - -import com.sun.org.apache.xml.internal.resolver.helpers.Debug; -import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver; -import com.sun.org.apache.xml.internal.resolver.Catalog; +import sun.reflect.misc.ReflectUtil; /** * CatalogManager provides an interface to the catalog properties. @@ -687,7 +684,7 @@ public class CatalogManager { catalog = new Catalog(); } else { try { - catalog = (Catalog) Class.forName(catalogClassName).newInstance(); + catalog = (Catalog) ReflectUtil.forName(catalogClassName).newInstance(); } catch (ClassNotFoundException cnfe) { debug.message(1,"Catalog class named '" + catalogClassName diff --git a/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java b/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java index 68652decc09..c5740cb1c66 100644 --- a/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java +++ b/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java @@ -23,24 +23,21 @@ package com.sun.org.apache.xml.internal.resolver.readers; -import java.util.Hashtable; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.net.MalformedURLException; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.ParserConfigurationException; - import com.sun.org.apache.xml.internal.resolver.Catalog; import com.sun.org.apache.xml.internal.resolver.CatalogException; -import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader; import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces; - -import org.xml.sax.SAXException; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Hashtable; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.*; +import org.xml.sax.SAXException; +import sun.reflect.misc.ReflectUtil; /** * A DOM-based CatalogReader. @@ -199,7 +196,7 @@ public class DOMCatalogReader implements CatalogReader { DOMCatalogParser domParser = null; try { - domParser = (DOMCatalogParser) Class.forName(domParserClass).newInstance(); + domParser = (DOMCatalogParser) ReflectUtil.forName(domParserClass).newInstance(); } catch (ClassNotFoundException cnfe) { catalog.getCatalogManager().debug.message(1, "Cannot load XML Catalog Parser class", domParserClass); throw new CatalogException(CatalogException.UNPARSEABLE); diff --git a/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java b/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java index 56a8303d03b..105cb7671ae 100644 --- a/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java +++ b/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java @@ -23,19 +23,21 @@ package com.sun.org.apache.xml.internal.resolver.readers; -import java.util.Hashtable; -import java.io.IOException; +import com.sun.org.apache.xml.internal.resolver.Catalog; +import com.sun.org.apache.xml.internal.resolver.CatalogException; +import com.sun.org.apache.xml.internal.resolver.CatalogManager; +import com.sun.org.apache.xml.internal.resolver.helpers.Debug; import java.io.FileNotFoundException; +import java.io.IOException; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; -import java.net.MalformedURLException; import java.net.UnknownHostException; - +import java.util.Hashtable; import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParserFactory; import javax.xml.parsers.SAXParser; - +import javax.xml.parsers.SAXParserFactory; import org.xml.sax.AttributeList; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; @@ -45,12 +47,7 @@ import org.xml.sax.InputSource; import org.xml.sax.Locator; import org.xml.sax.Parser; import org.xml.sax.SAXException; - -import com.sun.org.apache.xml.internal.resolver.Catalog; -import com.sun.org.apache.xml.internal.resolver.CatalogManager; -import com.sun.org.apache.xml.internal.resolver.CatalogException; -import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader; -import com.sun.org.apache.xml.internal.resolver.helpers.Debug; +import sun.reflect.misc.ReflectUtil; /** * A SAX-based CatalogReader. @@ -246,7 +243,7 @@ public class SAXCatalogReader implements CatalogReader, ContentHandler, Document } parser.parse(new InputSource(is), spHandler); } else { - Parser parser = (Parser) Class.forName(parserClass).newInstance(); + Parser parser = (Parser) ReflectUtil.forName(parserClass).newInstance(); parser.setDocumentHandler(this); if (bResolver != null) { parser.setEntityResolver(bResolver); @@ -352,7 +349,7 @@ public class SAXCatalogReader implements CatalogReader, ContentHandler, Document try { saxParser = (SAXCatalogParser) - Class.forName(saxParserClass).newInstance(); + ReflectUtil.forName(saxParserClass).newInstance(); saxParser.setCatalog(catalog); saxParser.startDocument(); @@ -413,7 +410,7 @@ public class SAXCatalogReader implements CatalogReader, ContentHandler, Document try { saxParser = (SAXCatalogParser) - Class.forName(saxParserClass).newInstance(); + ReflectUtil.forName(saxParserClass).newInstance(); saxParser.setCatalog(catalog); saxParser.startDocument(); diff --git a/jaxws/.hgtags b/jaxws/.hgtags index b9a237b759d..a3601127a12 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -242,4 +242,8 @@ fe56ba456fd32758c72db629938d69067468d89c jdk8-b117 76a598cf50c4e1dc1fc8adc08b451943aa1a3179 jdk8-b118 172b8e056ff259044ca48c5425d643dc8e2e05c8 jdk8-b119 6c152deb600d8a11bc46149ace317b1c9fce1482 jdk8-b120 +32050ab53c8a8e4cb09f04b88db78258a480fb61 jdk8-b121 +bc622ba563f9316f981c11c3a260f4c3fdc5ef07 jdk8-b122 +91f5c542ccad330efc0d281362dd6f33f2039746 jdk8-b123 32050ab53c8a8e4cb09f04b88db78258a480fb61 jdk9-b00 +9c9fabbcd3d526d7ca29165169155f49a107533a jdk9-b01 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java index 8ffebd2a81c..803d32973a9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java @@ -65,7 +65,7 @@ import java.util.Map; * * @author Kohsuke Kawaguchi (kk@kohsuke.org) */ -public class ApNavigator implements Navigator { +public final class ApNavigator implements Navigator { private final ProcessingEnvironment env; @@ -236,7 +236,7 @@ public class ApNavigator implements Navigator { EagerNType ent = (EagerNType) nt; if (base instanceof EagerNClass) { EagerNClass enc = (EagerNClass) base; - return create(REFLECTION.getBaseClass(ent.t, enc.c)); + return create(Utils.REFLECTION_NAVIGATOR.getBaseClass(ent.t, enc.c)); } // lazy class can never be a base type of an eager type return null; @@ -176,7 +176,7 @@ public final class NavigatorImpl implements Navigator { public NType getTypeArgument(NType nt, int i) { if (nt instanceof EagerNType) { EagerNType ent = (EagerNType) nt; - return create(REFLECTION.getTypeArgument(ent.t,i)); + return create(Utils.REFLECTION_NAVIGATOR.getTypeArgument(ent.t,i)); } if (nt instanceof NClassByJClass) { NClassByJClass nnt = (NClassByJClass) nt; @@ -189,7 +189,7 @@ public final class NavigatorImpl implements Navigator { public boolean isParameterizedType(NType nt) { if (nt instanceof EagerNType) { EagerNType ent = (EagerNType) nt; - return REFLECTION.isParameterizedType(ent.t); + return Utils.REFLECTION_NAVIGATOR.isParameterizedType(ent.t); } if (nt instanceof NClassByJClass) { NClassByJClass nnt = (NClassByJClass) nt; @@ -304,8 +304,8 @@ public final class NavigatorImpl implements Navigator { throw new UnsupportedOperationException(); } - public NClass findClass(String className, NClass referencePoint) { - // TODO: implement this method later + @Override + public NClass loadObjectFactory(NClass referencePoint, String pkg) { throw new UnsupportedOperationException(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java new file mode 100644 index 00000000000..945f3fd02a9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.tools.internal.xjc.model.nav; + +import com.sun.xml.internal.bind.v2.model.nav.Navigator; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Utils class. + * Has *package private* access to avoid inappropriate usage. + */ +/* package */ final class Utils { + + private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); + + /** + * static ReflectionNavigator field to avoid usage of reflection every time we use it. + */ + /* package */ static final Navigator REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java index 57fb608f0b6..704eaf1710c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java @@ -45,7 +45,6 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.bind.api.impl.NameConverter; import com.sun.xml.internal.bind.v2.ContextFactory; import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; import java.util.HashMap; @@ -417,7 +416,7 @@ public abstract class JAXBRIContext extends JAXBContext { * @since 2.0 FCS */ public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) { - return Navigator.REFLECTION.getBaseClass(type,baseType); + return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType); } /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java index bc2db6144d6..c414c84cea2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java @@ -32,8 +32,6 @@ import java.util.Collection; import javax.xml.namespace.QName; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; - /** * A reference to a JAXB-bound type. * @@ -105,12 +103,11 @@ public final class TypeReference { // if we are to reinstitute this check, check JAXB annotations only // assert annotations.length==0; // not designed to work with adapters. - Type base = Navigator.REFLECTION.getBaseClass(type, Collection.class); + Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(type, Collection.class); if(base==null) return this; // not a collection - return new TypeReference(tagName, - Navigator.REFLECTION.getTypeArgument(base,0)); + return new TypeReference(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0)); } @Override diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java new file mode 100644 index 00000000000..350062f1464 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.bind.api; + +import com.sun.xml.internal.bind.v2.model.nav.Navigator; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Utils class. + * Has *package private* access to avoid inappropriate usage. + */ +/* package */ final class Utils { + + private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); + + /** + * static ReflectionNavigator field to avoid usage of reflection every time we use it. + */ + /* package */ static final Navigator REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java index 243bc587709..29ce04661b1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java @@ -289,23 +289,12 @@ public class ModelBuilder implements ModelBuilderI { String pkg = nav.getPackageName(clazz); if (!registries.containsKey(pkg)) { // insert the package's object factory - C c = loadObjectFactory(clazz, pkg); + C c = nav.loadObjectFactory(clazz, pkg); if (c != null) addRegistry(c, p); } } - private C loadObjectFactory(C clazz, String pkg) { - C c; - try { - c = nav.findClass(pkg + ".ObjectFactory", clazz); - } catch (SecurityException ignored) { - // treat SecurityException in same way as ClassNotFoundException in this case - c = null; - } - return c; - } - /** * Getting parametrized classes of {@code JAXBElement<...>} property * @param p property which parametrized types we will try to get diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java index 5ce588a5cc9..1d6c524701e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java @@ -36,7 +36,7 @@ import com.sun.xml.internal.bind.v2.runtime.Transducer; */ final class RuntimeAnyTypeImpl extends AnyTypeImpl implements RuntimeNonElement { private RuntimeAnyTypeImpl() { - super(Navigator.REFLECTION); + super(Utils.REFLECTION_NAVIGATOR); } public Transducer getTransducer() { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java index 4a2c160fa8b..f1a28b6a729 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java @@ -91,9 +91,6 @@ import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data; import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext; import com.sun.xml.internal.bind.v2.util.ByteArrayOutputStreamEx; import com.sun.xml.internal.bind.v2.util.DataSourceSource; -import java.util.logging.Logger; -import com.sun.xml.internal.bind.Util; -import java.util.logging.Level; import org.xml.sax.SAXException; @@ -108,8 +105,6 @@ import org.xml.sax.SAXException; public abstract class RuntimeBuiltinLeafInfoImpl extends BuiltinLeafInfoImpl implements RuntimeBuiltinLeafInfo, Transducer { - private static final Logger logger = Util.getClassLogger(); - private RuntimeBuiltinLeafInfoImpl(Class type, QName... typeNames) { super(type, typeNames); LEAVES.put(type,this); @@ -201,7 +196,6 @@ public abstract class RuntimeBuiltinLeafInfoImpl extends BuiltinLeafInfoImpl< public static final List> builtinBeanInfos; public static final String MAP_ANYURI_TO_URI = "mapAnyUriToUri"; - public static final String USE_OLD_GMONTH_MAPPING = "jaxb.ri.useOldGmonthMapping"; static { @@ -966,14 +960,7 @@ public abstract class RuntimeBuiltinLeafInfoImpl extends BuiltinLeafInfoImpl< m.put(DatatypeConstants.DATETIME, "%Y-%M-%DT%h:%m:%s"+ "%z"); m.put(DatatypeConstants.DATE, "%Y-%M-%D" +"%z"); m.put(DatatypeConstants.TIME, "%h:%m:%s"+ "%z"); - if (System.getProperty(USE_OLD_GMONTH_MAPPING) == null) { - m.put(DatatypeConstants.GMONTH, "--%M%z"); // E2-12 Error. http://www.w3.org/2001/05/xmlschema-errata#e2-12 - } else { // backw. compatibility - if (logger.isLoggable(Level.FINE)) { - logger.log(Level.FINE, "Old GMonth mapping used."); - } - m.put(DatatypeConstants.GMONTH, "--%M--%z"); - } + m.put(DatatypeConstants.GMONTH, "--%M--%z"); m.put(DatatypeConstants.GDAY, "---%D" + "%z"); m.put(DatatypeConstants.GYEAR, "%Y" + "%z"); m.put(DatatypeConstants.GYEARMONTH, "%Y-%M" + "%z"); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java index 032e73154c9..9bc98962cc7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java @@ -42,7 +42,6 @@ import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException; import com.sun.xml.internal.bind.v2.runtime.Transducer; import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; @@ -122,7 +121,8 @@ final class RuntimeElementInfoImpl extends ElementInfoImpl getType() { - return Navigator.REFLECTION.erasure(super.getType()); + //noinspection unchecked + return (Class) Utils.REFLECTION_NAVIGATOR.erasure(super.getType()); } public RuntimeClassInfo getScope() { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java index 2167e08f231..a1a9c4dcf15 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java @@ -38,7 +38,6 @@ import com.sun.xml.internal.bind.v2.model.annotation.Locatable; import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; import com.sun.xml.internal.bind.v2.model.core.ID; import com.sun.xml.internal.bind.v2.model.nav.Navigator; -import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef; import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; @@ -75,7 +74,7 @@ public class RuntimeModelBuilder extends ModelBuilder { public final @Nullable JAXBContextImpl context; public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map subclassReplacements, String defaultNamespaceRemap) { - super(annotationReader, Navigator.REFLECTION, subclassReplacements, defaultNamespaceRemap); + super(annotationReader, Utils.REFLECTION_NAVIGATOR, subclassReplacements, defaultNamespaceRemap); this.context = context; } @@ -109,10 +108,6 @@ public class RuntimeModelBuilder extends ModelBuilder { return new RuntimeArrayInfoImpl(this, upstream, (Class)arrayType); } - public ReflectionNavigator getNavigator() { - return (ReflectionNavigator)nav; - } - @Override protected RuntimeTypeInfoSetImpl createTypeInfoSet() { return new RuntimeTypeInfoSetImpl(reader); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java index b4454e3bf9e..5079a5d8443 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java @@ -35,7 +35,6 @@ import javax.xml.namespace.QName; import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader; import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet; import com.sun.xml.internal.bind.v2.model.nav.Navigator; -import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; @@ -46,7 +45,7 @@ import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; */ final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl implements RuntimeTypeInfoSet { public RuntimeTypeInfoSetImpl(AnnotationReader reader) { - super(Navigator.REFLECTION,reader,RuntimeBuiltinLeafInfoImpl.LEAVES); + super(Utils.REFLECTION_NAVIGATOR,reader,RuntimeBuiltinLeafInfoImpl.LEAVES); } @Override @@ -54,10 +53,6 @@ final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java index fbbca826d53..3c671f6d13e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java @@ -25,6 +25,10 @@ package com.sun.xml.internal.bind.v2.model.nav; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.lang.reflect.Type; import java.util.Collection; import com.sun.xml.internal.bind.v2.runtime.Location; @@ -240,10 +244,6 @@ public interface Navigator { */ T getComponentType(T t); - - /** The singleton instance. */ - public static final ReflectionNavigator REFLECTION = new ReflectionNavigator(); - /** * Gets the i-th type argument from a parameterized type. * @@ -357,14 +357,14 @@ public interface Navigator { String getPackageName(C clazz); /** - * Finds the class/interface/enum/annotation of the given name. + * Finds ObjectFactory for the given referencePoint. * * @param referencePoint * The class that refers to the specified class. * @return * null if not found. */ - C findClass(String className, C referencePoint); + C loadObjectFactory(C referencePoint, String packageName); /** * Returns true if this method is a bridge method as defined in JLS. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java index fe2af1d6c5c..665001f88cf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java @@ -44,16 +44,19 @@ import com.sun.xml.internal.bind.v2.runtime.Location; * {@link Navigator} implementation for {@code java.lang.reflect}. * */ -public final class ReflectionNavigator implements Navigator { +/*package*/final class ReflectionNavigator implements Navigator { - /** - * Singleton. - * - * Use {@link Navigator#REFLECTION} - */ - ReflectionNavigator() { +// ---------- Singleton ----------------- + private static final ReflectionNavigator INSTANCE = new ReflectionNavigator(); + + /*package*/static ReflectionNavigator getInstance() { + return INSTANCE; } + private ReflectionNavigator() { + } +// --------------------------------------- + public Class getSuperClass(Class clazz) { if (clazz == Object.class) { return null; @@ -64,6 +67,7 @@ public final class ReflectionNavigator implements Navigator baseClassFinder = new TypeVisitor() { public Type onClass(Class c, Class sup) { @@ -496,7 +500,7 @@ public final class ReflectionNavigator implements Navigator RuntimeElementInfo getElementInfo( Class scope, QName name ); Map getElementMappings( Class scope ); Iterable getAllElements(); - ReflectionNavigator getNavigator(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java index e9819e40886..bd6f6cd834a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java @@ -48,7 +48,6 @@ import com.sun.xml.internal.bind.api.AccessorException; import com.sun.xml.internal.bind.v2.ClassFactory; import com.sun.xml.internal.bind.v2.WellKnownNamespace; import com.sun.xml.internal.bind.v2.model.core.ID; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo; import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; import com.sun.xml.internal.bind.v2.runtime.property.AttributeProperty; @@ -347,7 +346,7 @@ public final class ClassBeanInfoImpl extends JaxBeanInfo implement } else if (isThereAnOverridingProperty) { // need to double check the override - it should be safe to do after the model has been created because it's targeted to override properties only Class beanClass = bean.getClass(); - if (Navigator.REFLECTION.getDeclaredField(beanClass, p.getFieldName()) == null) { + if (Utils.REFLECTION_NAVIGATOR.getDeclaredField(beanClass, p.getFieldName()) == null) { p.serializeBody(bean, target, null); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java index 8d946867d9c..a2b96889453 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java @@ -36,7 +36,6 @@ import javax.xml.stream.XMLStreamException; import com.sun.xml.internal.bind.api.AccessorException; import com.sun.xml.internal.bind.v2.model.core.PropertyKind; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo; import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; import com.sun.xml.internal.bind.v2.runtime.property.Property; @@ -81,10 +80,10 @@ public final class ElementBeanInfoImpl extends JaxBeanInfo { this.property = PropertyFactory.create(grammar,rei.getProperty()); tagName = rei.getElementName(); - expectedType = Navigator.REFLECTION.erasure(rei.getContentInMemoryType()); + expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType()); scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz(); - Class type = Navigator.REFLECTION.erasure(rei.getType()); + Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType()); if(type==JAXBElement.class) constructor = null; else { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java index 4f518cbda16..8454c632780 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java @@ -65,7 +65,6 @@ import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXResult; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; @@ -90,7 +89,6 @@ import com.sun.xml.internal.bind.v2.model.core.Ref; import com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl; import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; import com.sun.xml.internal.bind.v2.model.nav.Navigator; -import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo; @@ -118,7 +116,6 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; -import org.xml.sax.helpers.DefaultHandler; /** * This class provides the implementation of JAXBContext. @@ -363,7 +360,7 @@ public final class JAXBContextImpl extends JAXBRIContext { beanInfoMap.put( e.getKey(), beanInfoMap.get(e.getValue()) ); // build bridges - ReflectionNavigator nav = typeSet.getNavigator(); + Navigator nav = typeSet.getNavigator(); for (TypeReference tr : typeRefs) { XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class); @@ -371,7 +368,7 @@ public final class JAXBContextImpl extends JAXBRIContext { XmlList xl = tr.get(XmlList.class); // eventually compute the in-memory type - Class erasedType = nav.erasure(tr.type); + Class erasedType = (Class) nav.erasure(tr.type); if(xjta!=null) { a = new Adapter(xjta.value(),nav); @@ -382,7 +379,7 @@ public final class JAXBContextImpl extends JAXBRIContext { } if(a!=null) { - erasedType = nav.erasure(a.defaultType); + erasedType = (Class) nav.erasure(a.defaultType); } Name name = nameBuilder.createElementName(tr.tagName); @@ -877,7 +874,7 @@ public final class JAXBContextImpl extends JAXBRIContext { // this is a special class we introduced for JAX-WS that we *don't* want in the schema } else { NonElement typeInfo = getXmlType(tis,tr); - xsdgen.add(tr.tagName, !Navigator.REFLECTION.isPrimitive(tr.type),typeInfo); + xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo); } } return xsdgen; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java new file mode 100644 index 00000000000..f4bf2b87cc5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.bind.v2.runtime; + +import com.sun.xml.internal.bind.v2.model.nav.Navigator; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Utils class. + * Has *package private* access to avoid inappropriate usage. + */ +/* package */ final class Utils { + + private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); + + /** + * static ReflectionNavigator field to avoid usage of reflection every time we use it. + */ + /* package */ static final Navigator REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java index b970722a072..01574d8107e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java @@ -27,7 +27,6 @@ package com.sun.xml.internal.bind.v2.runtime.property; import com.sun.xml.internal.bind.api.AccessorException; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; @@ -49,7 +48,7 @@ abstract class ArrayProperty extends PropertyImpl { assert prop.isCollection(); lister = Lister.create( - Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),prop.getAdapter()); + Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()),prop.id(),prop.getAdapter()); assert lister!=null; acc = prop.getAccessor().optimize(context); assert acc!=null; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java index 09e49ffb8e8..82420725d3a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java @@ -42,7 +42,6 @@ import com.sun.xml.internal.bind.api.AccessorException; import com.sun.xml.internal.bind.v2.ClassFactory; import com.sun.xml.internal.bind.v2.util.QNameMap; import com.sun.xml.internal.bind.v2.model.core.PropertyKind; -import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeMapPropertyInfo; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo; @@ -98,7 +97,8 @@ final class SingleMapNodeProperty extends PropertyImpl this.valueBeanInfo = context.getOrCreate(prop.getValueType()); // infer the implementation class - Class sig = ReflectionNavigator.REFLECTION.erasure(prop.getRawType()); + //noinspection unchecked + Class sig = (Class) Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()); mapImplClass = ClassFactory.inferImplClass(sig,knownImplClasses); // TODO: error check for mapImplClass==null // what is the error reporting path for this part of the code? @@ -140,23 +140,22 @@ final class SingleMapNodeProperty extends PropertyImpl */ private final Loader itemsLoader = new Loader(false) { - private ThreadLocal> target = new ThreadLocal>(); - private ThreadLocal> map = new ThreadLocal>(); + private ThreadLocal target = new ThreadLocal(); + private ThreadLocal map = new ThreadLocal(); + private int depthCounter = 0; // needed to clean ThreadLocals @Override public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { // create or obtain the Map object try { - BeanT target = (BeanT) state.prev.target; - ValueT mapValue = acc.get(target); - if(mapValue == null) - mapValue = ClassFactory.create(mapImplClass); - else - mapValue.clear(); - - Stack.push(this.target, target); - Stack.push(map, mapValue); - state.target = mapValue; + target.set((BeanT)state.prev.target); + map.set(acc.get(target.get())); + depthCounter++; + if(map.get() == null) { + map.set(ClassFactory.create(mapImplClass)); + } + map.get().clear(); + state.target = map.get(); } catch (AccessorException e) { // recover from error by setting a dummy Map that receives and discards the values handleGenericException(e,true); @@ -168,7 +167,11 @@ final class SingleMapNodeProperty extends PropertyImpl public void leaveElement(State state, TagName ea) throws SAXException { super.leaveElement(state, ea); try { - acc.set(Stack.pop(target), Stack.pop(map)); + acc.set(target.get(), map.get()); + if (--depthCounter == 0) { + target.remove(); + map.remove(); + } } catch (AccessorException ex) { handleGenericException(ex,true); } @@ -286,36 +289,4 @@ final class SingleMapNodeProperty extends PropertyImpl return acc; return null; } - - private static final class Stack { - private Stack parent; - private T value; - - private Stack(Stack parent, T value) { - this.parent = parent; - this.value = value; - } - - private Stack(T value) { - this.value = value; - } - - private static void push(ThreadLocal> holder, T value) { - Stack parent = holder.get(); - if (parent == null) - holder.set(new Stack(value)); - else - holder.set(new Stack(parent, value)); - } - - private static T pop(ThreadLocal> holder) { - Stack current = holder.get(); - if (current.parent == null) - holder.remove(); - else - holder.set(current.parent); - return current.value; - } - - } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java new file mode 100644 index 00000000000..39cb615f0b0 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.bind.v2.runtime.property; + +import com.sun.xml.internal.bind.v2.model.nav.Navigator; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Utils class. + * Has *package private* access to avoid inappropriate usage. + */ +/* package */ final class Utils { + + private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); + + /** + * static ReflectionNavigator field to avoid usage of reflection every time we use it. + */ + /* package */ static final Navigator REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java index ed93fbe89dc..4493d99401a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java @@ -46,7 +46,6 @@ import com.sun.xml.internal.bind.api.AccessorException; import com.sun.xml.internal.bind.api.JAXBRIContext; import com.sun.xml.internal.bind.v2.model.core.Adapter; import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory; import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader; @@ -198,7 +197,7 @@ public abstract class Accessor implements Receiver { public final Accessor adapt(Adapter adapter) { return new AdaptedAccessor( - (Class) Navigator.REFLECTION.erasure(adapter.defaultType), + (Class) Utils.REFLECTION_NAVIGATOR.erasure(adapter.defaultType), this, adapter.adapterType); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java index f4ea95a9d88..bac70532ad0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java @@ -51,7 +51,6 @@ import com.sun.xml.internal.bind.v2.ClassFactory; import com.sun.xml.internal.bind.v2.TODO; import com.sun.xml.internal.bind.v2.model.core.Adapter; import com.sun.xml.internal.bind.v2.model.core.ID; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Patcher; import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext; @@ -116,7 +115,7 @@ public abstract class Lister { public static Lister create(Type fieldType,ID idness, Adapter adapter) { - Class rawType = Navigator.REFLECTION.erasure(fieldType); + Class rawType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(fieldType); Class itemType; Lister l; @@ -125,9 +124,9 @@ public abstract class Lister { l = getArrayLister(itemType); } else if( Collection.class.isAssignableFrom(rawType) ) { - Type bt = Navigator.REFLECTION.getBaseClass(fieldType,Collection.class); + Type bt = Utils.REFLECTION_NAVIGATOR.getBaseClass(fieldType,Collection.class); if(bt instanceof ParameterizedType) - itemType = Navigator.REFLECTION.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]); + itemType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]); else itemType = Object.class; l = new CollectionLister(getImplClass(rawType)); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java index b110f111edb..cb346f2e73a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java @@ -39,7 +39,6 @@ import com.sun.xml.internal.bind.WhiteSpaceProcessor; import com.sun.xml.internal.bind.api.AccessorException; import com.sun.xml.internal.bind.v2.model.core.ID; import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; -import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef; import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; import com.sun.xml.internal.bind.v2.runtime.Name; @@ -144,8 +143,7 @@ public abstract class TransducedAccessor { if(prop.isCollection()) { return new ListTransducedAccessorImpl(xducer,prop.getAccessor(), - Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(), - prop.getAdapter())); + Lister.create(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter())); } if(prop.id()==ID.IDREF) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java new file mode 100644 index 00000000000..011bf19267d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.bind.v2.runtime.reflect; + +import com.sun.xml.internal.bind.v2.model.nav.Navigator; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Utils class. + * Has *package private* access to avoid inappropriate usage. + */ +/* package */ final class Utils { + + private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); + + /** + * static ReflectionNavigator field to avoid usage of reflection every time we use it. + */ + /* package */ static final Navigator REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java index aeef61462a7..92bd3b26167 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -58,6 +58,12 @@ import javax.xml.ws.soap.SOAPFaultException; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; +import java.lang.reflect.ReflectPermission; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.Permissions; +import java.security.PrivilegedAction; +import java.security.ProtectionDomain; import java.util.Iterator; import java.util.Map; import java.util.logging.Level; @@ -556,11 +562,40 @@ public abstract class SOAPFaultBuilder { // ignore } captureStackTrace = tmpVal; + JAXB_CONTEXT = createJAXBContext(); + } - try { - JAXB_CONTEXT = JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); - } catch (JAXBException e) { - throw new Error(e); // this must be a bug in our code + private static JAXBContext createJAXBContext() { + + // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages + if (isJDKRuntime()) { + Permissions permissions = new Permissions(); + permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault")); + permissions.add(new ReflectPermission("suppressAccessChecks")); + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public JAXBContext run() { + try { + return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); + } catch (JAXBException e) { + throw new Error(e); + } + } + }, + new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)}) + ); + + } else { + try { + return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); + } catch (JAXBException e) { + throw new Error(e); + } } } + + private static boolean isJDKRuntime() { + return SOAPFaultBuilder.class.getName().contains("internal"); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java index 63102d46791..a466b8458fa 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java @@ -45,7 +45,6 @@ import com.sun.xml.internal.ws.model.soap.SOAPBindingImpl; import com.sun.xml.internal.ws.resources.ModelerMessages; import com.sun.xml.internal.ws.resources.ServerMessages; import com.sun.xml.internal.ws.spi.db.BindingContext; -import com.sun.xml.internal.ws.spi.db.BindingHelper; import com.sun.xml.internal.ws.spi.db.TypeInfo; import com.sun.xml.internal.ws.spi.db.WrapperComposite; @@ -886,7 +885,7 @@ public class RuntimeModeler { //set the actual type argument of Holder in the TypeReference if (isHolder) { if(clazzType==Holder.class){ - clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); + clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); } } Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; @@ -1101,7 +1100,7 @@ public class RuntimeModeler { //set the actual type argument of Holder in the TypeReference if (isHolder) { if (clazzType==Holder.class) - clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); + clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); } Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; for (Annotation annotation : pannotations[pos]) { @@ -1347,7 +1346,7 @@ public class RuntimeModeler { //set the actual type argument of Holder in the TypeReference if (isHolder) { if (clazzType==Holder.class) - clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); + clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); } Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; @@ -1435,14 +1434,14 @@ public class RuntimeModeler { private Class getAsyncReturnType(Method method, Class returnType) { if(Response.class.isAssignableFrom(returnType)){ Type ret = method.getGenericReturnType(); - return BindingHelper.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]); + return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]); }else{ Type[] types = method.getGenericParameterTypes(); Class[] params = method.getParameterTypes(); int i = 0; for(Class cls : params){ if(AsyncHandler.class.isAssignableFrom(cls)){ - return BindingHelper.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]); + return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]); } i++; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java new file mode 100644 index 00000000000..2f776820197 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.model; + +import com.sun.xml.internal.bind.v2.model.nav.Navigator; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Utils class. + * + * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. + * + * Has *package private* access to avoid inappropriate usage. + */ +/* package */ final class Utils { + + private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); + + /** + * static ReflectionNavigator field to avoid usage of reflection every time we use it. + */ + /* package */ static final Navigator REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java index 8f3202e001e..d6be9a11c15 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java @@ -61,7 +61,7 @@ public class WrapperBeanGenerator { private static final AbstractWrapperBeanGenerator RUNTIME_GENERATOR = new RuntimeWrapperBeanGenerator(new RuntimeInlineAnnotationReader(), - Navigator.REFLECTION, FIELD_FACTORY); + (Navigator) Utils.REFLECTION_NAVIGATOR, FIELD_FACTORY); private static final class RuntimeWrapperBeanGenerator extends AbstractWrapperBeanGenerator { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java index accb20fc736..29ee58c4e88 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java @@ -136,10 +136,10 @@ public class BindingHelper { * @since 2.0 FCS */ public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) { - return Navigator.REFLECTION.getBaseClass(type,baseType); + return Utils.REFLECTION_NAVIGATOR.getBaseClass(type,baseType); } public static Class erasure(Type t) { - return Navigator.REFLECTION.erasure(t); + return (Class) Utils.REFLECTION_NAVIGATOR.erasure(t); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java index f1f3ba0f52a..03f0979f58b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java @@ -119,12 +119,11 @@ public final class TypeInfo { // if we are to reinstitute this check, check JAXB annotations only // assert annotations.length==0; // not designed to work with adapters. Type t = (genericType != null)? genericType : type; - Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class); + Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class); if(base==null) return this; // not a collection - return new TypeInfo(tagName, - Navigator.REFLECTION.getTypeArgument(base,0)); + return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0)); } public Map properties() { @@ -188,9 +187,9 @@ public final class TypeInfo { } // if (type instanceof Class && java.util.Collection.class.isAssignableFrom((Class)type)) { Type t = (genericType != null)? genericType : type; - Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class); + Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class); if ( base != null) { - return new TypeInfo(tagName, Navigator.REFLECTION.getTypeArgument(base,0), annotations); + return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0), annotations); } return null; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java new file mode 100644 index 00000000000..51de25d0492 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.spi.db; + +import com.sun.xml.internal.bind.v2.model.nav.Navigator; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Utils class. + * + * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. + * + * Has *package private* access to avoid inappropriate usage. + */ +/* package */ final class Utils { + + private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); + + /** + * static ReflectionNavigator field to avoid usage of reflection every time we use it. + */ + /* package */ static final Navigator REFLECTION_NAVIGATOR; + + static { // we statically initializing REFLECTION_NAVIGATOR property + Class refNav = null; + try { + refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); + //noinspection unchecked + Method getInstance = refNav.getDeclaredMethod("getInstance"); + getInstance.setAccessible(true); + //noinspection unchecked + REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new IllegalStateException("Can't find ReflectionNavigator class"); + } catch (InvocationTargetException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); + } catch (SecurityException e) { + LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); + throw e; + } + } + + /** + * private constructor to avoid util class instantiating + */ + private Utils() { + } +} diff --git a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java index b441bd0c15b..9189d21135c 100644 --- a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java +++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java @@ -59,6 +59,7 @@ public class TypeConstraintException extends java.lang.RuntimeException { */ private volatile Throwable linkedException; + static final long serialVersionUID = -3059799699420143848L; /** * Construct a TypeConstraintException with the specified detail message. The diff --git a/jdk/.hgtags b/jdk/.hgtags index fe25b3f0721..4cde2b895e7 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -243,3 +243,4 @@ fc4ac66aa657e09de5f8257c3174f240ed0cbaf7 jdk8-b117 e4499a6529e8c3e762ba86f45cdd774c92a8e7bc jdk8-b119 d31cd980e1da31fa496a359caaf1a165aeb5791a jdk8-b120 27b384262cba51dd0fe3e3534820189b46abc8cb jdk9-b00 +3b4ac8d1b76fc6bec9815f0ab714f15b552e4c7b jdk9-b01 diff --git a/jdk/make/CompileJavaClasses.gmk b/jdk/make/CompileJavaClasses.gmk index a06c41573c4..e68f86bede7 100644 --- a/jdk/make/CompileJavaClasses.gmk +++ b/jdk/make/CompileJavaClasses.gmk @@ -274,11 +274,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \ $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java - # JObjC.jar contains 1.5 byte-code...so skip it here :-( - # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src - # EXCLUDES += tests/java/com/apple/jobjc - - EXCLUDES += com/apple/jobjc endif # The security classes should not end up in the classes directory as that will prevent them @@ -354,44 +349,6 @@ $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin: ########################################################################################## -ifeq ($(OPENJDK_TARGET_OS), macosx) - # - # JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag. - # so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-( - # - $(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE, \ - JAVAC := $(JAVAC), \ - FLAGS := -source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS), \ - SERVER_DIR := $(SJAVAC_SERVER_DIR), \ - SERVER_JVM := $(SJAVAC_SERVER_JAVA))) - - $(eval $(call SetupJavaCompilation,BUILD_JOBJC, \ - SETUP := GENERATE_15BYTECODE, \ - DISABLE_SJAVAC := true, \ - SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ - $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \ - INCLUDES := com/apple/jobjc, \ - EXCLUDES := tests/java/com/apple/jobjc, \ - BIN := $(JDK_OUTPUTDIR)/jobjc_classes, \ - JAR := $(JDK_OUTPUTDIR)/lib/JObjC.jar, \ - JARINDEX := true)) - - $(BUILD_JOBJC): $(BUILD_JDK) - - $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS, \ - SETUP := GENERATE_JDKBYTECODE, \ - SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ - $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \ - INCLUDES := com/apple/jobjc, \ - EXCLUDES := tests/java/com/apple/jobjc, \ - BIN := $(JDK_OUTPUTDIR)/jobjc_classes_headers, \ - HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_jobjc)) - -$(BUILD_JOBJC_HEADERS): $(BUILD_JDK) - -endif ########################################################################################## diff --git a/jdk/make/CompileLaunchers.gmk b/jdk/make/CompileLaunchers.gmk index 6935da85bf0..e4cd5cef0ce 100644 --- a/jdk/make/CompileLaunchers.gmk +++ b/jdk/make/CompileLaunchers.gmk @@ -437,6 +437,7 @@ UNPACKEXE_LANG := C ifeq ($(OPENJDK_TARGET_OS), solaris) UNPACKEXE_LANG := C++ endif +UNPACKEXE_DEBUG_SYMBOLS := true # On windows, unpack200 is linked completely differently to all other # executables, using the compiler with the compiler arguments. # It's also linked incrementally, producing a .ilk file that needs to @@ -445,6 +446,9 @@ ifeq ($(OPENJDK_TARGET_OS), windows) BUILD_UNPACKEXE_LDEXE := $(CC) EXE_OUT_OPTION_save := $(EXE_OUT_OPTION) EXE_OUT_OPTION := -Fe + # With the current way unpack200 is built, debug symbols aren't supported + # anyway. + UNPACKEXE_DEBUG_SYMBOLS := endif $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \ SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \ @@ -474,7 +478,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \ -D "JDK_FNAME=unpack200.exe" \ -D "JDK_INTERNAL_NAME=unpack200" \ -D "JDK_FTYPE=0x1L", \ - DEBUG_SYMBOLS := true, \ + DEBUG_SYMBOLS := $(UNPACKEXE_DEBUG_SYMBOLS), \ MANIFEST := $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest)) ifeq ($(OPENJDK_TARGET_OS), windows) diff --git a/jdk/make/CreateJars.gmk b/jdk/make/CreateJars.gmk index 181481cf413..22f0b3b57f5 100644 --- a/jdk/make/CreateJars.gmk +++ b/jdk/make/CreateJars.gmk @@ -668,13 +668,6 @@ $(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar: $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar ########################################################################################## -ifeq ($(OPENJDK_TARGET_OS), macosx) - $(eval $(call SetupArchive,BUILD_JOBJC_JAR, , \ - SRCS := $(JDK_OUTPUTDIR)/jobjc_classes, \ - JAR := $(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \ - JARINDEX := true)) -endif - # This file is imported from hotspot in Import.gmk. Copying it into images/lib so that # all jars can be found in one place when creating images in Images.gmk. It needs to be # done here so that clean targets can be simple and accurate. diff --git a/jdk/make/GenerateSources.gmk b/jdk/make/GenerateSources.gmk index 7674fcd3744..ba443f7da52 100644 --- a/jdk/make/GenerateSources.gmk +++ b/jdk/make/GenerateSources.gmk @@ -85,11 +85,6 @@ GENSRC += $(GENSRC_CLDR) include gensrc/GensrcSwing.gmk GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS) -ifeq ($(OPENJDK_TARGET_OS), macosx) - include gensrc/GensrcJObjC.gmk - GENSRC += $(GENSRC_JOBJC) -endif - $(GENSRC): $(BUILD_TOOLS) all: $(GENSRC) diff --git a/jdk/make/Images.gmk b/jdk/make/Images.gmk index 6296de84bd5..4406a721b80 100644 --- a/jdk/make/Images.gmk +++ b/jdk/make/Images.gmk @@ -283,14 +283,13 @@ $(JDK_IMAGE_DIR)/jre/lib/applet: $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(MKDIR) -p $@ -# In the old build, JObjC.jar is not part of the meta-index $(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS) $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) - $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` + $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar $(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS) $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) - $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` + $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar $(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS) $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) diff --git a/jdk/make/Profiles.gmk b/jdk/make/Profiles.gmk index 03702e52915..dc4ea590fdb 100644 --- a/jdk/make/Profiles.gmk +++ b/jdk/make/Profiles.gmk @@ -105,10 +105,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows) ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar endif -ifeq ($(OPENJDK_TARGET_OS), macosx) - ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/JObjC.jar -endif - ifeq ($(PROFILE), profile_1) PROFILE_JARS := $(PROFILE_1_JARS) else ifeq ($(PROFILE), profile_2) diff --git a/jdk/make/Setup.gmk b/jdk/make/Setup.gmk index d2e706f6a1b..8a81f2b868b 100644 --- a/jdk/make/Setup.gmk +++ b/jdk/make/Setup.gmk @@ -27,7 +27,7 @@ DISABLE_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,- # To build with all warnings enabled, do the following: # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000" -JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,try,varargs -Werror +JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,overloads,try,varargs -Werror # Any java code executed during a JDK build to build other parts of the JDK must be # executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this diff --git a/jdk/make/data/mainmanifest/manifest.mf b/jdk/make/data/mainmanifest/manifest.mf index 25b7a8b7e9c..2ea4da616b6 100644 --- a/jdk/make/data/mainmanifest/manifest.mf +++ b/jdk/make/data/mainmanifest/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 Specification-Title: Java Platform API Specification -Specification-Version: 1.8 +Specification-Version: 1.9 Specification-Vendor: Oracle Corporation Implementation-Title: Java Runtime Environment Implementation-Version: @@RELEASE@@ diff --git a/jdk/make/gensrc/GensrcSwing.gmk b/jdk/make/gensrc/GensrcSwing.gmk index b3b41c96a6f..4854f473a5f 100644 --- a/jdk/make/gensrc/GensrcSwing.gmk +++ b/jdk/make/gensrc/GensrcSwing.gmk @@ -77,7 +77,7 @@ $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \ $(ECHO) Generating beaninfo $(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing $(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \ - -sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc" \ + -sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc" \ -doclet build.tools.swingbeaninfo.GenDocletBeanInfo \ -x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \ -t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \ diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk index ba10b6786aa..f5731bbed46 100644 --- a/jdk/make/lib/CoreLibraries.gmk +++ b/jdk/make/lib/CoreLibraries.gmk @@ -310,16 +310,6 @@ $(BUILD_LIBUNPACK): $(BUILD_LIBJAVA) BUILD_LIBRARIES += $(BUILD_LIBUNPACK) -ifeq ($(OPENJDK_TARGET_OS), windows) - $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(BUILD_LIBUNPACK) - $(ECHO) Copying $(@F) - $(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.map, $<) $@ - - $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(BUILD_LIBUNPACK) - $(ECHO) Copying $(@F) - $(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.pdb, $<) $@ -endif - ########################################################################################## BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin diff --git a/jdk/make/lib/NetworkingLibraries.gmk b/jdk/make/lib/NetworkingLibraries.gmk index 9f5173ece29..490845eec33 100644 --- a/jdk/make/lib/NetworkingLibraries.gmk +++ b/jdk/make/lib/NetworkingLibraries.gmk @@ -25,6 +25,7 @@ LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \ $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \ + $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/ \ $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \ $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi diff --git a/jdk/make/lib/PlatformLibraries.gmk b/jdk/make/lib/PlatformLibraries.gmk index 7684bddeece..f12aa186c40 100644 --- a/jdk/make/lib/PlatformLibraries.gmk +++ b/jdk/make/lib/PlatformLibraries.gmk @@ -136,64 +136,6 @@ endif ########################################################################################## -ifeq ($(OPENJDK_TARGET_OS), macosx) - - $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC32, \ - LIBRARY := JObjC, \ - OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \ - SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \ - LANG := C, \ - OPTIMIZATION := LOW, \ - CFLAGS := -fpascal-strings \ - -fobjc-gc \ - -gdwarf-2 \ - $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -m32, \ - LDFLAGS := $(LDFLAGS_JDKLIB) \ - -m32, \ - LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -framework JavaNativeFoundation \ - -lffi, \ - OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \ - DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) - - $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC64, \ - LIBRARY := JObjC, \ - OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \ - SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \ - LANG := C, \ - OPTIMIZATION := LOW, \ - CFLAGS := -fpascal-strings \ - -fobjc-gc \ - -gdwarf-2 \ - $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - , \ - LDFLAGS := -fpascal-strings \ - -fobjc-gc \ - -gdwarf-2 \ - $(LDFLAGS_JDKLIB) \ - $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -framework JavaNativeFoundation \ - -lffi, \ - OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \ - DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) - - $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX): $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64) - $(LIPO) -create -output $@ $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64) - - BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX) - -endif - -########################################################################################## - ifndef OPENJDK ifeq ($(OPENJDK_TARGET_OS), windows) diff --git a/jdk/make/mapfiles/libjava/mapfile-vers b/jdk/make/mapfiles/libjava/mapfile-vers index d2d8067395c..ea2276f6521 100644 --- a/jdk/make/mapfiles/libjava/mapfile-vers +++ b/jdk/make/mapfiles/libjava/mapfile-vers @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2014, 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 @@ -273,7 +273,6 @@ SUNWprivate_1.1 { Java_sun_misc_Version_getJdkSpecialVersion; Java_sun_misc_Version_getJvmVersionInfo; Java_sun_misc_Version_getJvmSpecialVersion; - Java_sun_misc_VM_getThreadStateValues; Java_sun_misc_VM_latestUserDefinedLoader; Java_sun_misc_VM_initialize; Java_sun_misc_VMSupport_initAgentProperties; diff --git a/jdk/make/mapfiles/libnet/mapfile-vers b/jdk/make/mapfiles/libnet/mapfile-vers index 98b6db30117..cdd98f8cce6 100644 --- a/jdk/make/mapfiles/libnet/mapfile-vers +++ b/jdk/make/mapfiles/libnet/mapfile-vers @@ -86,6 +86,8 @@ SUNWprivate_1.1 { Java_java_net_PlainSocketImpl_socketConnect; Java_java_net_PlainDatagramSocketImpl_getTimeToLive; Java_java_net_PlainDatagramSocketImpl_setTimeToLive; + Java_sun_net_PortConfig_getUpper0; + Java_sun_net_PortConfig_getLower0; Java_sun_net_dns_ResolverConfigurationImpl_localDomain0; Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0; Java_sun_net_sdp_SdpSupport_convert0; diff --git a/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m b/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m index bbe54aeb811..fcc0e0df23f 100644 --- a/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m +++ b/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m @@ -290,8 +290,8 @@ SplashEventLoop(Splash * splash) { SplashUnlock(splash); rc = poll(pfd, 1, timeout); SplashLock(splash); - if (splash->isVisible>0 && SplashTime() >= splash->time + - splash->frames[splash->currentFrame].delay) { + if (splash->isVisible > 0 && splash->currentFrame >= 0 && + SplashTime() >= splash->time + splash->frames[splash->currentFrame].delay) { SplashNextFrame(splash); SplashRedrawWindow(splash); } diff --git a/jdk/src/share/bin/java.c b/jdk/src/share/bin/java.c index 73c532676b3..b72fa0e6d26 100644 --- a/jdk/src/share/bin/java.c +++ b/jdk/src/share/bin/java.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2014, 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 @@ -345,6 +345,13 @@ JLI_Launch(int argc, char ** argv, /* main argc, argc */ } \ } while (JNI_FALSE) +#define CHECK_EXCEPTION_RETURN(CER_return_value) \ + do { \ + if ((*env)->ExceptionOccurred(env)) { \ + return CER_return_value; \ + } \ + } while (JNI_FALSE) + int JNICALL JavaMain(void * _args) { @@ -1233,8 +1240,9 @@ LoadMainClass(JNIEnv *env, int mode, char *name) "checkAndLoadMain", "(ZILjava/lang/String;)Ljava/lang/Class;")); - str = NewPlatformString(env, name); - result = (*env)->CallStaticObjectMethod(env, cls, mid, USE_STDERR, mode, str); + NULL_CHECK0(str = NewPlatformString(env, name)); + NULL_CHECK0(result = (*env)->CallStaticObjectMethod(env, cls, mid, + USE_STDERR, mode, str)); if (JLI_IsTraceLauncher()) { end = CounterGet(); @@ -1480,7 +1488,7 @@ ShowSettings(JNIEnv *env, char *optString) NULL_CHECK(cls); NULL_CHECK(showSettingsID = (*env)->GetStaticMethodID(env, cls, "showSettings", "(ZLjava/lang/String;JJJZ)V")); - joptString = (*env)->NewStringUTF(env, optString); + NULL_CHECK(joptString = (*env)->NewStringUTF(env, optString)); (*env)->CallStaticVoidMethod(env, cls, showSettingsID, USE_STDERR, joptString, @@ -1521,31 +1529,35 @@ PrintUsage(JNIEnv* env, jboolean doXUsage) NULL_CHECK(printHelp = (*env)->GetStaticMethodID(env, cls, "printHelpMessage", "(Z)V")); - jprogname = (*env)->NewStringUTF(env, _program_name); + NULL_CHECK(jprogname = (*env)->NewStringUTF(env, _program_name)); /* Initialize the usage message with the usual preamble */ (*env)->CallStaticVoidMethod(env, cls, initHelp, jprogname); + CHECK_EXCEPTION_RETURN(); /* Assemble the other variant part of the usage */ if ((knownVMs[0].flag == VM_KNOWN) || (knownVMs[0].flag == VM_IF_SERVER_CLASS)) { - vm1 = (*env)->NewStringUTF(env, knownVMs[0].name); - vm2 = (*env)->NewStringUTF(env, knownVMs[0].name+1); + NULL_CHECK(vm1 = (*env)->NewStringUTF(env, knownVMs[0].name)); + NULL_CHECK(vm2 = (*env)->NewStringUTF(env, knownVMs[0].name+1)); (*env)->CallStaticVoidMethod(env, cls, vmSelect, vm1, vm2); + CHECK_EXCEPTION_RETURN(); } for (i=1; iNewStringUTF(env, knownVMs[i].name); - vm2 = (*env)->NewStringUTF(env, knownVMs[i].name+1); + NULL_CHECK(vm1 = (*env)->NewStringUTF(env, knownVMs[i].name)); + NULL_CHECK(vm2 = (*env)->NewStringUTF(env, knownVMs[i].name+1)); (*env)->CallStaticVoidMethod(env, cls, vmSelect, vm1, vm2); + CHECK_EXCEPTION_RETURN(); } } for (i=1; iNewStringUTF(env, knownVMs[i].name); - vm2 = (*env)->NewStringUTF(env, knownVMs[i].alias+1); + NULL_CHECK(vm1 = (*env)->NewStringUTF(env, knownVMs[i].name)); + NULL_CHECK(vm2 = (*env)->NewStringUTF(env, knownVMs[i].alias+1)); (*env)->CallStaticVoidMethod(env, cls, vmSynonym, vm1, vm2); + CHECK_EXCEPTION_RETURN(); } } @@ -1558,8 +1570,9 @@ PrintUsage(JNIEnv* env, jboolean doXUsage) defaultVM = knownVMs[0].server_class+1; } - vm1 = (*env)->NewStringUTF(env, defaultVM); + NULL_CHECK(vm1 = (*env)->NewStringUTF(env, defaultVM)); (*env)->CallStaticVoidMethod(env, cls, vmErgo, isServerClassMachine, vm1); + CHECK_EXCEPTION_RETURN(); } /* Complete the usage message and print to stderr*/ diff --git a/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java index 4bbb8f4a201..84fbca4be39 100644 --- a/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java +++ b/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java @@ -29,6 +29,7 @@ import com.sun.beans.finder.ClassFinder; import java.beans.ExceptionListener; import java.io.IOException; +import java.io.StringReader; import java.lang.ref.Reference; import java.lang.ref.WeakReference; @@ -245,6 +246,14 @@ public final class DocumentHandler extends DefaultHandler { this.objects.add(object); } + /** + * Disables any external entities. + */ + @Override + public InputSource resolveEntity(String publicId, String systemId) { + return new InputSource(new StringReader("")); + } + /** * Prepares this handler to read objects from XML document. */ diff --git a/jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java b/jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java index 1820ee8cbc3..ef9098f24f7 100644 --- a/jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java +++ b/jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, 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 @@ -72,13 +72,17 @@ public final class TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi { throw new IllegalStateException( "TlsRsaPremasterSecretGenerator must be initialized"); } - if (random == null) { - random = new SecureRandom(); + byte[] b = spec.getEncodedSecret(); + if (b == null) { + if (random == null) { + random = new SecureRandom(); + } + b = new byte[48]; + random.nextBytes(b); + b[0] = (byte)spec.getMajorVersion(); + b[1] = (byte)spec.getMinorVersion(); } - byte[] b = new byte[48]; - random.nextBytes(b); - b[0] = (byte)spec.getMajorVersion(); - b[1] = (byte)spec.getMinorVersion(); + return new SecretKeySpec(b, "TlsRsaPremasterSecret"); } diff --git a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java index c7adccc6177..018ce2f089f 100644 --- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java +++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java @@ -27,17 +27,9 @@ package com.sun.jmx.snmp.agent; // java imports // +import com.sun.jmx.snmp.SnmpDefinitions; import java.io.Serializable; -import java.util.Hashtable; -import java.util.Enumeration; - -// jmx imports -// -import com.sun.jmx.snmp.SnmpValue; -import com.sun.jmx.snmp.SnmpVarBind; import com.sun.jmx.snmp.SnmpStatusException; -import com.sun.jmx.snmp.agent.SnmpMibOid; -import com.sun.jmx.snmp.agent.SnmpMibNode; /** * Represents a node in an SNMP MIB which corresponds to a table entry @@ -99,7 +91,9 @@ public abstract class SnmpMibEntry extends SnmpMibNode */ public void validateVarId(long arc, Object userData) throws SnmpStatusException { - if (isVariable(arc) == false) throw noSuchNameException; + if (isVariable(arc) == false) { + throw new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName); + } } /** diff --git a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java index 6050de77d70..83e2641e2fa 100644 --- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java +++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java @@ -108,8 +108,9 @@ public abstract class SnmpMibGroup extends SnmpMibOid */ public void validateVarId(long arc, Object userData) throws SnmpStatusException { - if (isVariable(arc) == false) - throw noSuchObjectException; + if (isVariable(arc) == false) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } } @@ -360,17 +361,20 @@ public abstract class SnmpMibGroup extends SnmpMibOid validateVarId(arc, data); // The trailing .0 is missing in the OID - if (depth+2 > length) - throw noSuchInstanceException; + if (depth+2 > length) { + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); + } // There are too many arcs left in the OID (there should remain // a single trailing .0) - if (depth+2 < length) - throw noSuchInstanceException; + if (depth+2 < length) { + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); + } // The last trailing arc is not .0 - if (oid[depth+1] != 0L) - throw noSuchInstanceException; + if (oid[depth+1] != 0L) { + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); + } // It's one of our variable, register this node. handlers.add(this,depth,varbind); @@ -389,12 +393,13 @@ public abstract class SnmpMibGroup extends SnmpMibOid int length = oid.length; SnmpMibNode node = null; - if (handlers == null) + if (handlers == null) { // This should be considered as a genErr, but we do not want to // abort the whole request, so we're going to throw // a noSuchObject... // - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } final Object data = handlers.getUserData(); final int pduVersion = handlers.getRequestPduVersion(); @@ -430,7 +435,7 @@ public abstract class SnmpMibGroup extends SnmpMibOid depth+1,handlers, checker); }catch(SnmpStatusException ex) { - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); } finally { checker.remove(depth); } @@ -455,7 +460,7 @@ public abstract class SnmpMibGroup extends SnmpMibOid try { checker.checkCurrentOid(); } catch(SnmpStatusException e) { - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); } finally { checker.remove(depth,2); } @@ -500,7 +505,7 @@ public abstract class SnmpMibGroup extends SnmpMibOid // The oid is not valid, we will throw an exception in order // to try with the next valid identifier... // - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); } catch (SnmpStatusException e) { // We didn't find anything at the given arc, so we're going diff --git a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java index f96e6c3c233..3af24a9cd4f 100644 --- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java +++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java @@ -155,7 +155,7 @@ public abstract class SnmpMibNode implements Serializable { long[] oid, int depth, SnmpRequestTree handlers) throws SnmpStatusException { - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); } /** @@ -183,7 +183,7 @@ public abstract class SnmpMibNode implements Serializable { long[] oid, int pos, int depth, SnmpRequestTree handlers, AcmChecker checker) throws SnmpStatusException { - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); } /** @@ -346,8 +346,9 @@ public abstract class SnmpMibNode implements Serializable { final int[] a = table; final int val= (int) value; - if (a == null) - throw noSuchObjectException; + if (a == null) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } int low= 0; int max= a.length; @@ -356,11 +357,13 @@ public abstract class SnmpMibNode implements Serializable { // Basic check // - if (max < 1) - throw noSuchObjectException; + if (max < 1) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } - if (a[max-1] <= val) - throw noSuchObjectException; + if (a[max-1] <= val) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } while (low <= max) { elmt= a[curr]; @@ -400,15 +403,4 @@ public abstract class SnmpMibNode implements Serializable { * Contains the list of variable identifiers. */ protected int[] varList; - - /** - * Contains a predefined exception that is often fired when an - * object is not found in the MIB. - */ - static final protected SnmpStatusException noSuchInstanceException = - new SnmpStatusException(SnmpStatusException.noSuchInstance); - static final protected SnmpStatusException noSuchObjectException = - new SnmpStatusException(SnmpStatusException.noSuchObject); - static final protected SnmpStatusException noSuchNameException = - new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName); } diff --git a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java index f3965bce637..38db9f021b1 100644 --- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java +++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java @@ -160,12 +160,10 @@ public class SnmpMibOid extends SnmpMibNode implements Serializable { if (depth > length) { // Nothing is left... the oid is not valid - throw noSuchObjectException; - + throw new SnmpStatusException(SnmpStatusException.noSuchObject); } else if (depth == length) { // The oid is not complete... - throw noSuchInstanceException; - + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); } else { // Some children variable or subobject is being querried // getChild() will raise an exception if no child is found. @@ -205,12 +203,13 @@ public class SnmpMibOid extends SnmpMibNode implements Serializable { final int length = oid.length; SnmpMibNode node = null; long[] result = null; - if (handlers == null) + if (handlers == null) { // This should be considered as a genErr, but we do not want to // abort the whole request, so we're going to throw // a noSuchObject... // - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } final Object data = handlers.getUserData(); final int pduVersion = handlers.getRequestPduVersion(); @@ -235,7 +234,7 @@ public class SnmpMibOid extends SnmpMibNode implements Serializable { // SnmpOid result = null; if (child == null) { // shouldn't happen - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); // validateVarId(index); // handlers.add(this,varbind,depth); // result = new SnmpOid(0); @@ -444,11 +443,13 @@ public class SnmpMibOid extends SnmpMibNode implements Serializable { // first we need to retrieve the identifier in the list of children // final int pos= getInsertAt(id); - if (pos >= nbChildren) - throw noSuchObjectException; + if (pos >= nbChildren) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } - if (varList[pos] != (int) id) - throw noSuchObjectException; + if (varList[pos] != (int) id) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } // Access the node // @@ -456,10 +457,11 @@ public class SnmpMibOid extends SnmpMibNode implements Serializable { try { child = children.elementAtNonSync(pos); } catch(ArrayIndexOutOfBoundsException e) { - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } + if (child == null) { + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); } - if (child == null) - throw noSuchInstanceException; return child; } diff --git a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java index 2edcbde2a40..0bad79cd5d9 100644 --- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java +++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java @@ -280,7 +280,7 @@ public abstract class SnmpMibTable extends SnmpMibNode SnmpVarBind var; for (Enumeration e= r.getElements(); e.hasMoreElements();) { var = e.nextElement(); - r.registerGetException(var,noSuchInstanceException); + r.registerGetException(var,new SnmpStatusException(SnmpStatusException.noSuchInstance)); } } @@ -1607,8 +1607,9 @@ public abstract class SnmpMibTable extends SnmpMibNode protected SnmpOid getNextOid(SnmpOid oid, Object userData) throws SnmpStatusException { - if (size == 0) - throw noSuchInstanceException; + if (size == 0) { + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); + } final SnmpOid resOid = oid; @@ -1619,7 +1620,7 @@ public abstract class SnmpMibTable extends SnmpMibNode if (last.equals(resOid)) { // Last element of the table ... // - throw noSuchInstanceException; + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); } // First find the oid. This will allow to speed up retrieval process @@ -1641,12 +1642,12 @@ public abstract class SnmpMibTable extends SnmpMibNode // XX last = (SnmpOid) oids.elementAt(newPos); last = tableoids[newPos]; } catch(ArrayIndexOutOfBoundsException e) { - throw noSuchInstanceException; + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); } } else { // We are dealing with the last element of the table .. // - throw noSuchInstanceException; + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); } @@ -1668,8 +1669,9 @@ public abstract class SnmpMibTable extends SnmpMibNode */ protected SnmpOid getNextOid(Object userData) throws SnmpStatusException { - if (size == 0) - throw noSuchInstanceException; + if (size == 0) { + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); + } // XX return (SnmpOid) oids.firstElement(); return tableoids[0]; } @@ -1875,10 +1877,10 @@ public abstract class SnmpMibTable extends SnmpMibNode // not support creation. // We know that the entry does not exists if (isentry == false). if (!hasEntry) { - if (!handlers.isCreationAllowed()) + if (!handlers.isCreationAllowed()) { // we're not doing a set - throw noSuchInstanceException; - else if (!isCreationEnabled()) + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); + } else if (!isCreationEnabled()) // we're doing a set but creation is disabled. throw new SnmpStatusException(SnmpStatusException.snmpRspNoAccess); @@ -1922,12 +1924,13 @@ public abstract class SnmpMibTable extends SnmpMibNode int length = oid.length; - if (handlers == null) - // This should be considered as a genErr, but we do not want to - // abort the whole request, so we're going to throw - // a noSuchObject... - // - throw noSuchObjectException; + if (handlers == null) { + // This should be considered as a genErr, but we do not want to + // abort the whole request, so we're going to throw + // a noSuchObject... + // + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } final Object data = handlers.getUserData(); final int pduVersion = handlers.getRequestPduVersion(); @@ -1961,7 +1964,7 @@ public abstract class SnmpMibTable extends SnmpMibNode // so we won't find the next element in this table... (any // element in this table will have a smaller OID) // - throw noSuchObjectException; + throw new SnmpStatusException(SnmpStatusException.noSuchObject); } else if (oid[pos] < nodeId) { // we must return the first leaf under the first columnar // object, so we are back to our first case where pos was @@ -2051,8 +2054,9 @@ public abstract class SnmpMibTable extends SnmpMibNode // in tables can't be properly supported (all rows // must have the same holes) // - if (skipEntryVariable(entryoid,var,data,pduVersion)) - throw noSuchObjectException; + if (skipEntryVariable(entryoid,var,data,pduVersion)) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } } catch(SnmpStatusException se) { entryoid = getNextOid(data); var = getNextVarEntryId(entryoid,var,data,pduVersion); @@ -2085,8 +2089,9 @@ public abstract class SnmpMibTable extends SnmpMibNode // So we throw the exception. // => will skip to next node in the MIB tree. // - if (entryoid == null || var == -1 ) throw noSuchObjectException; - + if (entryoid == null || var == -1 ) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } // So here we know both the row (entryoid) and the column (var) // @@ -2097,8 +2102,9 @@ public abstract class SnmpMibTable extends SnmpMibNode // for this specific entry, it is not readable for any // other entry => skip to next column. // - if (!isReadableEntryId(entryoid,var,data)) - throw noSuchObjectException; + if (!isReadableEntryId(entryoid,var,data)) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } // Prepare the result and the ACM checker. // @@ -2161,8 +2167,9 @@ public abstract class SnmpMibTable extends SnmpMibNode // No need to continue, we throw an exception. // => will skip to next node in the MIB tree. // - if (entryoid == null || var == -1 ) - throw noSuchObjectException; + if (entryoid == null || var == -1 ) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } } } @@ -2182,14 +2189,15 @@ public abstract class SnmpMibTable extends SnmpMibNode // Control the length of the oid // - if (pos +2 >= length) - throw noSuchInstanceException; + if (pos +2 >= length) { + throw new SnmpStatusException(SnmpStatusException.noSuchInstance); + } // Check that the entry identifier is specified // - if (oid[pos] != nodeId) - throw noSuchObjectException; - + if (oid[pos] != nodeId) { + throw new SnmpStatusException(SnmpStatusException.noSuchObject); + } } // ---------------------------------------------------------------------- diff --git a/jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java b/jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java index 3fea8fe08ca..442f4966c40 100644 --- a/jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java +++ b/jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java @@ -1146,7 +1146,4 @@ class SnmpRequestHandler extends ClientHandler implements SnmpDefinitions { static final private String InterruptSysCallMsg = "Interrupted system call"; - - static final private SnmpStatusException noSuchNameException = - new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName) ; } diff --git a/jdk/src/share/classes/com/sun/management/VMOption.java b/jdk/src/share/classes/com/sun/management/VMOption.java index d79bc5b4d67..fb6d8a6f469 100644 --- a/jdk/src/share/classes/com/sun/management/VMOption.java +++ b/jdk/src/share/classes/com/sun/management/VMOption.java @@ -96,6 +96,11 @@ public class VMOption { * The VM option was set via the VM ergonomic support. */ ERGONOMIC, + /** + * The VM option was set using the attach framework. + * @since 1.9 + */ + ATTACH_ON_DEMAND, /** * The VM option was set via some other mechanism. */ diff --git a/jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java b/jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java index 224367e2fde..0fe4864d967 100644 --- a/jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java +++ b/jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java @@ -56,9 +56,12 @@ public final class FactoryEnumeration { * references so as not to prevent GC of the class loader. Each * weak reference is tagged with the factory's class name so the * class can be reloaded if the reference is cleared. - + * * @param factories A non-null list * @param loader The class loader of the list's contents + * + * This internal method is used with Thread Context Class Loader (TCCL), + * please don't expose this method as public. */ FactoryEnumeration(List> factories, ClassLoader loader) { @@ -79,7 +82,8 @@ public final class FactoryEnumeration { try { if (answer == null) { // reload class if weak ref cleared - answer = Class.forName(className, true, loader); + Class cls = Class.forName(className, true, loader); + answer = cls; } // Instantiate Class to get factory answer = ((Class) answer).newInstance(); diff --git a/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java b/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java index 6ea764b255c..bf4586e7ebc 100644 --- a/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java +++ b/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java @@ -53,21 +53,24 @@ import javax.naming.*; final class VersionHelper12 extends VersionHelper { - private boolean getSystemPropsFailed = false; - - VersionHelper12() {} // Disallow external from creating one of these. + // Disallow external from creating one of these. + VersionHelper12() { + } public Class loadClass(String className) throws ClassNotFoundException { - ClassLoader cl = getContextClassLoader(); - return Class.forName(className, true, cl); + return loadClass(className, getContextClassLoader()); } /** - * Package private. - */ + * Package private. + * + * This internal method is used with Thread Context Class Loader (TCCL), + * please don't expose this method as public. + */ Class loadClass(String className, ClassLoader cl) throws ClassNotFoundException { - return Class.forName(className, true, cl); + Class cls = Class.forName(className, true, cl); + return cls; } /** @@ -75,13 +78,13 @@ final class VersionHelper12 extends VersionHelper { * @param codebase A non-null, space-separated list of URL strings. */ public Class loadClass(String className, String codebase) - throws ClassNotFoundException, MalformedURLException { - ClassLoader cl; + throws ClassNotFoundException, MalformedURLException { ClassLoader parent = getContextClassLoader(); - cl = URLClassLoader.newInstance(getUrlArray(codebase), parent); + ClassLoader cl = + URLClassLoader.newInstance(getUrlArray(codebase), parent); - return Class.forName(className, true, cl); + return loadClass(className, cl); } String getJndiProperty(final int i) { @@ -99,16 +102,12 @@ final class VersionHelper12 extends VersionHelper { } String[] getJndiProperties() { - if (getSystemPropsFailed) { - return null; // after one failure, don't bother trying again - } Properties sysProps = AccessController.doPrivileged( new PrivilegedAction() { public Properties run() { try { return System.getProperties(); } catch (SecurityException e) { - getSystemPropsFailed = true; return null; } } @@ -173,17 +172,32 @@ final class VersionHelper12 extends VersionHelper { return new InputStreamEnumeration(urls); } + /** + * Package private. + * + * This internal method returns Thread Context Class Loader (TCCL), + * if null, returns the system Class Loader. + * + * Please don't expose this method as public. + */ ClassLoader getContextClassLoader() { + return AccessController.doPrivileged( new PrivilegedAction() { public ClassLoader run() { - return Thread.currentThread().getContextClassLoader(); + ClassLoader loader = + Thread.currentThread().getContextClassLoader(); + if (loader == null) { + // Don't use bootstrap class loader directly! + loader = ClassLoader.getSystemClassLoader(); + } + + return loader; } } ); } - /** * Given an enumeration of URLs, an instance of this class represents * an enumeration of their InputStreams. Each operation on the URL diff --git a/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java b/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java index 52709b07e9d..130390c260b 100644 --- a/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java +++ b/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java @@ -276,6 +276,11 @@ public abstract class SctpChannel * * @throws IOException * If some other I/O error occurs + * + * @throws SecurityException + * If a security manager has been installed and its + * {@link SecurityManager#checkListen checkListen} method denies + * the operation */ public abstract SctpChannel bind(SocketAddress local) throws IOException; diff --git a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java index 4d1fcbc0e6d..4a1e5f63bfc 100644 --- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java +++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java @@ -382,7 +382,8 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { } else if (!isVisible(xmlns)) { //There is a definition but the xmlns is not selected by the xpath. //then xmlns="" - n = ns.addMappingAndRender(XMLNS, "", nullNode); + n = ns.addMappingAndRender( + XMLNS, "", getNullNode(xmlns.getOwnerDocument())); } //output the xmlns def if needed. if (n != null) { diff --git a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java index 3af83dd11f1..ccff9fa7a49 100644 --- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java +++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java @@ -327,7 +327,8 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { } else if (!isVisible(xmlns)) { //There is a definition but the xmlns is not selected by the xpath. //then xmlns="" - n = ns.addMappingAndRender(XMLNS, "", nullNode); + n = ns.addMappingAndRender( + XMLNS, "", getNullNode(xmlns.getOwnerDocument())); } //output the xmlns def if needed. if (n != null) { diff --git a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java index b8c869c83f7..444269880ef 100644 --- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java +++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java @@ -292,7 +292,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { if (xmlns != null && !isVisible(xmlns)) { // There is a definition but the xmlns is not selected by the // xpath. then xmlns="" - ns.addMapping(XMLNS, "", nullNode); + ns.addMapping(XMLNS, "", getNullNode(xmlns.getOwnerDocument())); } String prefix = null; diff --git a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java index 4c9f277f65e..2e914ac5823 100644 --- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java +++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java @@ -34,8 +34,6 @@ import java.util.ListIterator; import java.util.Map; import java.util.Set; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException; @@ -49,6 +47,7 @@ import com.sun.org.apache.xml.internal.security.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Comment; import org.w3c.dom.Element; +import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.ProcessingInstruction; @@ -64,8 +63,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { public static final String XMLNS = "xmlns"; protected static final AttrCompare COMPARE = new AttrCompare(); - protected static final Attr nullNode; + // Make sure you clone the following mutable arrays before passing to + // potentially untrusted objects such as OutputStreams. private static final byte[] END_PI = {'?','>'}; private static final byte[] BEGIN_PI = {'<','?'}; private static final byte[] END_COMM = {'-','-','>'}; @@ -78,27 +78,17 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { private static final byte[] LT = {'&','l','t',';'}; private static final byte[] END_TAG = {'<','/'}; private static final byte[] AMP = {'&','a','m','p',';'}; - private static final byte[] equalsStr = {'=','\"'}; + private static final byte[] EQUALS_STR = {'=','\"'}; protected static final int NODE_BEFORE_DOCUMENT_ELEMENT = -1; protected static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT = 0; protected static final int NODE_AFTER_DOCUMENT_ELEMENT = 1; - static { - // The null xmlns definition. - try { - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - nullNode = documentBuilder.newDocument().createAttributeNS(Constants.NamespaceSpecNS, XMLNS); - nullNode.setValue(""); - } catch (Exception e) { - throw new RuntimeException("Unable to create nullNode: " + e); - } - } - private List nodeFilter; private boolean includeComments; private Set xpathNodeSet; + /** * The node to be skipped/excluded from the DOM tree * in subtree canonicalizations. @@ -106,6 +96,11 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { private Node excludeNode; private OutputStream writer = new ByteArrayOutputStream(); + /** + * The null xmlns definition. + */ + private Attr nullNode; + /** * Constructor CanonicalizerBase * @@ -310,7 +305,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { writer.write('>'); sibling = currentNode.getFirstChild(); if (sibling == null) { - writer.write(END_TAG); + writer.write(END_TAG.clone()); UtfHelpper.writeStringToUtf8(name, writer); writer.write('>'); //We finished with this level, pop to the previous definitions. @@ -328,7 +323,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { break; } while (sibling == null && parentNode != null) { - writer.write(END_TAG); + writer.write(END_TAG.clone()); UtfHelpper.writeByte(((Element)parentNode).getTagName(), writer, cache); writer.write('>'); //We finished with this level, pop to the previous definitions. @@ -488,7 +483,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { if (sibling == null) { if (currentNodeIsVisible) { - writer.write(END_TAG); + writer.write(END_TAG.clone()); UtfHelpper.writeByte(name, writer, cache); writer.write('>'); //We finished with this level, pop to the previous definitions. @@ -510,7 +505,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { } while (sibling == null && parentNode != null) { if (isVisible(parentNode)) { - writer.write(END_TAG); + writer.write(END_TAG.clone()); UtfHelpper.writeByte(((Element)parentNode).getTagName(), writer, cache); writer.write('>'); //We finished with this level, pop to the previous definitions. @@ -641,8 +636,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { parents.clear(); Attr nsprefix; if (((nsprefix = ns.getMappingWithoutRendered(XMLNS)) != null) - && "".equals(nsprefix.getValue())) { - ns.addMappingAndRender(XMLNS, "", nullNode); + && "".equals(nsprefix.getValue())) { + ns.addMappingAndRender( + XMLNS, "", getNullNode(nsprefix.getOwnerDocument())); } } @@ -696,7 +692,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ) throws IOException { writer.write(' '); UtfHelpper.writeByte(name, writer, cache); - writer.write(equalsStr); + writer.write(EQUALS_STR.clone()); byte[] toWrite; final int length = value.length(); int i = 0; @@ -706,27 +702,27 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { switch (c) { case '&' : - toWrite = AMP; + toWrite = AMP.clone(); break; case '<' : - toWrite = LT; + toWrite = LT.clone(); break; case '"' : - toWrite = QUOT; + toWrite = QUOT.clone(); break; case 0x09 : // '\t' - toWrite = X9; + toWrite = X9.clone(); break; case 0x0A : // '\n' - toWrite = XA; + toWrite = XA.clone(); break; case 0x0D : // '\r' - toWrite = XD; + toWrite = XD.clone(); break; default : @@ -756,7 +752,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { if (position == NODE_AFTER_DOCUMENT_ELEMENT) { writer.write('\n'); } - writer.write(BEGIN_PI); + writer.write(BEGIN_PI.clone()); final String target = currentPI.getTarget(); int length = target.length(); @@ -764,7 +760,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { for (int i = 0; i < length; i++) { char c = target.charAt(i); if (c == 0x0D) { - writer.write(XD); + writer.write(XD.clone()); } else { if (c < 0x80) { writer.write(c); @@ -784,14 +780,14 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { for (int i = 0; i < length; i++) { char c = data.charAt(i); if (c == 0x0D) { - writer.write(XD); + writer.write(XD.clone()); } else { UtfHelpper.writeCharToUtf8(c, writer); } } } - writer.write(END_PI); + writer.write(END_PI.clone()); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { writer.write('\n'); } @@ -810,7 +806,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { if (position == NODE_AFTER_DOCUMENT_ELEMENT) { writer.write('\n'); } - writer.write(BEGIN_COMM); + writer.write(BEGIN_COMM.clone()); final String data = currentComment.getData(); final int length = data.length(); @@ -818,7 +814,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { for (int i = 0; i < length; i++) { char c = data.charAt(i); if (c == 0x0D) { - writer.write(XD); + writer.write(XD.clone()); } else { if (c < 0x80) { writer.write(c); @@ -828,7 +824,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { } } - writer.write(END_COMM); + writer.write(END_COMM.clone()); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { writer.write('\n'); } @@ -852,19 +848,19 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { switch (c) { case '&' : - toWrite = AMP; + toWrite = AMP.clone(); break; case '<' : - toWrite = LT; + toWrite = LT.clone(); break; case '>' : - toWrite = GT; + toWrite = GT.clone(); break; case 0xD : - toWrite = XD; + toWrite = XD.clone(); break; default : @@ -879,4 +875,18 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { } } + // The null xmlns definition. + protected Attr getNullNode(Document ownerDocument) { + if (nullNode == null) { + try { + nullNode = ownerDocument.createAttributeNS( + Constants.NamespaceSpecNS, XMLNS); + nullNode.setValue(""); + } catch (Exception e) { + throw new RuntimeException("Unable to create nullNode: " + e); + } + } + return nullNode; + } + } diff --git a/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java b/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java index 5c30d2712f4..31d714187aa 100644 --- a/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java +++ b/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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 @@ -660,7 +660,7 @@ public class XmlReaderContentHandler extends DefaultHandler { //Added the handling for Class tags to take care of maps //Makes an entry into the map upon end of class tag try{ - typeMap.put(Key_map,Class.forName(Value_map)); + typeMap.put(Key_map,sun.reflect.misc.ReflectUtil.forName(Value_map)); }catch(ClassNotFoundException ex) { throw new SAXException(MessageFormat.format(resBundle.handleGetObject("xmlrch.errmap").toString(), ex.getMessage())); diff --git a/jdk/src/share/classes/java/awt/AWTEventMulticaster.java b/jdk/src/share/classes/java/awt/AWTEventMulticaster.java index 4fc6d52c8c7..de51ab1c0b4 100644 --- a/jdk/src/share/classes/java/awt/AWTEventMulticaster.java +++ b/jdk/src/share/classes/java/awt/AWTEventMulticaster.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2014, 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 @@ -609,6 +609,7 @@ public class AWTEventMulticaster implements * @param b window-state-listener-b * @since 1.4 */ + @SuppressWarnings("overloads") public static WindowStateListener add(WindowStateListener a, WindowStateListener b) { return (WindowStateListener)addInternal(a, b); @@ -632,6 +633,7 @@ public class AWTEventMulticaster implements * @param a action-listener-a * @param b action-listener-b */ + @SuppressWarnings("overloads") public static ActionListener add(ActionListener a, ActionListener b) { return (ActionListener)addInternal(a, b); } @@ -642,6 +644,7 @@ public class AWTEventMulticaster implements * @param a item-listener-a * @param b item-listener-b */ + @SuppressWarnings("overloads") public static ItemListener add(ItemListener a, ItemListener b) { return (ItemListener)addInternal(a, b); } @@ -652,9 +655,11 @@ public class AWTEventMulticaster implements * @param a adjustment-listener-a * @param b adjustment-listener-b */ + @SuppressWarnings("overloads") public static AdjustmentListener add(AdjustmentListener a, AdjustmentListener b) { return (AdjustmentListener)addInternal(a, b); } + @SuppressWarnings("overloads") public static TextListener add(TextListener a, TextListener b) { return (TextListener)addInternal(a, b); } @@ -676,6 +681,7 @@ public class AWTEventMulticaster implements * @param b hierarchy-listener-b * @since 1.3 */ + @SuppressWarnings("overloads") public static HierarchyListener add(HierarchyListener a, HierarchyListener b) { return (HierarchyListener)addInternal(a, b); } @@ -698,6 +704,7 @@ public class AWTEventMulticaster implements * @param b mouse-wheel-listener-b * @since 1.4 */ + @SuppressWarnings("overloads") public static MouseWheelListener add(MouseWheelListener a, MouseWheelListener b) { return (MouseWheelListener)addInternal(a, b); @@ -780,6 +787,7 @@ public class AWTEventMulticaster implements * @param oldl the window-state-listener being removed * @since 1.4 */ + @SuppressWarnings("overloads") public static WindowStateListener remove(WindowStateListener l, WindowStateListener oldl) { return (WindowStateListener) removeInternal(l, oldl); @@ -803,6 +811,7 @@ public class AWTEventMulticaster implements * @param l action-listener-l * @param oldl the action-listener being removed */ + @SuppressWarnings("overloads") public static ActionListener remove(ActionListener l, ActionListener oldl) { return (ActionListener) removeInternal(l, oldl); } @@ -813,6 +822,7 @@ public class AWTEventMulticaster implements * @param l item-listener-l * @param oldl the item-listener being removed */ + @SuppressWarnings("overloads") public static ItemListener remove(ItemListener l, ItemListener oldl) { return (ItemListener) removeInternal(l, oldl); } @@ -823,9 +833,11 @@ public class AWTEventMulticaster implements * @param l adjustment-listener-l * @param oldl the adjustment-listener being removed */ + @SuppressWarnings("overloads") public static AdjustmentListener remove(AdjustmentListener l, AdjustmentListener oldl) { return (AdjustmentListener) removeInternal(l, oldl); } + @SuppressWarnings("overloads") public static TextListener remove(TextListener l, TextListener oldl) { return (TextListener) removeInternal(l, oldl); } @@ -847,6 +859,7 @@ public class AWTEventMulticaster implements * @param oldl the hierarchy-listener being removed * @since 1.3 */ + @SuppressWarnings("overloads") public static HierarchyListener remove(HierarchyListener l, HierarchyListener oldl) { return (HierarchyListener) removeInternal(l, oldl); } @@ -870,6 +883,7 @@ public class AWTEventMulticaster implements * @param oldl the mouse-wheel-listener being removed * @since 1.4 */ + @SuppressWarnings("overloads") public static MouseWheelListener remove(MouseWheelListener l, MouseWheelListener oldl) { return (MouseWheelListener) removeInternal(l, oldl); diff --git a/jdk/src/share/classes/java/awt/Graphics2D.java b/jdk/src/share/classes/java/awt/Graphics2D.java index 6c6c1abd830..b535b6c0364 100644 --- a/jdk/src/share/classes/java/awt/Graphics2D.java +++ b/jdk/src/share/classes/java/awt/Graphics2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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,7 +44,7 @@ import java.util.Map; * control over geometry, coordinate transformations, color management, * and text layout. This is the fundamental class for rendering * 2-dimensional shapes, text and images on the Java(tm) platform. - *

+ * *

Coordinate Spaces

* All coordinates passed to a Graphics2D object are specified * in a device-independent coordinate system called User Space, which is @@ -229,7 +229,7 @@ import java.util.Map; * *

Default Rendering Attributes

* The default values for the Graphics2D rendering attributes are: - *
+ *
*
Paint *
The color of the Component. *
Font @@ -351,7 +351,7 @@ import java.util.Map; * fill(new Rectangle(x, y, w, h)); * * is called. - *

+ * *

  • * Similarly, for draw operations, including drawLine, * drawRect, drawRoundRect, @@ -363,7 +363,7 @@ import java.util.Map; * draw(new Rectangle(x, y, w, h)); * * is called. - *

    + * *

  • * The draw3DRect and fill3DRect methods were * implemented in terms of the drawLine and diff --git a/jdk/src/share/classes/java/awt/MediaTracker.java b/jdk/src/share/classes/java/awt/MediaTracker.java index ec76ce4ce9f..49797b778b6 100644 --- a/jdk/src/share/classes/java/awt/MediaTracker.java +++ b/jdk/src/share/classes/java/awt/MediaTracker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, 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 @@ -65,7 +65,7 @@ import java.awt.image.ImageObserver; * *

    * Here is an example of using MediaTracker: - *

    + * *


    {@code
      * import java.applet.Applet;
      * import java.awt.Color;
    diff --git a/jdk/src/share/classes/java/awt/Toolkit.java b/jdk/src/share/classes/java/awt/Toolkit.java
    index 13ae460475f..a796e01bb26 100644
    --- a/jdk/src/share/classes/java/awt/Toolkit.java
    +++ b/jdk/src/share/classes/java/awt/Toolkit.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1995, 2014, 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
    @@ -2299,6 +2299,7 @@ public abstract class Toolkit {
                 super(a, b);
             }
     
    +        @SuppressWarnings("overloads")
             static AWTEventListener add(AWTEventListener a,
                                         AWTEventListener b) {
                 if (a == null)  return b;
    @@ -2306,6 +2307,7 @@ public abstract class Toolkit {
                 return new ToolkitEventMulticaster(a, b);
             }
     
    +        @SuppressWarnings("overloads")
             static AWTEventListener remove(AWTEventListener l,
                                            AWTEventListener oldl) {
                 return (AWTEventListener) removeInternal(l, oldl);
    diff --git a/jdk/src/share/classes/java/awt/datatransfer/Clipboard.java b/jdk/src/share/classes/java/awt/datatransfer/Clipboard.java
    index cce9c74c192..d1926960325 100644
    --- a/jdk/src/share/classes/java/awt/datatransfer/Clipboard.java
    +++ b/jdk/src/share/classes/java/awt/datatransfer/Clipboard.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1996, 2014, 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
    @@ -54,7 +54,13 @@ public class Clipboard {
     
         String name;
     
    +    /**
    +     * The owner of the clipboard.
    +     */
         protected ClipboardOwner owner;
    +    /**
    +     * Contents of the clipboard.
    +     */
         protected Transferable contents;
     
         /**
    @@ -75,7 +81,7 @@ public class Clipboard {
     
         /**
          * Creates a clipboard object.
    -     *
    +     * @param name for the clipboard
          * @see java.awt.Toolkit#getSystemClipboard
          */
         public Clipboard(String name) {
    @@ -84,6 +90,7 @@ public class Clipboard {
     
         /**
          * Returns the name of this clipboard object.
    +     * @return the name of this clipboard object
          *
          * @see java.awt.Toolkit#getSystemClipboard
          */
    diff --git a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java
    index 90789edc97c..cbf172ba05c 100644
    --- a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java
    +++ b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1996, 2014, 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
    @@ -1184,16 +1184,24 @@ public class DataFlavor implements Externalizable, Cloneable {
     
        /**
         * Does the DataFlavor represent a serialized object?
    +    * @return whether or not a serialized object is represented
         */
    -
         public boolean isMimeTypeSerializedObject() {
             return isMimeTypeEqual(javaSerializedObjectMimeType);
         }
     
    +    /**
    +     * Returns the default representation class.
    +     * @return the default representation class
    +     */
         public final Class getDefaultRepresentationClass() {
             return ioInputStreamClass;
         }
     
    +    /**
    +     * Returns the name of the default representation class.
    +     * @return the name of the default representation class
    +     */
         public final String getDefaultRepresentationClassAsString() {
             return getDefaultRepresentationClass().getName();
         }
    @@ -1201,8 +1209,9 @@ public class DataFlavor implements Externalizable, Cloneable {
        /**
         * Does the DataFlavor represent a
         * java.io.InputStream?
    +    * @return whether or not this {@code DataFlavor} represent a
    +    * {@code java.io.InputStream}
         */
    -
         public boolean isRepresentationClassInputStream() {
             return ioInputStreamClass.isAssignableFrom(representationClass);
         }
    @@ -1211,6 +1220,9 @@ public class DataFlavor implements Externalizable, Cloneable {
          * Returns whether the representation class for this
          * DataFlavor is java.io.Reader or a subclass
          * thereof.
    +     * @return whether or not the representation class for this
    +     * {@code DataFlavor} is {@code java.io.Reader} or a subclass
    +     * thereof
          *
          * @since 1.4
          */
    @@ -1222,6 +1234,9 @@ public class DataFlavor implements Externalizable, Cloneable {
          * Returns whether the representation class for this
          * DataFlavor is java.nio.CharBuffer or a
          * subclass thereof.
    +     * @return whether or not the representation class for this
    +     * {@code DataFlavor} is {@code java.nio.CharBuffer} or a subclass
    +     * thereof
          *
          * @since 1.4
          */
    @@ -1233,6 +1248,9 @@ public class DataFlavor implements Externalizable, Cloneable {
          * Returns whether the representation class for this
          * DataFlavor is java.nio.ByteBuffer or a
          * subclass thereof.
    +     * @return whether or not the representation class for this
    +     * {@code DataFlavor} is {@code java.nio.ByteBuffer} or a subclass
    +     * thereof
          *
          * @since 1.4
          */
    @@ -1408,6 +1426,9 @@ public class DataFlavor implements Externalizable, Cloneable {
         *
         * This method is never invoked by this implementation from 1.1 onwards.
         *
    +    * @param parameterName the parameter name
    +    * @param parameterValue the parameter value
    +    * @return the parameter value
         * @deprecated
         */
         @Deprecated
    @@ -1424,6 +1445,8 @@ public class DataFlavor implements Externalizable, Cloneable {
         *
         * This method is never invoked by this implementation from 1.1 onwards.
         *
    +    * @param mimeType the mime type
    +    * @return the mime type
         * @deprecated
         */
         @Deprecated
    diff --git a/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java b/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java
    index 6036bd821da..c65f04fbaa7 100644
    --- a/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java
    +++ b/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java
    @@ -57,6 +57,7 @@ public class StringSelection implements Transferable, ClipboardOwner {
         /**
          * Creates a Transferable capable of transferring
          * the specified String.
    +     * @param data the string to be transferred
          */
         public StringSelection(String data) {
             this.data = data;
    diff --git a/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java b/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java
    index 86713ad3c5a..8c94ca5b15f 100644
    --- a/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java
    +++ b/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1997, 2014, 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
    @@ -181,6 +181,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
     
         /**
          * Returns the default FlavorMap for this thread's ClassLoader.
    +     * @return the default FlavorMap for this thread's ClassLoader
          */
         public static FlavorMap getDefaultFlavorMap() {
             ClassLoader contextClassLoader =
    @@ -1309,6 +1310,8 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
          * @param nat the String to decode
          * @return the decoded DataFlavor, or null if
          *         nat is not an encoded String native
    +     * @throws ClassNotFoundException if the class of the data flavor
    +     * is not loaded
          */
         public static DataFlavor decodeDataFlavor(String nat)
             throws ClassNotFoundException
    diff --git a/jdk/src/share/classes/java/awt/datatransfer/Transferable.java b/jdk/src/share/classes/java/awt/datatransfer/Transferable.java
    index 3c5219ddb1d..3ba437748ab 100644
    --- a/jdk/src/share/classes/java/awt/datatransfer/Transferable.java
    +++ b/jdk/src/share/classes/java/awt/datatransfer/Transferable.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 1996, 2014, 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
    @@ -62,6 +62,7 @@ public interface Transferable {
          * of the object returned is defined by the representation class of the flavor.
          *
          * @param flavor the requested flavor for the data
    +     * @return an object which represents the data to be transferred
          * @see DataFlavor#getRepresentationClass
          * @exception IOException                if the data is no longer available
          *              in the requested flavor.
    diff --git a/jdk/src/share/classes/java/awt/dnd/DnDEventMulticaster.java b/jdk/src/share/classes/java/awt/dnd/DnDEventMulticaster.java
    index a9d9e6587ff..f4e059f9e00 100644
    --- a/jdk/src/share/classes/java/awt/dnd/DnDEventMulticaster.java
    +++ b/jdk/src/share/classes/java/awt/dnd/DnDEventMulticaster.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2001, 2014, 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
    @@ -141,6 +141,7 @@ class DnDEventMulticaster extends AWTEventMulticaster
          * @param a drag-source-motion-listener-a
          * @param b drag-source-motion-listener-b
          */
    +    @SuppressWarnings("overloads")
         public static DragSourceMotionListener add(DragSourceMotionListener a,
                                                    DragSourceMotionListener b) {
             return (DragSourceMotionListener)addInternal(a, b);
    @@ -166,6 +167,7 @@ class DnDEventMulticaster extends AWTEventMulticaster
          * @param l drag-source-motion-listener-l
          * @param ol the drag-source-motion-listener being removed
          */
    +    @SuppressWarnings("overloads")
         public static DragSourceMotionListener remove(DragSourceMotionListener l,
                                                       DragSourceMotionListener ol) {
             return (DragSourceMotionListener)removeInternal(l, ol);
    diff --git a/jdk/src/share/classes/java/awt/dnd/DragSource.java b/jdk/src/share/classes/java/awt/dnd/DragSource.java
    index d44733b71d8..ac9b15a2051 100644
    --- a/jdk/src/share/classes/java/awt/dnd/DragSource.java
    +++ b/jdk/src/share/classes/java/awt/dnd/DragSource.java
    @@ -495,6 +495,7 @@ public class DragSource implements Serializable {
          * and DragGestureListener on
          * the newly created object.
          * 

    + * @param the type of {@code DragGestureRecognizer} to create * @param recognizerAbstractClass the requested abstract type * @param actions the permitted source drag actions * @param c the Component target @@ -669,6 +670,7 @@ public class DragSource implements Serializable { * FooListeners are registered using the * addFooListener method. * + * @param the type of listener objects * @param listenerType the type of listeners requested; this parameter * should specify an interface that descends from * java.util.EventListener diff --git a/jdk/src/share/classes/java/awt/dnd/DropTarget.java b/jdk/src/share/classes/java/awt/dnd/DropTarget.java index ad672936078..9f5462a320b 100644 --- a/jdk/src/share/classes/java/awt/dnd/DropTarget.java +++ b/jdk/src/share/classes/java/awt/dnd/DropTarget.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -566,6 +566,7 @@ public class DropTarget implements DropTargetListener, Serializable { * DropTargetContextPeer as a drag operation encounters this * DropTarget. Accessing the Context while no Drag is current * has undefined results. + * @return the DropTargetContext associated with this DropTarget */ protected DropTargetContext createDropTargetContext() { @@ -766,9 +767,10 @@ public class DropTarget implements DropTargetListener, Serializable { /** * create an embedded autoscroller - *

    + * * @param c the Component * @param p the Point + * @return an embedded autoscroller */ protected DropTargetAutoScroller createDropTargetAutoScroller(Component c, Point p) { diff --git a/jdk/src/share/classes/java/awt/dnd/peer/DragSourceContextPeer.java b/jdk/src/share/classes/java/awt/dnd/peer/DragSourceContextPeer.java index 2965bec4dd4..8d69a6163b7 100644 --- a/jdk/src/share/classes/java/awt/dnd/peer/DragSourceContextPeer.java +++ b/jdk/src/share/classes/java/awt/dnd/peer/DragSourceContextPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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,18 +47,24 @@ public interface DragSourceContextPeer { /** * start a drag + * @param dsc the DragSourceContext + * @param c the cursor + * @param dragImage the image to be dragged + * @param imageOffset the offset */ void startDrag(DragSourceContext dsc, Cursor c, Image dragImage, Point imageOffset) throws InvalidDnDOperationException; /** * return the current drag cursor + * @return the current drag cursor */ Cursor getCursor(); /** * set the current drag cursor + * @param c the cursor */ void setCursor(Cursor c) throws InvalidDnDOperationException; diff --git a/jdk/src/share/classes/java/awt/dnd/peer/DropTargetContextPeer.java b/jdk/src/share/classes/java/awt/dnd/peer/DropTargetContextPeer.java index 34205c6cdc5..de74e8fb5f0 100644 --- a/jdk/src/share/classes/java/awt/dnd/peer/DropTargetContextPeer.java +++ b/jdk/src/share/classes/java/awt/dnd/peer/DropTargetContextPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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,35 +44,42 @@ public interface DropTargetContextPeer { /** * update the peer's notion of the Target's actions + * @param actions the actions */ void setTargetActions(int actions); /** * get the current Target actions + * @return the current Target actions */ int getTargetActions(); /** * get the DropTarget associated with this peer + * @return the DropTarget associated with this peer */ DropTarget getDropTarget(); /** * get the (remote) DataFlavors from the peer + * @return the (remote) DataFlavors from the peer */ DataFlavor[] getTransferDataFlavors(); /** * get an input stream to the remote data + * @return an input stream to the remote data */ Transferable getTransferable() throws InvalidDnDOperationException; /** + * Return whether or not the DragSource Transferable is in the + * same JVM as the Target. * @return if the DragSource Transferable is in the same JVM as the Target */ @@ -80,6 +87,7 @@ public interface DropTargetContextPeer { /** * accept the Drag + * @param dragAction the drag action */ void acceptDrag(int dragAction); @@ -92,6 +100,7 @@ public interface DropTargetContextPeer { /** * accept the Drop + * @param dropAction the drop action */ void acceptDrop(int dropAction); @@ -104,6 +113,7 @@ public interface DropTargetContextPeer { /** * signal complete + * @param success the signal */ void dropComplete(boolean success); diff --git a/jdk/src/share/classes/java/awt/event/AWTEventListener.java b/jdk/src/share/classes/java/awt/event/AWTEventListener.java index 9d2a32c3ead..e56191fd988 100644 --- a/jdk/src/share/classes/java/awt/event/AWTEventListener.java +++ b/jdk/src/share/classes/java/awt/event/AWTEventListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, 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 @@ -56,6 +56,7 @@ public interface AWTEventListener extends EventListener { /** * Invoked when an event is dispatched in the AWT. + * @param event the event to be processed */ public void eventDispatched(AWTEvent event); diff --git a/jdk/src/share/classes/java/awt/event/ActionListener.java b/jdk/src/share/classes/java/awt/event/ActionListener.java index cb766d3134f..bbb87dbddfb 100644 --- a/jdk/src/share/classes/java/awt/event/ActionListener.java +++ b/jdk/src/share/classes/java/awt/event/ActionListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ public interface ActionListener extends EventListener { /** * Invoked when an action occurs. + * @param e the event to be processed */ public void actionPerformed(ActionEvent e); diff --git a/jdk/src/share/classes/java/awt/event/AdjustmentListener.java b/jdk/src/share/classes/java/awt/event/AdjustmentListener.java index 01804647112..e4806d1ee93 100644 --- a/jdk/src/share/classes/java/awt/event/AdjustmentListener.java +++ b/jdk/src/share/classes/java/awt/event/AdjustmentListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -37,6 +37,7 @@ public interface AdjustmentListener extends EventListener { /** * Invoked when the value of the adjustable has changed. + * @param e the event to be processed */ public void adjustmentValueChanged(AdjustmentEvent e); diff --git a/jdk/src/share/classes/java/awt/event/ComponentListener.java b/jdk/src/share/classes/java/awt/event/ComponentListener.java index 8f0aad14875..e3e83e638d1 100644 --- a/jdk/src/share/classes/java/awt/event/ComponentListener.java +++ b/jdk/src/share/classes/java/awt/event/ComponentListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -54,21 +54,25 @@ import java.util.EventListener; public interface ComponentListener extends EventListener { /** * Invoked when the component's size changes. + * @param e the event to be processed */ public void componentResized(ComponentEvent e); /** * Invoked when the component's position changes. + * @param e the event to be processed */ public void componentMoved(ComponentEvent e); /** * Invoked when the component has been made visible. + * @param e the event to be processed */ public void componentShown(ComponentEvent e); /** * Invoked when the component has been made invisible. + * @param e the event to be processed */ public void componentHidden(ComponentEvent e); } diff --git a/jdk/src/share/classes/java/awt/event/ContainerListener.java b/jdk/src/share/classes/java/awt/event/ContainerListener.java index 3692e40513a..c99c5b9c94b 100644 --- a/jdk/src/share/classes/java/awt/event/ContainerListener.java +++ b/jdk/src/share/classes/java/awt/event/ContainerListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -55,11 +55,13 @@ import java.util.EventListener; public interface ContainerListener extends EventListener { /** * Invoked when a component has been added to the container. + * @param e the event to be processed */ public void componentAdded(ContainerEvent e); /** * Invoked when a component has been removed from the container. + * @param e the event to be processed */ public void componentRemoved(ContainerEvent e); diff --git a/jdk/src/share/classes/java/awt/event/FocusListener.java b/jdk/src/share/classes/java/awt/event/FocusListener.java index 9183425d3ef..31edd5a0726 100644 --- a/jdk/src/share/classes/java/awt/event/FocusListener.java +++ b/jdk/src/share/classes/java/awt/event/FocusListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -51,11 +51,13 @@ public interface FocusListener extends EventListener { /** * Invoked when a component gains the keyboard focus. + * @param e the event to be processed */ public void focusGained(FocusEvent e); /** * Invoked when a component loses the keyboard focus. + * @param e the event to be processed */ public void focusLost(FocusEvent e); } diff --git a/jdk/src/share/classes/java/awt/event/HierarchyBoundsListener.java b/jdk/src/share/classes/java/awt/event/HierarchyBoundsListener.java index de425edbfdf..a8f21342e9e 100644 --- a/jdk/src/share/classes/java/awt/event/HierarchyBoundsListener.java +++ b/jdk/src/share/classes/java/awt/event/HierarchyBoundsListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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 @@ -52,11 +52,13 @@ import java.util.EventListener; public interface HierarchyBoundsListener extends EventListener { /** * Called when an ancestor of the source is moved. + * @param e the event to be processed */ public void ancestorMoved(HierarchyEvent e); /** * Called when an ancestor of the source is resized. + * @param e the event to be processed */ public void ancestorResized(HierarchyEvent e); } diff --git a/jdk/src/share/classes/java/awt/event/HierarchyListener.java b/jdk/src/share/classes/java/awt/event/HierarchyListener.java index e281829f96a..b681b54212e 100644 --- a/jdk/src/share/classes/java/awt/event/HierarchyListener.java +++ b/jdk/src/share/classes/java/awt/event/HierarchyListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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 @@ -51,6 +51,7 @@ public interface HierarchyListener extends EventListener { * Called when the hierarchy has been changed. To discern the actual * type of change, call HierarchyEvent.getChangeFlags(). * + * @param e the event to be processed * @see HierarchyEvent#getChangeFlags() */ public void hierarchyChanged(HierarchyEvent e); diff --git a/jdk/src/share/classes/java/awt/event/InputEvent.java b/jdk/src/share/classes/java/awt/event/InputEvent.java index dbbabe22383..82948b73925 100644 --- a/jdk/src/share/classes/java/awt/event/InputEvent.java +++ b/jdk/src/share/classes/java/awt/event/InputEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -233,7 +233,8 @@ public abstract class InputEvent extends ComponentEvent { * This limit is defined by the relevant number * of buttons that may hypothetically exist on the mouse but it is greater than the * {@link java.awt.MouseInfo#getNumberOfButtons() MouseInfo.getNumberOfButtons()}. - *

    + * + * @return a mask for an existing mouse button. * @throws IllegalArgumentException if {@code button} is less than zero or greater than the number * of button masks reserved for buttons * @since 7.0 @@ -368,6 +369,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns whether or not the Shift modifier is down on this event. + * @return whether or not the Shift modifier is down on this event */ public boolean isShiftDown() { return (modifiers & SHIFT_MASK) != 0; @@ -375,6 +377,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns whether or not the Control modifier is down on this event. + * @return whether or not the Control modifier is down on this event */ public boolean isControlDown() { return (modifiers & CTRL_MASK) != 0; @@ -382,6 +385,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns whether or not the Meta modifier is down on this event. + * @return whether or not the Meta modifier is down on this event */ public boolean isMetaDown() { return (modifiers & META_MASK) != 0; @@ -389,6 +393,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns whether or not the Alt modifier is down on this event. + * @return whether or not the Alt modifier is down on this event */ public boolean isAltDown() { return (modifiers & ALT_MASK) != 0; @@ -396,6 +401,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns whether or not the AltGraph modifier is down on this event. + * @return whether or not the AltGraph modifier is down on this event */ public boolean isAltGraphDown() { return (modifiers & ALT_GRAPH_MASK) != 0; @@ -404,6 +410,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns the difference in milliseconds between the timestamp of when this event occurred and * midnight, January 1, 1970 UTC. + * @return the difference in milliseconds between the timestamp and midnight, January 1, 1970 UTC */ public long getWhen() { return when; @@ -411,6 +418,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns the modifier mask for this event. + * @return the modifier mask for this event */ public int getModifiers() { return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS); @@ -451,6 +459,7 @@ public abstract class InputEvent extends ComponentEvent { *

    * The above code will work even if new modifiers are added. * + * @return the extended modifier mask for this event * @since 1.4 */ public int getModifiersEx() { @@ -467,6 +476,7 @@ public abstract class InputEvent extends ComponentEvent { /** * Returns whether or not this event has been consumed. + * @return whether or not this event has been consumed * @see #consume */ public boolean isConsumed() { @@ -487,6 +497,9 @@ public abstract class InputEvent extends ComponentEvent { * Zero parameter means that no modifiers were passed and will * cause the returning an empty string. * + * @return a String describing the extended modifier keys and + * mouse buttons + * * @param modifiers a modifier mask describing the extended * modifier keys and mouse buttons for the event * @return a text description of the combination of extended diff --git a/jdk/src/share/classes/java/awt/event/InputMethodEvent.java b/jdk/src/share/classes/java/awt/event/InputMethodEvent.java index ec5548a8be7..104f10b8fea 100644 --- a/jdk/src/share/classes/java/awt/event/InputMethodEvent.java +++ b/jdk/src/share/classes/java/awt/event/InputMethodEvent.java @@ -277,6 +277,7 @@ public class InputMethodEvent extends AWTEvent { /** * Gets the number of committed characters in the text. + * @return the number of committed characters in the text */ public int getCommittedCharacterCount() { return committedCharacterCount; diff --git a/jdk/src/share/classes/java/awt/event/InputMethodListener.java b/jdk/src/share/classes/java/awt/event/InputMethodListener.java index 2833c3f604a..07e5358d735 100644 --- a/jdk/src/share/classes/java/awt/event/InputMethodListener.java +++ b/jdk/src/share/classes/java/awt/event/InputMethodListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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,17 +40,17 @@ import java.util.EventListener; * @see java.awt.im.InputMethodRequests * @since 1.2 */ - public interface InputMethodListener extends EventListener { /** * Invoked when the text entered through an input method has changed. + * @param event the event to be processed */ void inputMethodTextChanged(InputMethodEvent event); /** * Invoked when the caret within composed text has changed. + * @param event the event to be processed */ void caretPositionChanged(InputMethodEvent event); - } diff --git a/jdk/src/share/classes/java/awt/event/ItemListener.java b/jdk/src/share/classes/java/awt/event/ItemListener.java index 3cc7fa88671..8d2cde627cc 100644 --- a/jdk/src/share/classes/java/awt/event/ItemListener.java +++ b/jdk/src/share/classes/java/awt/event/ItemListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -50,6 +50,7 @@ public interface ItemListener extends EventListener { * Invoked when an item has been selected or deselected by the user. * The code written for this method performs the operations * that need to occur when an item is selected (or deselected). + * @param e the event to be processed */ void itemStateChanged(ItemEvent e); diff --git a/jdk/src/share/classes/java/awt/event/KeyEvent.java b/jdk/src/share/classes/java/awt/event/KeyEvent.java index 682c226fa3d..06cee44c408 100644 --- a/jdk/src/share/classes/java/awt/event/KeyEvent.java +++ b/jdk/src/share/classes/java/awt/event/KeyEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -132,7 +132,7 @@ import sun.awt.AWTAccessor; *

    * WARNING: Aside from those keys that are defined by the Java language * (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_ - * constants. Sun reserves the right to change these values as needed + * constants. The platform steward reserves the right to change these values as needed * to accommodate a wider range of keyboards in the future. *

    * An unspecified behavior will be caused if the {@code id} parameter @@ -194,21 +194,52 @@ public class KeyEvent extends InputEvent { /* Virtual key codes. */ + /** Constant for the ENTER virtual key. */ public static final int VK_ENTER = '\n'; + + /** Constant for the BACK_SPACE virtual key. */ public static final int VK_BACK_SPACE = '\b'; + + /** Constant for the TAB virtual key. */ public static final int VK_TAB = '\t'; + + /** Constant for the CANCEL virtual key. */ public static final int VK_CANCEL = 0x03; + + /** Constant for the CLEAR virtual key. */ public static final int VK_CLEAR = 0x0C; + + /** Constant for the SHIFT virtual key. */ public static final int VK_SHIFT = 0x10; + + /** Constant for the CONTROL virtual key. */ public static final int VK_CONTROL = 0x11; + + /** Constant for the ALT virtual key. */ public static final int VK_ALT = 0x12; + + /** Constant for the PAUSE virtual key. */ public static final int VK_PAUSE = 0x13; + + /** Constant for the CAPS_LOCK virtual key. */ public static final int VK_CAPS_LOCK = 0x14; + + /** Constant for the ESCAPE virtual key. */ public static final int VK_ESCAPE = 0x1B; + + /** Constant for the SPACE virtual key. */ public static final int VK_SPACE = 0x20; + + /** Constant for the PAGE_UP virtual key. */ public static final int VK_PAGE_UP = 0x21; + + /** Constant for the PAGE_DOWN virtual key. */ public static final int VK_PAGE_DOWN = 0x22; + + /** Constant for the END virtual key. */ public static final int VK_END = 0x23; + + /** Constant for the HOME virtual key. */ public static final int VK_HOME = 0x24; /** @@ -257,15 +288,35 @@ public class KeyEvent extends InputEvent { public static final int VK_SLASH = 0x2F; /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */ + + /** Constant for the "0" key. */ public static final int VK_0 = 0x30; + + /** Constant for the "1" key. */ public static final int VK_1 = 0x31; + + /** Constant for the "2" key. */ public static final int VK_2 = 0x32; + + /** Constant for the "3" key. */ public static final int VK_3 = 0x33; + + /** Constant for the "4" key. */ public static final int VK_4 = 0x34; + + /** Constant for the "5" key. */ public static final int VK_5 = 0x35; + + /** Constant for the "6" key. */ public static final int VK_6 = 0x36; + + /** Constant for the "7" key. */ public static final int VK_7 = 0x37; + + /** Constant for the "8" key. */ public static final int VK_8 = 0x38; + + /** Constant for the "9" key. */ public static final int VK_9 = 0x39; /** @@ -279,31 +330,83 @@ public class KeyEvent extends InputEvent { public static final int VK_EQUALS = 0x3D; /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */ + + /** Constant for the "A" key. */ public static final int VK_A = 0x41; + + /** Constant for the "B" key. */ public static final int VK_B = 0x42; + + /** Constant for the "C" key. */ public static final int VK_C = 0x43; + + /** Constant for the "D" key. */ public static final int VK_D = 0x44; + + /** Constant for the "E" key. */ public static final int VK_E = 0x45; + + /** Constant for the "F" key. */ public static final int VK_F = 0x46; + + /** Constant for the "G" key. */ public static final int VK_G = 0x47; + + /** Constant for the "H" key. */ public static final int VK_H = 0x48; + + /** Constant for the "I" key. */ public static final int VK_I = 0x49; + + /** Constant for the "J" key. */ public static final int VK_J = 0x4A; + + /** Constant for the "K" key. */ public static final int VK_K = 0x4B; + + /** Constant for the "L" key. */ public static final int VK_L = 0x4C; + + /** Constant for the "M" key. */ public static final int VK_M = 0x4D; + + /** Constant for the "N" key. */ public static final int VK_N = 0x4E; + + /** Constant for the "O" key. */ public static final int VK_O = 0x4F; + + /** Constant for the "P" key. */ public static final int VK_P = 0x50; + + /** Constant for the "Q" key. */ public static final int VK_Q = 0x51; + + /** Constant for the "R" key. */ public static final int VK_R = 0x52; + + /** Constant for the "S" key. */ public static final int VK_S = 0x53; + + /** Constant for the "T" key. */ public static final int VK_T = 0x54; + + /** Constant for the "U" key. */ public static final int VK_U = 0x55; + + /** Constant for the "V" key. */ public static final int VK_V = 0x56; + + /** Constant for the "W" key. */ public static final int VK_W = 0x57; + + /** Constant for the "X" key. */ public static final int VK_X = 0x58; + + /** Constant for the "Y" key. */ public static final int VK_Y = 0x59; + + /** Constant for the "Z" key. */ public static final int VK_Z = 0x5A; /** @@ -321,17 +424,40 @@ public class KeyEvent extends InputEvent { */ public static final int VK_CLOSE_BRACKET = 0x5D; + /** Constant for the number pad "0" key. */ public static final int VK_NUMPAD0 = 0x60; + + /** Constant for the number pad "1" key. */ public static final int VK_NUMPAD1 = 0x61; + + /** Constant for the number pad "2" key. */ public static final int VK_NUMPAD2 = 0x62; + + /** Constant for the number pad "3" key. */ public static final int VK_NUMPAD3 = 0x63; + + /** Constant for the number pad "4" key. */ public static final int VK_NUMPAD4 = 0x64; + + /** Constant for the number pad "5" key. */ public static final int VK_NUMPAD5 = 0x65; + + /** Constant for the number pad "6" key. */ public static final int VK_NUMPAD6 = 0x66; + + /** Constant for the number pad "7" key. */ public static final int VK_NUMPAD7 = 0x67; + + /** Constant for the number pad "8" key. */ public static final int VK_NUMPAD8 = 0x68; + + /** Constant for the number pad "9" key. */ public static final int VK_NUMPAD9 = 0x69; + + /** Constant for the number pad multiply key. */ public static final int VK_MULTIPLY = 0x6A; + + /** Constant for the number pad add key. */ public static final int VK_ADD = 0x6B; /** @@ -347,11 +473,22 @@ public class KeyEvent extends InputEvent { */ public static final int VK_SEPARATOR = VK_SEPARATER; + /** Constant for the number pad subtract key. */ public static final int VK_SUBTRACT = 0x6D; + + /** Constant for the number pad decimal point key. */ public static final int VK_DECIMAL = 0x6E; + + /** Constant for the number pad divide key. */ public static final int VK_DIVIDE = 0x6F; + + /** Constant for the delete key. */ public static final int VK_DELETE = 0x7F; /* ASCII DEL */ + + /** Constant for the NUM_LOCK key. */ public static final int VK_NUM_LOCK = 0x90; + + /** Constant for the SCROLL_LOCK key. */ public static final int VK_SCROLL_LOCK = 0x91; /** Constant for the F1 function key. */ @@ -463,12 +600,22 @@ public class KeyEvent extends InputEvent { */ public static final int VK_F24 = 0xF00B; + /** Constant for the PRINTSCREEN key. */ public static final int VK_PRINTSCREEN = 0x9A; + + /** Constant for the INSERT key. */ public static final int VK_INSERT = 0x9B; + + /** Constant for the HELP key. */ public static final int VK_HELP = 0x9C; + + /** Constant for the META key. */ public static final int VK_META = 0x9D; + /** Constant for the BACK_QUOTE key. */ public static final int VK_BACK_QUOTE = 0xC0; + + /** Constant for the QUOTE key. */ public static final int VK_QUOTE = 0xDE; /** @@ -638,6 +785,7 @@ public class KeyEvent extends InputEvent { /* for input method support on Asian Keyboards */ /* not clear what this means - listed in Microsoft Windows API */ + /** Constant for the FINAL key. */ public static final int VK_FINAL = 0x0018; /** Constant for the Convert function key. */ @@ -653,14 +801,23 @@ public class KeyEvent extends InputEvent { public static final int VK_ACCEPT = 0x001E; /* not clear what this means - listed in Microsoft Windows API */ + /** Constant for the MODECHANGE key. */ public static final int VK_MODECHANGE = 0x001F; /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris; might still be used on other platforms */ + /** + * Constant for the KANA lock key. + * @see #VK_KANA_LOCK + **/ public static final int VK_KANA = 0x0015; /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris; might still be used for other platforms */ + /** + * Constant for KANJI. + * @see #VK_INPUT_METHOD_ON_OFF + */ public static final int VK_KANJI = 0x0019; /** @@ -1085,7 +1242,25 @@ public class KeyEvent extends InputEvent { } /** - * @deprecated as of JDK1.1 + * @deprecated as of JDK1.1; use {@link #KeyEvent(Component, int, long, int, int, char)} instead + * @param source The Component that originated the event + * @param id An integer indicating the type of event. + * For information on allowable values, see + * the class description for {@link KeyEvent} + * @param when A long integer that specifies the time the event + * occurred. + * Passing negative or zero value + * is not recommended + * @param modifiers The modifier keys down during event (shift, ctrl, + * alt, meta). + * Passing negative value + * is not recommended. + * Zero value means that no modifiers were passed. + * Use either an extended _DOWN_MASK or old _MASK modifiers, + * however do not mix models in the one event. + * The extended modifiers are preferred for using + * @param keyCode The integer code for an actual key, or VK_UNDEFINED + * (for a key-typed event) */ @Deprecated public KeyEvent(Component source, int id, long when, int modifiers, @@ -1184,6 +1359,7 @@ public class KeyEvent extends InputEvent { * Returns a String describing the keyCode, such as "HOME", "F1" or "A". * These strings can be localized by changing the awt.properties file. * + * @param keyCode the key whose description is to be returned * @return a string containing a text description for a physical key, * identified by its keyCode */ @@ -1376,6 +1552,7 @@ public class KeyEvent extends InputEvent { * InputEvent.BUTTON3_MASK have the same value, * so the string "Meta" is returned for both modifiers. * + * @param modifiers the modifier mask to be processed * @return string a text description of the combination of modifier * keys that were held down during the event * @see InputEvent#getModifiersExText(int) @@ -1612,8 +1789,8 @@ public class KeyEvent extends InputEvent { * Pressing the same key in a regular Russian layout gives another code, unique for the * letter "Cyrillic I short". * + * @return an extended key code for the event * @since 1.7 - * */ public int getExtendedKeyCode() { return (int)extendedKeyCode; @@ -1621,6 +1798,7 @@ public class KeyEvent extends InputEvent { /** * Returns an extended key code for a unicode character. * + * @param c the unicode character to be processed * @return for a unicode character with a corresponding {@code VK_} constant -- this * {@code VK_} constant; for a character appearing on the primary * level of a known keyboard layout -- a unique integer. @@ -1628,7 +1806,6 @@ public class KeyEvent extends InputEvent { * {@code VK_UNDEFINED} is returned. * * @since 1.7 - * */ public static int getExtendedKeyCodeForChar(int c) { // Return a keycode (if any) associated with a character. diff --git a/jdk/src/share/classes/java/awt/event/KeyListener.java b/jdk/src/share/classes/java/awt/event/KeyListener.java index 896b5fc9b96..b0c6abf128d 100644 --- a/jdk/src/share/classes/java/awt/event/KeyListener.java +++ b/jdk/src/share/classes/java/awt/event/KeyListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -54,6 +54,7 @@ public interface KeyListener extends EventListener { * Invoked when a key has been typed. * See the class description for {@link KeyEvent} for a definition of * a key typed event. + * @param e the event to be processed */ public void keyTyped(KeyEvent e); @@ -61,6 +62,7 @@ public interface KeyListener extends EventListener { * Invoked when a key has been pressed. * See the class description for {@link KeyEvent} for a definition of * a key pressed event. + * @param e the event to be processed */ public void keyPressed(KeyEvent e); @@ -68,6 +70,7 @@ public interface KeyListener extends EventListener { * Invoked when a key has been released. * See the class description for {@link KeyEvent} for a definition of * a key released event. + * @param e the event to be processed */ public void keyReleased(KeyEvent e); } diff --git a/jdk/src/share/classes/java/awt/event/MouseListener.java b/jdk/src/share/classes/java/awt/event/MouseListener.java index 534ed392aa8..6217cac1211 100644 --- a/jdk/src/share/classes/java/awt/event/MouseListener.java +++ b/jdk/src/share/classes/java/awt/event/MouseListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -59,26 +59,31 @@ public interface MouseListener extends EventListener { /** * Invoked when the mouse button has been clicked (pressed * and released) on a component. + * @param e the event to be processed */ public void mouseClicked(MouseEvent e); /** * Invoked when a mouse button has been pressed on a component. + * @param e the event to be processed */ public void mousePressed(MouseEvent e); /** * Invoked when a mouse button has been released on a component. + * @param e the event to be processed */ public void mouseReleased(MouseEvent e); /** * Invoked when the mouse enters a component. + * @param e the event to be processed */ public void mouseEntered(MouseEvent e); /** * Invoked when the mouse exits a component. + * @param e the event to be processed */ public void mouseExited(MouseEvent e); } diff --git a/jdk/src/share/classes/java/awt/event/MouseMotionListener.java b/jdk/src/share/classes/java/awt/event/MouseMotionListener.java index 8bfb15234cb..9543b652008 100644 --- a/jdk/src/share/classes/java/awt/event/MouseMotionListener.java +++ b/jdk/src/share/classes/java/awt/event/MouseMotionListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -63,12 +63,14 @@ public interface MouseMotionListener extends EventListener { * Due to platform-dependent Drag&Drop implementations, * MOUSE_DRAGGED events may not be delivered during a native * Drag&Drop operation. + * @param e the event to be processed */ public void mouseDragged(MouseEvent e); /** * Invoked when the mouse cursor has been moved onto a component * but no buttons have been pushed. + * @param e the event to be processed */ public void mouseMoved(MouseEvent e); diff --git a/jdk/src/share/classes/java/awt/event/MouseWheelListener.java b/jdk/src/share/classes/java/awt/event/MouseWheelListener.java index 3cc77c77894..e2d19ab75ab 100644 --- a/jdk/src/share/classes/java/awt/event/MouseWheelListener.java +++ b/jdk/src/share/classes/java/awt/event/MouseWheelListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -52,6 +52,7 @@ public interface MouseWheelListener extends EventListener { /** * Invoked when the mouse wheel is rotated. + * @param e the event to be processed * @see MouseWheelEvent */ public void mouseWheelMoved(MouseWheelEvent e); diff --git a/jdk/src/share/classes/java/awt/event/PaintEvent.java b/jdk/src/share/classes/java/awt/event/PaintEvent.java index d74e4804e2f..11ad60c9f64 100644 --- a/jdk/src/share/classes/java/awt/event/PaintEvent.java +++ b/jdk/src/share/classes/java/awt/event/PaintEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -108,6 +108,8 @@ public class PaintEvent extends ComponentEvent { /** * Returns the rectangle representing the area which needs to be * repainted in response to this event. + * @return the rectangle representing the area which needs to be + * repainted in response to this event */ public Rectangle getUpdateRect() { return updateRect; diff --git a/jdk/src/share/classes/java/awt/event/TextListener.java b/jdk/src/share/classes/java/awt/event/TextListener.java index a5a2300b1b3..e43a636ec1e 100644 --- a/jdk/src/share/classes/java/awt/event/TextListener.java +++ b/jdk/src/share/classes/java/awt/event/TextListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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,8 @@ public interface TextListener extends EventListener { * Invoked when the value of the text has changed. * The code written for this method performs the operations * that need to occur when text changes. + * + * @param e the event to be processed */ public void textValueChanged(TextEvent e); diff --git a/jdk/src/share/classes/java/awt/event/WindowFocusListener.java b/jdk/src/share/classes/java/awt/event/WindowFocusListener.java index 22bba010eb4..ff9ddd45788 100644 --- a/jdk/src/share/classes/java/awt/event/WindowFocusListener.java +++ b/jdk/src/share/classes/java/awt/event/WindowFocusListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -57,6 +57,7 @@ public interface WindowFocusListener extends EventListener { * Invoked when the Window is set to be the focused Window, which means * that the Window, or one of its subcomponents, will receive keyboard * events. + * @param e the event to be processed */ public void windowGainedFocus(WindowEvent e); @@ -64,6 +65,7 @@ public interface WindowFocusListener extends EventListener { * Invoked when the Window is no longer the focused Window, which means * that keyboard events will no longer be delivered to the Window or any of * its subcomponents. + * @param e the event to be processed */ public void windowLostFocus(WindowEvent e); } diff --git a/jdk/src/share/classes/java/awt/event/WindowListener.java b/jdk/src/share/classes/java/awt/event/WindowListener.java index 9f752a394f4..e1845169b3b 100644 --- a/jdk/src/share/classes/java/awt/event/WindowListener.java +++ b/jdk/src/share/classes/java/awt/event/WindowListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -51,18 +51,21 @@ import java.util.EventListener; public interface WindowListener extends EventListener { /** * Invoked the first time a window is made visible. + * @param e the event to be processed */ public void windowOpened(WindowEvent e); /** * Invoked when the user attempts to close the window * from the window's system menu. + * @param e the event to be processed */ public void windowClosing(WindowEvent e); /** * Invoked when a window has been closed as the result * of calling dispose on the window. + * @param e the event to be processed */ public void windowClosed(WindowEvent e); @@ -71,6 +74,7 @@ public interface WindowListener extends EventListener { * minimized state. For many platforms, a minimized window * is displayed as the icon specified in the window's * iconImage property. + * @param e the event to be processed * @see java.awt.Frame#setIconImage */ public void windowIconified(WindowEvent e); @@ -78,6 +82,7 @@ public interface WindowListener extends EventListener { /** * Invoked when a window is changed from a minimized * to a normal state. + * @param e the event to be processed */ public void windowDeiconified(WindowEvent e); @@ -88,6 +93,7 @@ public interface WindowListener extends EventListener { * as a highlighted title bar. The active Window is always either the * focused Window, or the first Frame or Dialog that is an owner of the * focused Window. + * @param e the event to be processed */ public void windowActivated(WindowEvent e); @@ -98,6 +104,7 @@ public interface WindowListener extends EventListener { * highlighted title bar. The active Window is always either the focused * Window, or the first Frame or Dialog that is an owner of the focused * Window. + * @param e the event to be processed */ public void windowDeactivated(WindowEvent e); } diff --git a/jdk/src/share/classes/java/awt/event/WindowStateListener.java b/jdk/src/share/classes/java/awt/event/WindowStateListener.java index 5e52965c72c..2e1649ab320 100644 --- a/jdk/src/share/classes/java/awt/event/WindowStateListener.java +++ b/jdk/src/share/classes/java/awt/event/WindowStateListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2013, 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 @@ -50,6 +50,7 @@ import java.util.EventListener; public interface WindowStateListener extends EventListener { /** * Invoked when window state is changed. + * @param e the event to be processed */ public void windowStateChanged(WindowEvent e); } diff --git a/jdk/src/share/classes/java/awt/font/TextAttribute.java b/jdk/src/share/classes/java/awt/font/TextAttribute.java index 8b1612d385c..264871bd031 100644 --- a/jdk/src/share/classes/java/awt/font/TextAttribute.java +++ b/jdk/src/share/classes/java/awt/font/TextAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -65,7 +65,7 @@ import java.util.HashMap; *

  • the valid values if there are limitations *
  • a description of the effect. * - *

    + * *

    Values

    *
      *
    • The values of attributes must always be immutable. @@ -95,7 +95,6 @@ import java.util.HashMap; *
    * *

    Summary of attributes

    - *

    * diff --git a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java index 8f5942a740e..b34f40f1cdd 100644 --- a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java +++ b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java @@ -457,8 +457,6 @@ public interface ComponentPeer { * @param caps the buffer capabilities * * @throws AWTException if flip buffering is not supported - * - * @see Component.FlipBufferStrategy#createBuffers */ void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException; @@ -467,8 +465,6 @@ public interface ComponentPeer { * Returns the back buffer as image. * * @return the back buffer as image - * - * @see Component.FlipBufferStrategy#getBackBuffer */ Image getBackBuffer(); @@ -480,15 +476,11 @@ public interface ComponentPeer { * @param x2 the area to be flipped, lower right X coordinate * @param y2 the area to be flipped, lower right Y coordinate * @param flipAction the flip action to perform - * - * @see Component.FlipBufferStrategy#flip */ void flip(int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction); /** * Destroys all created buffers. - * - * @see Component.FlipBufferStrategy#destroyBuffers */ void destroyBuffers(); diff --git a/jdk/src/share/classes/java/awt/peer/DialogPeer.java b/jdk/src/share/classes/java/awt/peer/DialogPeer.java index fccf1ed5dc1..410ca68634e 100644 --- a/jdk/src/share/classes/java/awt/peer/DialogPeer.java +++ b/jdk/src/share/classes/java/awt/peer/DialogPeer.java @@ -64,7 +64,6 @@ public interface DialogPeer extends WindowPeer { * @param windows the windows to block * * @see Dialog#modalShow() - * @see Dialog#blockWindows() */ void blockWindows(java.util.List windows); } diff --git a/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java b/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java index 97d9b60016d..d0d6f85ac2d 100644 --- a/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java +++ b/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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 @@ package java.awt.peer; import java.awt.Component; +import java.awt.KeyboardFocusManager; import java.awt.Window; /** @@ -71,7 +72,7 @@ public interface KeyboardFocusManagerPeer { /** * Clears the current global focus owner. * - * @param activeWindow + * @param activeWindow the active window * * @see KeyboardFocusManager#clearGlobalFocusOwner() */ diff --git a/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java b/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java index 77b8ae7f13b..0594bda78bb 100644 --- a/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java +++ b/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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 @@ -29,8 +29,8 @@ import java.awt.Window; import java.awt.Point; /** - * Peer interface for {@link MouseInfo}. This is used to get some additional - * information about the mouse. + * Peer interface for {@link java.awt.MouseInfo}. This is used to get + * some additional information about the mouse. * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application diff --git a/jdk/src/share/classes/java/awt/peer/PanelPeer.java b/jdk/src/share/classes/java/awt/peer/PanelPeer.java index 67b5fda76b8..629a3bb72a4 100644 --- a/jdk/src/share/classes/java/awt/peer/PanelPeer.java +++ b/jdk/src/share/classes/java/awt/peer/PanelPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, 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,7 +25,7 @@ package java.awt.peer; /** - * The peer interface for {@link Panel}. This is a subinterface of + * The peer interface for {@link java.awt.Panel}. This is a subinterface of * ContainerPeer and does not declare any additional methods because a Panel * is just that, a concrete Container. * diff --git a/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java b/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java index eb260e636c3..2aa68ed090e 100644 --- a/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java +++ b/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, 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 @@ -28,7 +28,7 @@ import java.awt.Dimension; import java.awt.TextArea; /** - * The peer interface for {@link TexTArea}. + * The peer interface for {@link TextArea}. * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application diff --git a/jdk/src/share/classes/java/awt/peer/WindowPeer.java b/jdk/src/share/classes/java/awt/peer/WindowPeer.java index b44bfa00da9..e181b5b3018 100644 --- a/jdk/src/share/classes/java/awt/peer/WindowPeer.java +++ b/jdk/src/share/classes/java/awt/peer/WindowPeer.java @@ -57,7 +57,7 @@ public interface WindowPeer extends ContainerPeer { * Sets if the window should always stay * on top of all other windows or not. * - * @see Window#getAlwaysOnTop() + * @see Window#isAlwaysOnTop() * @see Window#setAlwaysOnTop(boolean) */ void updateAlwaysOnTopState(); diff --git a/jdk/src/share/classes/java/awt/print/Paper.java b/jdk/src/share/classes/java/awt/print/Paper.java index 717a87dd5ec..67b19043323 100644 --- a/jdk/src/share/classes/java/awt/print/Paper.java +++ b/jdk/src/share/classes/java/awt/print/Paper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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,7 +36,6 @@ import java.awt.geom.Rectangle2D; * are compatible. For example, if the paper size is changed from * 11 x 17 to 8.5 x 11, the application might need to reduce the * imageable area so that whatever is printed fits on the page. - *

    * @see #setSize(double, double) * @see #setImageableArea(double, double, double, double) */ diff --git a/jdk/src/share/classes/java/awt/print/Printable.java b/jdk/src/share/classes/java/awt/print/Printable.java index c34b7e6a963..9679e844c36 100644 --- a/jdk/src/share/classes/java/awt/print/Printable.java +++ b/jdk/src/share/classes/java/awt/print/Printable.java @@ -94,7 +94,6 @@ import java.awt.Graphics; * Pageable then the client may provide different PageFormats * for each page index. Calculations of page breaks must account for this. * - *

    * @see java.awt.print.Pageable * @see java.awt.print.PageFormat * @see java.awt.print.PrinterJob diff --git a/jdk/src/share/classes/java/beans/XMLEncoder.java b/jdk/src/share/classes/java/beans/XMLEncoder.java index b7cc21de312..b28d40b43e1 100644 --- a/jdk/src/share/classes/java/beans/XMLEncoder.java +++ b/jdk/src/share/classes/java/beans/XMLEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -150,7 +150,6 @@ import java.nio.charset.UnsupportedCharsetException; * Although all object graphs may be written using just these three * tags, the following definitions are included so that common * data structures can be expressed more concisely: - *

    *

      *
    • * The default method name is "new". diff --git a/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java b/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java index 43dfcb02c97..e8cd43b6293 100644 --- a/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java +++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -351,7 +351,8 @@ public class BeanContextSupport extends BeanContextChildSupport * methods that add children to the set. *

      * @param targetChild the child to create the Child on behalf of - * @param peer the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy * @return Subtype-specific subclass of Child without overriding collection methods + * @param peer the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy + * @return Subtype-specific subclass of Child without overriding collection methods */ protected BCSChild createBCSChild(Object targetChild, Object peer) { diff --git a/jdk/src/share/classes/java/lang/Double.java b/jdk/src/share/classes/java/lang/Double.java index 690ca6a8dc3..9ba150e7156 100644 --- a/jdk/src/share/classes/java/lang/Double.java +++ b/jdk/src/share/classes/java/lang/Double.java @@ -833,14 +833,10 @@ public final class Double extends Number implements Comparable { * @return the bits that represent the floating-point number. */ public static long doubleToLongBits(double value) { - long result = doubleToRawLongBits(value); - // Check for NaN based on values of bit fields, maximum - // exponent and nonzero significand. - if ( ((result & DoubleConsts.EXP_BIT_MASK) == - DoubleConsts.EXP_BIT_MASK) && - (result & DoubleConsts.SIGNIF_BIT_MASK) != 0L) - result = 0x7ff8000000000000L; - return result; + if (!isNaN(value)) { + return doubleToRawLongBits(value); + } + return 0x7ff8000000000000L; } /** diff --git a/jdk/src/share/classes/java/lang/Float.java b/jdk/src/share/classes/java/lang/Float.java index 5cc28f99bff..17d2cd7d206 100644 --- a/jdk/src/share/classes/java/lang/Float.java +++ b/jdk/src/share/classes/java/lang/Float.java @@ -741,14 +741,10 @@ public final class Float extends Number implements Comparable { * @return the bits that represent the floating-point number. */ public static int floatToIntBits(float value) { - int result = floatToRawIntBits(value); - // Check for NaN based on values of bit fields, maximum - // exponent and nonzero significand. - if ( ((result & FloatConsts.EXP_BIT_MASK) == - FloatConsts.EXP_BIT_MASK) && - (result & FloatConsts.SIGNIF_BIT_MASK) != 0) - result = 0x7fc00000; - return result; + if (!isNaN(value)) { + return floatToRawIntBits(value); + } + return 0x7fc00000; } /** diff --git a/jdk/src/share/classes/java/lang/Long.java b/jdk/src/share/classes/java/lang/Long.java index fa43fa4d0b5..f873762e1e7 100644 --- a/jdk/src/share/classes/java/lang/Long.java +++ b/jdk/src/share/classes/java/lang/Long.java @@ -700,21 +700,58 @@ public final class Long extends Number implements Comparable { throw new NumberFormatException("Bad digit at end of " + s); } long result = first * radix + second; - if (compareUnsigned(result, first) < 0) { + + /* + * Test leftmost bits of multiprecision extension of first*radix + * for overflow. The number of bits needed is defined by + * GUARD_BIT = ceil(log2(Character.MAX_RADIX)) + 1 = 7. Then + * int guard = radix*(int)(first >>> (64 - GUARD_BIT)) and + * overflow is tested by splitting guard in the ranges + * guard < 92, 92 <= guard < 128, and 128 <= guard, where + * 92 = 128 - Character.MAX_RADIX. Note that guard cannot take + * on a value which does not include a prime factor in the legal + * radix range. + */ + int guard = radix * (int) (first >>> 57); + if (guard >= 128 || + (result >= 0 && guard >= 128 - Character.MAX_RADIX)) { /* - * The maximum unsigned value, (2^64)-1, takes at - * most one more digit to represent than the - * maximum signed value, (2^63)-1. Therefore, - * parsing (len - 1) digits will be appropriately - * in-range of the signed parsing. In other - * words, if parsing (len -1) digits overflows - * signed parsing, parsing len digits will - * certainly overflow unsigned parsing. + * For purposes of exposition, the programmatic statements + * below should be taken to be multi-precision, i.e., not + * subject to overflow. * - * The compareUnsigned check above catches - * situations where an unsigned overflow occurs - * incorporating the contribution of the final - * digit. + * A) Condition guard >= 128: + * If guard >= 128 then first*radix >= 2^7 * 2^57 = 2^64 + * hence always overflow. + * + * B) Condition guard < 92: + * Define left7 = first >>> 57. + * Given first = (left7 * 2^57) + (first & (2^57 - 1)) then + * result <= (radix*left7)*2^57 + radix*(2^57 - 1) + second. + * Thus if radix*left7 < 92, radix <= 36, and second < 36, + * then result < 92*2^57 + 36*(2^57 - 1) + 36 = 2^64 hence + * never overflow. + * + * C) Condition 92 <= guard < 128: + * first*radix + second >= radix*left7*2^57 + second + * so that first*radix + second >= 92*2^57 + 0 > 2^63 + * + * D) Condition guard < 128: + * radix*first <= (radix*left7) * 2^57 + radix*(2^57 - 1) + * so + * radix*first + second <= (radix*left7) * 2^57 + radix*(2^57 - 1) + 36 + * thus + * radix*first + second < 128 * 2^57 + 36*2^57 - radix + 36 + * whence + * radix*first + second < 2^64 + 2^6*2^57 = 2^64 + 2^63 + * + * E) Conditions C, D, and result >= 0: + * C and D combined imply the mathematical result + * 2^63 < first*radix + second < 2^64 + 2^63. The lower + * bound is therefore negative as a signed long, but the + * upper bound is too small to overflow again after the + * signed long overflows to positive above 2^64 - 1. Hence + * result >= 0 implies overflow given C and D. */ throw new NumberFormatException(String.format("String value %s exceeds " + "range of unsigned long.", s)); diff --git a/jdk/src/share/classes/java/lang/SecurityManager.java b/jdk/src/share/classes/java/lang/SecurityManager.java index e5612cae524..3797b86a1c3 100644 --- a/jdk/src/share/classes/java/lang/SecurityManager.java +++ b/jdk/src/share/classes/java/lang/SecurityManager.java @@ -1106,11 +1106,8 @@ class SecurityManager { * calling thread is not allowed to wait for a connection request on * the specified local port number. *

      - * If port is not 0, this method calls - * checkPermission with the + * This method calls checkPermission with the * SocketPermission("localhost:"+port,"listen"). - * If port is zero, this method calls checkPermission - * with SocketPermission("localhost:1024-","listen"). *

      * If you override this method, then you should make a call to * super.checkListen @@ -1123,12 +1120,8 @@ class SecurityManager { * @see #checkPermission(java.security.Permission) checkPermission */ public void checkListen(int port) { - if (port == 0) { - checkPermission(SecurityConstants.LOCAL_LISTEN_PERMISSION); - } else { - checkPermission(new SocketPermission("localhost:"+port, - SecurityConstants.SOCKET_LISTEN_ACTION)); - } + checkPermission(new SocketPermission("localhost:"+port, + SecurityConstants.SOCKET_LISTEN_ACTION)); } /** diff --git a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java index abc31479f98..f592d51f471 100644 --- a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java +++ b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java @@ -611,7 +611,7 @@ import jdk.internal.org.objectweb.asm.Type; mv.visitVarInsn(ALOAD, 1); mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKESPECIAL, BMH, "", makeSignature("", true)); + mv.visitMethodInsn(INVOKESPECIAL, BMH, "", makeSignature("", true), false); for (int i = 0, j = 0; i < types.length(); ++i, ++j) { // i counts the arguments, j counts corresponding argument slots @@ -662,7 +662,7 @@ import jdk.internal.org.objectweb.asm.Type; // put fields on the stack emitPushFields(types, className, mv); // finally, invoke the constructor and return - mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types, false)); + mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types, false), false); mv.visitInsn(ARETURN); mv.visitMaxs(0, 0); mv.visitEnd(); @@ -678,7 +678,7 @@ import jdk.internal.org.objectweb.asm.Type; int iconstInsn = ICONST_0 + extensionIndex(t); assert(iconstInsn <= ICONST_5); mv.visitInsn(iconstInsn); - mv.visitMethodInsn(INVOKEVIRTUAL, SPECIES_DATA, "extendWithIndex", BMHSPECIES_DATA_EWI_SIG); + mv.visitMethodInsn(INVOKEVIRTUAL, SPECIES_DATA, "extendWithIndex", BMHSPECIES_DATA_EWI_SIG, false); mv.visitFieldInsn(GETFIELD, SPECIES_DATA, "constructor", "[" + MH_SIG); mv.visitInsn(ICONST_0); mv.visitInsn(AALOAD); @@ -690,7 +690,7 @@ import jdk.internal.org.objectweb.asm.Type; // put narg on stack mv.visitVarInsn(typeLoadOp(t), 3); // finally, invoke the constructor and return - mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types + t, false)); + mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types + t, false), false); mv.visitInsn(ARETURN); mv.visitMaxs(0, 0); mv.visitEnd(); @@ -701,7 +701,7 @@ import jdk.internal.org.objectweb.asm.Type; mv.visitCode(); mv.visitLdcInsn(types); mv.visitLdcInsn(Type.getObjectType(className)); - mv.visitMethodInsn(INVOKESTATIC, SPECIES_DATA, "getForClass", BMHSPECIES_DATA_GFC_SIG); + mv.visitMethodInsn(INVOKESTATIC, SPECIES_DATA, "getForClass", BMHSPECIES_DATA_GFC_SIG, false); mv.visitFieldInsn(PUTSTATIC, className, "SPECIES_DATA", SPECIES_DATA_SIG); mv.visitInsn(RETURN); mv.visitMaxs(0, 0); diff --git a/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index 2fc8618cbc5..752c0976d9e 100644 --- a/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -193,10 +193,10 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; CallSite buildCallSite() throws LambdaConversionException { final Class innerClass = spinInnerClass(); if (invokedType.parameterCount() == 0) { - final Constructor[] ctrs = AccessController.doPrivileged( - new PrivilegedAction() { + final Constructor[] ctrs = AccessController.doPrivileged( + new PrivilegedAction[]>() { @Override - public Constructor[] run() { + public Constructor[] run() { Constructor[] ctrs = innerClass.getDeclaredConstructors(); if (ctrs.length == 1) { // The lambda implementing inner class constructor is private, set @@ -338,7 +338,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; m.visitVarInsn(getLoadOpcode(argType), varIndex); varIndex += getParameterSize(argType); } - m.visitMethodInsn(INVOKESPECIAL, lambdaClassName, NAME_CTOR, constructorType.toMethodDescriptorString()); + m.visitMethodInsn(INVOKESPECIAL, lambdaClassName, NAME_CTOR, constructorType.toMethodDescriptorString(), false); m.visitInsn(ARETURN); m.visitMaxs(-1, -1); m.visitEnd(); @@ -354,7 +354,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; ctor.visitCode(); ctor.visitVarInsn(ALOAD, 0); ctor.visitMethodInsn(INVOKESPECIAL, JAVA_LANG_OBJECT, NAME_CTOR, - METHOD_DESCRIPTOR_VOID); + METHOD_DESCRIPTOR_VOID, false); int parameterCount = invokedType.parameterCount(); for (int i = 0, lvIndex = 0; i < parameterCount; i++) { ctor.visitVarInsn(ALOAD, 0); @@ -402,7 +402,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; mv.visitInsn(AASTORE); } mv.visitMethodInsn(INVOKESPECIAL, NAME_SERIALIZED_LAMBDA, NAME_CTOR, - DESCR_CTOR_SERIALIZED_LAMBDA); + DESCR_CTOR_SERIALIZED_LAMBDA, false); mv.visitInsn(ARETURN); // Maxs computed by ClassWriter.COMPUTE_MAXS, these arguments ignored mv.visitMaxs(-1, -1); @@ -421,7 +421,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; mv.visitInsn(DUP); mv.visitLdcInsn("Non-serializable lambda"); mv.visitMethodInsn(INVOKESPECIAL, NAME_NOT_SERIALIZABLE_EXCEPTION, NAME_CTOR, - DESCR_CTOR_NOT_SERIALIZABLE_EXCEPTION); + DESCR_CTOR_NOT_SERIALIZABLE_EXCEPTION, false); mv.visitInsn(ATHROW); mv.visitMaxs(-1, -1); mv.visitEnd(); @@ -434,7 +434,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; mv.visitInsn(DUP); mv.visitLdcInsn("Non-serializable lambda"); mv.visitMethodInsn(INVOKESPECIAL, NAME_NOT_SERIALIZABLE_EXCEPTION, NAME_CTOR, - DESCR_CTOR_NOT_SERIALIZABLE_EXCEPTION); + DESCR_CTOR_NOT_SERIALIZABLE_EXCEPTION, false); mv.visitInsn(ATHROW); mv.visitMaxs(-1, -1); mv.visitEnd(); diff --git a/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java index 5a3ee424b1a..bb873b10c5a 100644 --- a/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java +++ b/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java @@ -403,7 +403,7 @@ class InvokerBytecodeGenerator { String owner = "java/lang/" + wrapper.wrapperType().getSimpleName(); String name = "valueOf"; String desc = "(" + wrapper.basicTypeChar() + ")L" + owner + ";"; - mv.visitMethodInsn(Opcodes.INVOKESTATIC, owner, name, desc); + mv.visitMethodInsn(Opcodes.INVOKESTATIC, owner, name, desc, false); } /** @@ -417,7 +417,7 @@ class InvokerBytecodeGenerator { String name = wrapper.primitiveSimpleName() + "Value"; String desc = "()" + wrapper.basicTypeChar(); mv.visitTypeInsn(Opcodes.CHECKCAST, owner); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, owner, name, desc); + mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, owner, name, desc, false); } /** @@ -437,7 +437,7 @@ class InvokerBytecodeGenerator { mv.visitLdcInsn(constantPlaceholder(pclass)); mv.visitTypeInsn(Opcodes.CHECKCAST, CLS); mv.visitInsn(Opcodes.SWAP); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CLS, "cast", LL_SIG); + mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CLS, "cast", LL_SIG, false); if (pclass.isArray()) mv.visitTypeInsn(Opcodes.CHECKCAST, OBJARY); } @@ -570,7 +570,7 @@ class InvokerBytecodeGenerator { // invocation MethodType type = name.function.methodType(); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", type.basicType().toMethodDescriptorString()); + mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", type.basicType().toMethodDescriptorString(), false); } static private Class[] STATICALLY_INVOCABLE_PACKAGES = { @@ -638,6 +638,12 @@ class InvokerBytecodeGenerator { refKind = REF_invokeVirtual; } + if (member.getDeclaringClass().isInterface() && refKind == REF_invokeVirtual) { + // Methods from Object declared in an interface can be resolved by JVM to invokevirtual kind. + // Need to convert it back to invokeinterface to pass verification and make the invocation works as expected. + refKind = REF_invokeInterface; + } + // push arguments for (int i = 0; i < name.arguments.length; i++) { emitPushArgument(name, i); @@ -938,7 +944,7 @@ class InvokerBytecodeGenerator { emitAloadInsn(0); mv.visitFieldInsn(Opcodes.GETFIELD, MH, "form", "Ljava/lang/invoke/LambdaForm;"); mv.visitInsn(Opcodes.SWAP); // swap form and array; avoid local variable - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, LF, "interpretWithArguments", "([Ljava/lang/Object;)Ljava/lang/Object;"); + mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, LF, "interpretWithArguments", "([Ljava/lang/Object;)Ljava/lang/Object;", false); // maybe unbox Class rtype = invokerType.returnType(); @@ -1001,7 +1007,7 @@ class InvokerBytecodeGenerator { // Invoke String targetDesc = dstType.basicType().toMethodDescriptorString(); - mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", targetDesc); + mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", targetDesc, false); // Box primitive types Class rtype = dstType.returnType(); diff --git a/jdk/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java b/jdk/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java index 5d8e1bf82f5..b23ba663128 100644 --- a/jdk/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java +++ b/jdk/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java @@ -158,19 +158,19 @@ class TypeConvertingMethodAdapter extends MethodVisitor { visitMethodInsn(Opcodes.INVOKESTATIC, wrapperName(w), NAME_BOX_METHOD, - boxingDescriptor(w)); + boxingDescriptor(w), false); } /** * Convert types by unboxing. The source type is known to be a primitive wrapper. - * @param ws A primitive wrapper corresponding to wrapped reference source type + * @param sname A primitive wrapper corresponding to wrapped reference source type * @param wt A primitive wrapper being converted to */ void unbox(String sname, Wrapper wt) { visitMethodInsn(Opcodes.INVOKEVIRTUAL, sname, unboxMethod(wt), - unboxingDescriptor(wt)); + unboxingDescriptor(wt), false); } private String descriptorToName(String desc) { diff --git a/jdk/src/share/classes/java/net/Socket.java b/jdk/src/share/classes/java/net/Socket.java index 21cf5aae133..dedc8ca1b85 100644 --- a/jdk/src/share/classes/java/net/Socket.java +++ b/jdk/src/share/classes/java/net/Socket.java @@ -272,7 +272,9 @@ class Socket implements java.io.Closeable { * {@code zero} for a system selected free port. * @exception IOException if an I/O error occurs when creating the socket. * @exception SecurityException if a security manager exists and its - * {@code checkConnect} method doesn't allow the operation. + * {@code checkConnect} method doesn't allow the connection + * to the destination, or if its {@code checkListen} method + * doesn't allow the bind to the local port. * @exception IllegalArgumentException if the port parameter or localPort * parameter is outside the specified range of valid port values, * which is between 0 and 65535, inclusive. @@ -311,7 +313,9 @@ class Socket implements java.io.Closeable { * {@code zero} for a system selected free port. * @exception IOException if an I/O error occurs when creating the socket. * @exception SecurityException if a security manager exists and its - * {@code checkConnect} method doesn't allow the operation. + * {@code checkConnect} method doesn't allow the connection + * to the destination, or if its {@code checkListen} method + * doesn't allow the bind to the local port. * @exception IllegalArgumentException if the port parameter or localPort * parameter is outside the specified range of valid port values, * which is between 0 and 65535, inclusive. @@ -609,6 +613,9 @@ class Socket implements java.io.Closeable { * is already bound. * @throws IllegalArgumentException if bindpoint is a * SocketAddress subclass not supported by this socket + * @throws SecurityException if a security manager exists and its + * {@code checkListen} method doesn't allow the bind + * to the local port. * * @since 1.4 * @see #isBound @@ -630,6 +637,10 @@ class Socket implements java.io.Closeable { InetAddress addr = epoint.getAddress(); int port = epoint.getPort(); checkAddress (addr, "bind"); + SecurityManager security = System.getSecurityManager(); + if (security != null) { + security.checkListen(port); + } getImpl().bind (addr, port); bound = true; } diff --git a/jdk/src/share/classes/java/net/SocketPermission.java b/jdk/src/share/classes/java/net/SocketPermission.java index 1b11437b1aa..70b004af3bc 100644 --- a/jdk/src/share/classes/java/net/SocketPermission.java +++ b/jdk/src/share/classes/java/net/SocketPermission.java @@ -34,6 +34,9 @@ import java.util.StringTokenizer; import java.net.InetAddress; import java.security.Permission; import java.security.PermissionCollection; +import java.security.PrivilegedAction; +import java.security.AccessController; +import java.security.Security; import java.io.Serializable; import java.io.ObjectStreamField; import java.io.ObjectOutputStream; @@ -41,6 +44,7 @@ import java.io.ObjectInputStream; import java.io.IOException; import sun.net.util.IPAddressUtil; import sun.net.RegisteredDomain; +import sun.net.PortConfig; import sun.security.util.SecurityConstants; import sun.security.util.Debug; @@ -89,6 +93,9 @@ import sun.security.util.Debug; * form "N-", where N is a port number, signifies all ports * numbered N and above, while a specification of the * form "-N" indicates all ports numbered N and below. + * The special port value {@code 0} refers to the entire ephemeral + * port range. This is a fixed range of ports a system may use to + * allocate dynamic ports from. The actual range may be system dependent. *

      * The possible ways to connect to the host are *

      @@ -97,7 +104,8 @@ import sun.security.util.Debug;
        * listen
        * resolve
        * 
      - * The "listen" action is only meaningful when used with "localhost". + * The "listen" action is only meaningful when used with "localhost" and + * means the ability to bind to a specified port. * The "resolve" action is implied when any of the other actions are present. * The action "resolve" refers to host/ip name service lookups. *

      @@ -176,6 +184,7 @@ public final class SocketPermission extends Permission private static final int PORT_MIN = 0; private static final int PORT_MAX = 65535; private static final int PRIV_PORT_MAX = 1023; + private static final int DEF_EPH_LOW = 49152; // the actions mask private transient int mask; @@ -226,6 +235,14 @@ public final class SocketPermission extends Permission private static Debug debug = null; private static boolean debugInit = false; + // ephemeral port range for this system + private static final int ephemeralLow = initEphemeralPorts( + "low", DEF_EPH_LOW + ); + private static final int ephemeralHigh = initEphemeralPorts( + "high", PORT_MAX + ); + static { Boolean tmp = java.security.AccessController.doPrivileged( new sun.security.action.GetBooleanAction("sun.net.trustNameService")); @@ -359,6 +376,14 @@ public final class SocketPermission extends Permission } } + /** + * Returns true if the permission has specified zero + * as its value (or lower bound) signifying the ephemeral range + */ + private boolean includesEphemerals() { + return portrange[0] == 0; + } + /** * Initialize the SocketPermission object. We don't do any DNS lookups * as this point, instead we hold off until the implies method is @@ -850,10 +875,21 @@ public final class SocketPermission extends Permission int i,j; if ((that.mask & RESOLVE) != that.mask) { - // check port range + + // check simple port range if ((that.portrange[0] < this.portrange[0]) || (that.portrange[1] > this.portrange[1])) { + + // if either includes the ephemeral range, do full check + if (this.includesEphemerals() || that.includesEphemerals()) { + if (!inRange(this.portrange[0], this.portrange[1], + that.portrange[0], that.portrange[1])) + { + return false; + } + } else { return false; + } } } @@ -1168,6 +1204,75 @@ public final class SocketPermission extends Permission init(getName(),getMask(actions)); } + /** + * Check the system/security property for the ephemeral port range + * for this system. The suffix is either "high" or "low" + */ + private static int initEphemeralPorts(String suffix, int defval) { + return AccessController.doPrivileged( + new PrivilegedAction(){ + public Integer run() { + int val = Integer.getInteger( + "jdk.net.ephemeralPortRange."+suffix, -1 + ); + if (val != -1) { + return val; + } else { + return suffix.equals("low") ? + PortConfig.getLower() : PortConfig.getUpper(); + } + } + } + ); + } + + /** + * Check if the target range is within the policy range + * together with the ephemeral range for this platform + * (if policy includes ephemeral range) + */ + private static boolean inRange( + int policyLow, int policyHigh, int targetLow, int targetHigh + ) + { + if (targetLow == 0) { + // check policy includes ephemeral range + if (!inRange(policyLow, policyHigh, ephemeralLow, ephemeralHigh)) { + return false; + } + if (targetHigh == 0) { + // nothing left to do + return true; + } + // continue check with first real port number + targetLow = 1; + } + + if (policyLow == 0 && policyHigh == 0) { + // ephemeral range only + return targetLow >= ephemeralLow && targetHigh <= ephemeralHigh; + } + + if (policyLow != 0) { + // simple check of policy only + return targetLow >= policyLow && targetHigh <= policyHigh; + } + + // policyLow == 0 which means possibly two ranges to check + + // first check if policy and ephem range overlap/contiguous + + if (policyHigh >= ephemeralLow - 1) { + return targetHigh <= ephemeralHigh; + } + + // policy and ephem range do not overlap + + // target range must lie entirely inside policy range or eph range + + return (targetLow <= policyHigh && targetHigh <= policyHigh) || + (targetLow >= ephemeralLow && targetHigh <= ephemeralHigh); + } /* public String toString() { diff --git a/jdk/src/share/classes/java/net/SocksSocketImpl.java b/jdk/src/share/classes/java/net/SocksSocketImpl.java index 2138f9dfcf1..b05a4d4c853 100644 --- a/jdk/src/share/classes/java/net/SocksSocketImpl.java +++ b/jdk/src/share/classes/java/net/SocksSocketImpl.java @@ -118,7 +118,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts { private int readSocksReply(InputStream in, byte[] data, long deadlineMillis) throws IOException { int len = data.length; int received = 0; - for (int attempts = 0; received < len && attempts < 3; attempts++) { + while (received < len) { int count; try { count = ((SocketInputStream)in).read(data, received, len - received, remainingMillis(deadlineMillis)); @@ -521,7 +521,11 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts { throw new SocketException("Reply from SOCKS server badly formatted"); break; case DOMAIN_NAME: - len = data[1]; + byte[] lenByte = new byte[1]; + i = readSocksReply(in, lenByte, deadlineMillis); + if (i != 1) + throw new SocketException("Reply from SOCKS server badly formatted"); + len = lenByte[0] & 0xFF; byte[] host = new byte[len]; i = readSocksReply(in, host, deadlineMillis); if (i != len) @@ -532,7 +536,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts { throw new SocketException("Reply from SOCKS server badly formatted"); break; case IPV6: - len = data[1]; + len = 16; addr = new byte[len]; i = readSocksReply(in, addr, deadlineMillis); if (i != len) diff --git a/jdk/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java b/jdk/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java index 2c2a1a306d5..2b9fd885ae1 100644 --- a/jdk/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java +++ b/jdk/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java @@ -200,6 +200,10 @@ public abstract class AsynchronousSocketChannel * @throws UnsupportedAddressTypeException {@inheritDoc} * @throws ClosedChannelException {@inheritDoc} * @throws IOException {@inheritDoc} + * @throws SecurityException + * If a security manager has been installed and its + * {@link SecurityManager#checkListen checkListen} method denies + * the operation */ @Override public abstract AsynchronousSocketChannel bind(SocketAddress local) diff --git a/jdk/src/share/classes/java/nio/channels/SocketChannel.java b/jdk/src/share/classes/java/nio/channels/SocketChannel.java index 091570cbf64..2864643e6a1 100644 --- a/jdk/src/share/classes/java/nio/channels/SocketChannel.java +++ b/jdk/src/share/classes/java/nio/channels/SocketChannel.java @@ -227,6 +227,10 @@ public abstract class SocketChannel * @throws UnsupportedAddressTypeException {@inheritDoc} * @throws ClosedChannelException {@inheritDoc} * @throws IOException {@inheritDoc} + * @throws SecurityException + * If a security manager has been installed and its + * {@link SecurityManager#checkListen checkListen} method denies + * the operation * * @since 1.7 */ diff --git a/jdk/src/share/classes/java/nio/file/Files.java b/jdk/src/share/classes/java/nio/file/Files.java index 5c8d8be171a..012118c60f6 100644 --- a/jdk/src/share/classes/java/nio/file/Files.java +++ b/jdk/src/share/classes/java/nio/file/Files.java @@ -752,9 +752,12 @@ public final class Files { } if (parent == null) { // unable to find existing parent - if (se != null) + if (se == null) { + throw new FileSystemException(dir.toString(), null, + "Unable to determine if root directory exists"); + } else { throw se; - throw new IOException("Root directory does not exist"); + } } // create directories diff --git a/jdk/src/share/classes/java/util/Arrays.java b/jdk/src/share/classes/java/util/Arrays.java index 268205052a9..09135c99969 100644 --- a/jdk/src/share/classes/java/util/Arrays.java +++ b/jdk/src/share/classes/java/util/Arrays.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -1427,12 +1427,14 @@ public class Arrays { * found to violate the {@link Comparator} contract */ public static void sort(T[] a, Comparator c) { - if (c == null) - c = NaturalOrder.INSTANCE; - if (LegacyMergeSort.userRequested) - legacyMergeSort(a, c); - else - TimSort.sort(a, 0, a.length, c, null, 0, 0); + if (c == null) { + sort(a); + } else { + if (LegacyMergeSort.userRequested) + legacyMergeSort(a, c); + else + TimSort.sort(a, 0, a.length, c, null, 0, 0); + } } /** To be removed in a future release. */ @@ -1498,13 +1500,15 @@ public class Arrays { */ public static void sort(T[] a, int fromIndex, int toIndex, Comparator c) { - if (c == null) - c = NaturalOrder.INSTANCE; - rangeCheck(a.length, fromIndex, toIndex); - if (LegacyMergeSort.userRequested) - legacyMergeSort(a, fromIndex, toIndex, c); - else - TimSort.sort(a, fromIndex, toIndex, c, null, 0, 0); + if (c == null) { + sort(a, fromIndex, toIndex); + } else { + rangeCheck(a.length, fromIndex, toIndex); + if (LegacyMergeSort.userRequested) + legacyMergeSort(a, fromIndex, toIndex, c); + else + TimSort.sort(a, fromIndex, toIndex, c, null, 0, 0); + } } /** To be removed in a future release. */ diff --git a/jdk/src/share/classes/java/util/Collections.java b/jdk/src/share/classes/java/util/Collections.java index 8a20078fabf..c172c95f49b 100644 --- a/jdk/src/share/classes/java/util/Collections.java +++ b/jdk/src/share/classes/java/util/Collections.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -121,34 +121,9 @@ public class Collections { * *

      The specified list must be modifiable, but need not be resizable. * - *

      Implementation note: This implementation is a stable, adaptive, - * iterative mergesort that requires far fewer than n lg(n) comparisons - * when the input array is partially sorted, while offering the - * performance of a traditional mergesort when the input array is - * randomly ordered. If the input array is nearly sorted, the - * implementation requires approximately n comparisons. Temporary - * storage requirements vary from a small constant for nearly sorted - * input arrays to n/2 object references for randomly ordered input - * arrays. - * - *

      The implementation takes equal advantage of ascending and - * descending order in its input array, and can take advantage of - * ascending and descending order in different parts of the same - * input array. It is well-suited to merging two or more sorted arrays: - * simply concatenate the arrays and sort the resulting array. - * - *

      The implementation was adapted from Tim Peters's list sort for Python - * ( - * TimSort). It uses techniques from Peter McIlroy's "Optimistic - * Sorting and Information Theoretic Complexity", in Proceedings of the - * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474, - * January 1993. - * - *

      This implementation dumps the specified list into an array, sorts - * the array, and iterates over the list resetting each element - * from the corresponding position in the array. This avoids the - * n2 log(n) performance that would result from attempting - * to sort a linked list in place. + * @implNote + * This implementation defers to the {@link List#sort(Comparator)} + * method using the specified list and a {@code null} comparator. * * @param the class of the objects in the list * @param list the list to be sorted. @@ -159,16 +134,11 @@ public class Collections { * @throws IllegalArgumentException (optional) if the implementation * detects that the natural ordering of the list elements is * found to violate the {@link Comparable} contract + * @see List#sort(Comparator) */ @SuppressWarnings("unchecked") public static > void sort(List list) { - Object[] a = list.toArray(); - Arrays.sort(a); - ListIterator i = list.listIterator(); - for (Object e : a) { - i.next(); - i.set((T) e); - } + list.sort(null); } /** @@ -183,34 +153,9 @@ public class Collections { * *

      The specified list must be modifiable, but need not be resizable. * - *

      Implementation note: This implementation is a stable, adaptive, - * iterative mergesort that requires far fewer than n lg(n) comparisons - * when the input array is partially sorted, while offering the - * performance of a traditional mergesort when the input array is - * randomly ordered. If the input array is nearly sorted, the - * implementation requires approximately n comparisons. Temporary - * storage requirements vary from a small constant for nearly sorted - * input arrays to n/2 object references for randomly ordered input - * arrays. - * - *

      The implementation takes equal advantage of ascending and - * descending order in its input array, and can take advantage of - * ascending and descending order in different parts of the same - * input array. It is well-suited to merging two or more sorted arrays: - * simply concatenate the arrays and sort the resulting array. - * - *

      The implementation was adapted from Tim Peters's list sort for Python - * ( - * TimSort). It uses techniques from Peter McIlroy's "Optimistic - * Sorting and Information Theoretic Complexity", in Proceedings of the - * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474, - * January 1993. - * - *

      This implementation dumps the specified list into an array, sorts - * the array, and iterates over the list resetting each element - * from the corresponding position in the array. This avoids the - * n2 log(n) performance that would result from attempting - * to sort a linked list in place. + * @implNote + * This implementation defers to the {@link List#sort(Comparator)} + * method using the specified list and comparator. * * @param the class of the objects in the list * @param list the list to be sorted. @@ -223,16 +168,11 @@ public class Collections { * list-iterator does not support the {@code set} operation. * @throws IllegalArgumentException (optional) if the comparator is * found to violate the {@link Comparator} contract + * @see List#sort(Comparator) */ @SuppressWarnings({"unchecked", "rawtypes"}) public static void sort(List list, Comparator c) { - Object[] a = list.toArray(); - Arrays.sort(a, (Comparator)c); - ListIterator i = list.listIterator(); - for (Object e : a) { - i.next(); - i.set((T) e); - } + list.sort(c); } @@ -4464,10 +4404,12 @@ public class Collections { *

            *     List<String> s = Collections.emptyList();
            * 
      - * Implementation note: Implementations of this method need not - * create a separate List object for each call. Using this - * method is likely to have comparable cost to using the like-named - * field. (Unlike this method, the field does not provide type safety.) + * + * @implNote + * Implementations of this method need not create a separate List + * object for each call. Using this method is likely to have comparable + * cost to using the like-named field. (Unlike this method, the field does + * not provide type safety.) * * @param type of elements, if there were any, in the list * @return an empty immutable list diff --git a/jdk/src/share/classes/java/util/List.java b/jdk/src/share/classes/java/util/List.java index 5cbd044169b..80fe4be9229 100644 --- a/jdk/src/share/classes/java/util/List.java +++ b/jdk/src/share/classes/java/util/List.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -415,11 +415,49 @@ public interface List extends Collection { } /** - * Sorts this list using the supplied {@code Comparator} to compare elements. + * Sorts this list according to the order induced by the specified + * {@link Comparator}. + * + *

      All elements in this list must be mutually comparable using the + * specified comparator (that is, {@code c.compare(e1, e2)} must not throw + * a {@code ClassCastException} for any elements {@code e1} and {@code e2} + * in the list). + * + *

      If the specified comparator is {@code null} then all elements in this + * list must implement the {@link Comparable} interface and the elements' + * {@linkplain Comparable natural ordering} should be used. + * + *

      This list must be modifiable, but need not be resizable. * * @implSpec - * The default implementation is equivalent to, for this {@code list}: - *

      Collections.sort(list, c)
      + * The default implementation obtains an array containing all elements in + * this list, sorts the array, and iterates over this list resetting each + * element from the corresponding position in the array. (This avoids the + * n2 log(n) performance that would result from attempting + * to sort a linked list in place.) + * + * @implNote + * This implementation is a stable, adaptive, iterative mergesort that + * requires far fewer than n lg(n) comparisons when the input array is + * partially sorted, while offering the performance of a traditional + * mergesort when the input array is randomly ordered. If the input array + * is nearly sorted, the implementation requires approximately n + * comparisons. Temporary storage requirements vary from a small constant + * for nearly sorted input arrays to n/2 object references for randomly + * ordered input arrays. + * + *

      The implementation takes equal advantage of ascending and + * descending order in its input array, and can take advantage of + * ascending and descending order in different parts of the same + * input array. It is well-suited to merging two or more sorted arrays: + * simply concatenate the arrays and sort the resulting array. + * + *

      The implementation was adapted from Tim Peters's list sort for Python + * ( + * TimSort). It uses techniques from Peter McIlroy's "Optimistic + * Sorting and Information Theoretic Complexity", in Proceedings of the + * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474, + * January 1993. * * @param c the {@code Comparator} used to compare list elements. * A {@code null} value indicates that the elements' @@ -434,8 +472,15 @@ public interface List extends Collection { * contract * @since 1.8 */ + @SuppressWarnings({"unchecked", "rawtypes"}) default void sort(Comparator c) { - Collections.sort(this, c); + Object[] a = this.toArray(); + Arrays.sort(a, (Comparator) c); + ListIterator i = this.listIterator(); + for (Object e : a) { + i.next(); + i.set((E) e); + } } /** diff --git a/jdk/src/share/classes/java/util/jar/JarFile.java b/jdk/src/share/classes/java/util/jar/JarFile.java index 6e0a270470d..6e917e0ae26 100644 --- a/jdk/src/share/classes/java/util/jar/JarFile.java +++ b/jdk/src/share/classes/java/util/jar/JarFile.java @@ -53,6 +53,13 @@ import sun.misc.SharedSecrets; * or method in this class will cause a {@link NullPointerException} to be * thrown. * + * If the verify flag is on when opening a signed jar file, the content of the + * file is verified against its signature embedded inside the file. Please note + * that the verification process does not include validating the signer's + * certificate. A caller should inspect the return value of + * {@link JarEntry#getCodeSigners()} to further determine if the signature + * can be trusted. + * * @author David Connelly * @see Manifest * @see java.util.zip.ZipFile diff --git a/jdk/src/share/classes/java/util/jar/JarVerifier.java b/jdk/src/share/classes/java/util/jar/JarVerifier.java index ef1a26a6f45..875d51f7e25 100644 --- a/jdk/src/share/classes/java/util/jar/JarVerifier.java +++ b/jdk/src/share/classes/java/util/jar/JarVerifier.java @@ -179,7 +179,9 @@ class JarVerifier { name = name.substring(1); // only set the jev object for entries that have a signature - if (sigFileSigners.get(name) != null) { + // (either verified or not) + if (sigFileSigners.get(name) != null || + verifiedSigners.get(name) != null) { mev.setEntry(name, je); return; } diff --git a/jdk/src/share/classes/java/util/logging/LogManager.java b/jdk/src/share/classes/java/util/logging/LogManager.java index 4a5778b6c80..89bcca8ee1c 100644 --- a/jdk/src/share/classes/java/util/logging/LogManager.java +++ b/jdk/src/share/classes/java/util/logging/LogManager.java @@ -240,6 +240,11 @@ public class LogManager { * retrieved by calling LogManager.getLogManager. */ protected LogManager() { + this(checkSubclassPermissions()); + } + + private LogManager(Void checked) { + // Add a shutdown hook to close the global handlers. try { Runtime.getRuntime().addShutdownHook(new Cleaner()); @@ -249,6 +254,19 @@ public class LogManager { } } + private static Void checkSubclassPermissions() { + final SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + // These permission will be checked in the LogManager constructor, + // in order to register the Cleaner() thread as a shutdown hook. + // Check them here to avoid the penalty of constructing the object + // etc... + sm.checkPermission(new RuntimePermission("shutdownHooks")); + sm.checkPermission(new RuntimePermission("setContextClassLoader")); + } + return null; + } + /** * Lazy initialization: if this instance of manager is the global * manager then this method will read the initial configuration and diff --git a/jdk/src/share/classes/java/util/stream/DoubleStream.java b/jdk/src/share/classes/java/util/stream/DoubleStream.java index 163e5c42d93..bcbb3c15630 100644 --- a/jdk/src/share/classes/java/util/stream/DoubleStream.java +++ b/jdk/src/share/classes/java/util/stream/DoubleStream.java @@ -150,10 +150,11 @@ public interface DoubleStream extends BaseStream { /** * Returns a stream consisting of the results of replacing each element of - * this stream with the contents of the stream produced by applying the - * provided mapping function to each element. (If the result of the mapping - * function is {@code null}, this is treated as if the result was an empty - * stream.) + * this stream with the contents of a mapped stream produced by applying + * the provided mapping function to each element. Each mapped stream is + * {@link java.util.stream.BaseStream#close() closed} after its contents + * have been placed into this stream. (If a mapped stream is {@code null} + * an empty stream is used, instead.) * *

      This is an intermediate * operation. diff --git a/jdk/src/share/classes/java/util/stream/ForEachOps.java b/jdk/src/share/classes/java/util/stream/ForEachOps.java index 2c343fbc3c1..b527f054f4d 100644 --- a/jdk/src/share/classes/java/util/stream/ForEachOps.java +++ b/jdk/src/share/classes/java/util/stream/ForEachOps.java @@ -32,6 +32,7 @@ import java.util.concurrent.ForkJoinTask; import java.util.function.Consumer; import java.util.function.DoubleConsumer; import java.util.function.IntConsumer; +import java.util.function.IntFunction; import java.util.function.LongConsumer; /** @@ -317,12 +318,55 @@ final class ForEachOps { */ @SuppressWarnings("serial") static final class ForEachOrderedTask extends CountedCompleter { + /* + * Our goal is to ensure that the elements associated with a task are + * processed according to an in-order traversal of the computation tree. + * We use completion counts for representing these dependencies, so that + * a task does not complete until all the tasks preceding it in this + * order complete. We use the "completion map" to associate the next + * task in this order for any left child. We increase the pending count + * of any node on the right side of such a mapping by one to indicate + * its dependency, and when a node on the left side of such a mapping + * completes, it decrements the pending count of its corresponding right + * side. As the computation tree is expanded by splitting, we must + * atomically update the mappings to maintain the invariant that the + * completion map maps left children to the next node in the in-order + * traversal. + * + * Take, for example, the following computation tree of tasks: + * + * a + * / \ + * b c + * / \ / \ + * d e f g + * + * The complete map will contain (not necessarily all at the same time) + * the following associations: + * + * d -> e + * b -> f + * f -> g + * + * Tasks e, f, g will have their pending counts increased by 1. + * + * The following relationships hold: + * + * - completion of d "happens-before" e; + * - completion of d and e "happens-before b; + * - completion of b "happens-before" f; and + * - completion of f "happens-before" g + * + * Thus overall the "happens-before" relationship holds for the + * reporting of elements, covered by tasks d, e, f and g, as specified + * by the forEachOrdered operation. + */ + private final PipelineHelper helper; private Spliterator spliterator; private final long targetSize; private final ConcurrentHashMap, ForEachOrderedTask> completionMap; private final Sink action; - private final Object lock; private final ForEachOrderedTask leftPredecessor; private Node node; @@ -333,9 +377,9 @@ final class ForEachOps { this.helper = helper; this.spliterator = spliterator; this.targetSize = AbstractTask.suggestTargetSize(spliterator.estimateSize()); - this.completionMap = new ConcurrentHashMap<>(); + // Size map to avoid concurrent re-sizes + this.completionMap = new ConcurrentHashMap<>(Math.max(16, AbstractTask.LEAF_TARGET << 1)); this.action = action; - this.lock = new Object(); this.leftPredecessor = null; } @@ -348,7 +392,6 @@ final class ForEachOps { this.targetSize = parent.targetSize; this.completionMap = parent.completionMap; this.action = parent.action; - this.lock = parent.lock; this.leftPredecessor = leftPredecessor; } @@ -367,16 +410,42 @@ final class ForEachOps { new ForEachOrderedTask<>(task, leftSplit, task.leftPredecessor); ForEachOrderedTask rightChild = new ForEachOrderedTask<>(task, rightSplit, leftChild); + + // Fork the parent task + // Completion of the left and right children "happens-before" + // completion of the parent + task.addToPendingCount(1); + // Completion of the left child "happens-before" completion of + // the right child + rightChild.addToPendingCount(1); task.completionMap.put(leftChild, rightChild); - task.addToPendingCount(1); // forking - rightChild.addToPendingCount(1); // right pending on left child + + // If task is not on the left spine if (task.leftPredecessor != null) { - leftChild.addToPendingCount(1); // left pending on previous subtree, except left spine - if (task.completionMap.replace(task.leftPredecessor, task, leftChild)) - task.addToPendingCount(-1); // transfer my "right child" count to my left child - else - leftChild.addToPendingCount(-1); // left child is ready to go when ready + /* + * Completion of left-predecessor, or left subtree, + * "happens-before" completion of left-most leaf node of + * right subtree. + * The left child's pending count needs to be updated before + * it is associated in the completion map, otherwise the + * left child can complete prematurely and violate the + * "happens-before" constraint. + */ + leftChild.addToPendingCount(1); + // Update association of left-predecessor to left-most + // leaf node of right subtree + if (task.completionMap.replace(task.leftPredecessor, task, leftChild)) { + // If replaced, adjust the pending count of the parent + // to complete when its children complete + task.addToPendingCount(-1); + } else { + // Left-predecessor has already completed, parent's + // pending count is adjusted by left-predecessor; + // left child is ready to complete + leftChild.addToPendingCount(-1); + } } + ForEachOrderedTask taskToFork; if (forkRight) { forkRight = false; @@ -391,31 +460,49 @@ final class ForEachOps { } taskToFork.fork(); } - if (task.getPendingCount() == 0) { - task.helper.wrapAndCopyInto(task.action, rightSplit); - } - else { + + /* + * Task's pending count is either 0 or 1. If 1 then the completion + * map will contain a value that is task, and two calls to + * tryComplete are required for completion, one below and one + * triggered by the completion of task's left-predecessor in + * onCompletion. Therefore there is no data race within the if + * block. + */ + if (task.getPendingCount() > 0) { + // Cannot complete just yet so buffer elements into a Node + // for use when completion occurs + @SuppressWarnings("unchecked") + IntFunction generator = size -> (T[]) new Object[size]; Node.Builder nb = task.helper.makeNodeBuilder( - task.helper.exactOutputSizeIfKnown(rightSplit), - size -> (T[]) new Object[size]); + task.helper.exactOutputSizeIfKnown(rightSplit), + generator); task.node = task.helper.wrapAndCopyInto(nb, rightSplit).build(); + task.spliterator = null; } task.tryComplete(); } @Override public void onCompletion(CountedCompleter caller) { - spliterator = null; if (node != null) { - // Dump any data from this leaf into the sink - synchronized (lock) { - node.forEach(action); - } + // Dump buffered elements from this leaf into the sink + node.forEach(action); node = null; } - ForEachOrderedTask victim = completionMap.remove(this); - if (victim != null) - victim.tryComplete(); + else if (spliterator != null) { + // Dump elements output from this leaf's pipeline into the sink + helper.wrapAndCopyInto(action, spliterator); + spliterator = null; + } + + // The completion of this task *and* the dumping of elements + // "happens-before" completion of the associated left-most leaf task + // of right subtree (if any, which can be this task's right sibling) + // + ForEachOrderedTask leftDescendant = completionMap.remove(this); + if (leftDescendant != null) + leftDescendant.tryComplete(); } } } diff --git a/jdk/src/share/classes/java/util/stream/IntStream.java b/jdk/src/share/classes/java/util/stream/IntStream.java index 3030f46e662..f0fcc684fc1 100644 --- a/jdk/src/share/classes/java/util/stream/IntStream.java +++ b/jdk/src/share/classes/java/util/stream/IntStream.java @@ -146,10 +146,11 @@ public interface IntStream extends BaseStream { /** * Returns a stream consisting of the results of replacing each element of - * this stream with the contents of the stream produced by applying the - * provided mapping function to each element. (If the result of the mapping - * function is {@code null}, this is treated as if the result was an empty - * stream.) + * this stream with the contents of a mapped stream produced by applying + * the provided mapping function to each element. Each mapped stream is + * {@link java.util.stream.BaseStream#close() closed} after its contents + * have been placed into this stream. (If a mapped stream is {@code null} + * an empty stream is used, instead.) * *

      This is an intermediate * operation. diff --git a/jdk/src/share/classes/java/util/stream/LongStream.java b/jdk/src/share/classes/java/util/stream/LongStream.java index 983afef780d..d9828c538dc 100644 --- a/jdk/src/share/classes/java/util/stream/LongStream.java +++ b/jdk/src/share/classes/java/util/stream/LongStream.java @@ -151,10 +151,11 @@ public interface LongStream extends BaseStream { /** * Returns a stream consisting of the results of replacing each element of - * this stream with the contents of the stream produced by applying the - * provided mapping function to each element. (If the result of the mapping - * function is {@code null}, this is treated as if the result was an empty - * stream.) + * this stream with the contents of a mapped stream produced by applying + * the provided mapping function to each element. Each mapped stream is + * {@link java.util.stream.BaseStream#close() closed} after its contents + * have been placed into this stream. (If a mapped stream is {@code null} + * an empty stream is used, instead.) * *

      This is an intermediate * operation. diff --git a/jdk/src/share/classes/java/util/stream/Nodes.java b/jdk/src/share/classes/java/util/stream/Nodes.java index d69b9f61b1a..c18540c4e6e 100644 --- a/jdk/src/share/classes/java/util/stream/Nodes.java +++ b/jdk/src/share/classes/java/util/stream/Nodes.java @@ -63,7 +63,7 @@ final class Nodes { // IllegalArgumentException messages static final String BAD_SIZE = "Stream size exceeds max array size"; - @SuppressWarnings("raw") + @SuppressWarnings("rawtypes") private static final Node EMPTY_NODE = new EmptyNode.OfRef(); private static final Node.OfInt EMPTY_INT_NODE = new EmptyNode.OfInt(); private static final Node.OfLong EMPTY_LONG_NODE = new EmptyNode.OfLong(); @@ -956,6 +956,7 @@ final class Nodes { * Initiate a stack containing, in left-to-right order, the child nodes * covered by this spliterator */ + @SuppressWarnings("unchecked") protected final Deque initStack() { // Bias size to the case where leaf nodes are close to this node // 8 is the minimum initial capacity for the ArrayDeque implementation @@ -969,6 +970,7 @@ final class Nodes { * Depth first search, in left-to-right order, of the node tree, using * an explicit stack, to find the next non-empty leaf node. */ + @SuppressWarnings("unchecked") protected final N findNextLeafNode(Deque stack) { N n = null; while ((n = stack.pollFirst()) != null) { @@ -984,6 +986,7 @@ final class Nodes { return null; } + @SuppressWarnings("unchecked") protected final boolean initTryAdvance() { if (curNode == null) return false; @@ -1870,6 +1873,7 @@ final class Nodes { } assert task.offset + task.length < MAX_ARRAY_SIZE; + @SuppressWarnings("unchecked") T_SINK sink = (T_SINK) task; task.helper.wrapAndCopyInto(sink, rightSplit); task.propagateCompletion(); @@ -2173,6 +2177,7 @@ final class Nodes { } @Override + @SuppressWarnings("unchecked") protected T_NODE doLeaf() { T_BUILDER builder = builderFactory.apply(helper.exactOutputSizeIfKnown(spliterator)); return (T_NODE) helper.wrapAndCopyInto(builder, spliterator).build(); diff --git a/jdk/src/share/classes/java/util/stream/SortedOps.java b/jdk/src/share/classes/java/util/stream/SortedOps.java index 39e8092e7e8..7a646686d80 100644 --- a/jdk/src/share/classes/java/util/stream/SortedOps.java +++ b/jdk/src/share/classes/java/util/stream/SortedOps.java @@ -29,7 +29,6 @@ import java.util.Arrays; import java.util.Comparator; import java.util.Objects; import java.util.Spliterator; -import java.util.concurrent.ForkJoinTask; import java.util.function.IntFunction; @@ -113,7 +112,9 @@ final class SortedOps { StreamOpFlag.IS_ORDERED | StreamOpFlag.IS_SORTED); this.isNaturalSort = true; // Will throw CCE when we try to sort if T is not Comparable - this.comparator = (Comparator) Comparator.naturalOrder(); + @SuppressWarnings("unchecked") + Comparator comp = (Comparator) Comparator.naturalOrder(); + this.comparator = comp; } /** @@ -170,7 +171,7 @@ final class SortedOps { } @Override - public Sink opWrapSink(int flags, Sink sink) { + public Sink opWrapSink(int flags, Sink sink) { Objects.requireNonNull(sink); if (StreamOpFlag.SORTED.isKnown(flags)) @@ -291,6 +292,7 @@ final class SortedOps { } @Override + @SuppressWarnings("unchecked") public void begin(long size) { if (size >= Nodes.MAX_ARRAY_SIZE) throw new IllegalArgumentException(Nodes.BAD_SIZE); diff --git a/jdk/src/share/classes/java/util/stream/SpinedBuffer.java b/jdk/src/share/classes/java/util/stream/SpinedBuffer.java index 878b2c2899e..163692cf858 100644 --- a/jdk/src/share/classes/java/util/stream/SpinedBuffer.java +++ b/jdk/src/share/classes/java/util/stream/SpinedBuffer.java @@ -92,6 +92,7 @@ class SpinedBuffer * @throws IllegalArgumentException if the specified initial capacity * is negative */ + @SuppressWarnings("unchecked") SpinedBuffer(int initialCapacity) { super(initialCapacity); curChunk = (E[]) new Object[1 << initialChunkPower]; @@ -100,6 +101,7 @@ class SpinedBuffer /** * Constructs an empty list with an initial capacity of sixteen. */ + @SuppressWarnings("unchecked") SpinedBuffer() { super(); curChunk = (E[]) new Object[1 << initialChunkPower]; @@ -114,6 +116,7 @@ class SpinedBuffer : priorElementCount[spineIndex] + spine[spineIndex].length; } + @SuppressWarnings("unchecked") private void inflateSpine() { if (spine == null) { spine = (E[][]) new Object[MIN_SPINE_SIZE][]; @@ -125,6 +128,7 @@ class SpinedBuffer /** * Ensure that the buffer has at least capacity to hold the target size */ + @SuppressWarnings("unchecked") protected final void ensureCapacity(long targetSize) { long capacity = capacity(); if (targetSize > capacity) { diff --git a/jdk/src/share/classes/java/util/stream/Stream.java b/jdk/src/share/classes/java/util/stream/Stream.java index 966cd7913a0..c35fc056825 100644 --- a/jdk/src/share/classes/java/util/stream/Stream.java +++ b/jdk/src/share/classes/java/util/stream/Stream.java @@ -227,10 +227,11 @@ public interface Stream extends BaseStream> { /** * Returns a stream consisting of the results of replacing each element of - * this stream with the contents of the stream produced by applying the - * provided mapping function to each element. (If the result of the mapping - * function is {@code null}, this is treated as if the result was an empty - * stream.) + * this stream with the contents of a mapped stream produced by applying + * the provided mapping function to each element. Each mapped stream is + * {@link java.util.stream.BaseStream#close() closed} after its contents + * have been placed into this stream. (If a mapped stream is {@code null} + * an empty stream is used, instead.) * *

      This is an intermediate * operation. @@ -270,10 +271,11 @@ public interface Stream extends BaseStream> { /** * Returns an {@code IntStream} consisting of the results of replacing each - * element of this stream with the contents of the stream produced by - * applying the provided mapping function to each element. (If the result - * of the mapping function is {@code null}, this is treated as if the result - * was an empty stream.) + * element of this stream with the contents of a mapped stream produced by + * applying the provided mapping function to each element. Each mapped + * stream is {@link java.util.stream.BaseStream#close() closed} after its + * contents have been placed into this stream. (If a mapped stream is + * {@code null} an empty stream is used, instead.) * *

      This is an intermediate * operation. @@ -288,11 +290,12 @@ public interface Stream extends BaseStream> { IntStream flatMapToInt(Function mapper); /** - * Returns a {@code LongStream} consisting of the results of replacing each - * element of this stream with the contents of the stream produced - * by applying the provided mapping function to each element. (If the result - * of the mapping function is {@code null}, this is treated as if the result - * was an empty stream.) + * Returns an {@code LongStream} consisting of the results of replacing each + * element of this stream with the contents of a mapped stream produced by + * applying the provided mapping function to each element. Each mapped + * stream is {@link java.util.stream.BaseStream#close() closed} after its + * contents have been placed into this stream. (If a mapped stream is + * {@code null} an empty stream is used, instead.) * *

      This is an intermediate * operation. @@ -307,11 +310,12 @@ public interface Stream extends BaseStream> { LongStream flatMapToLong(Function mapper); /** - * Returns a {@code DoubleStream} consisting of the results of replacing each - * element of this stream with the contents of the stream produced - * by applying the provided mapping function to each element. (If the result - * of the mapping function is {@code null}, this is treated as if the result - * was an empty stream.) + * Returns an {@code DoubleStream} consisting of the results of replacing + * each element of this stream with the contents of a mapped stream produced + * by applying the provided mapping function to each element. Each mapped + * stream is {@link java.util.stream.BaseStream#close() closed} after its + * contents have placed been into this stream. (If a mapped stream is + * {@code null} an empty stream is used, instead.) * *

      This is an intermediate * operation. diff --git a/jdk/src/share/classes/java/util/stream/StreamSpliterators.java b/jdk/src/share/classes/java/util/stream/StreamSpliterators.java index 7322773fe87..67683425bfc 100644 --- a/jdk/src/share/classes/java/util/stream/StreamSpliterators.java +++ b/jdk/src/share/classes/java/util/stream/StreamSpliterators.java @@ -516,6 +516,7 @@ class StreamSpliterators { } @Override + @SuppressWarnings("unchecked") public T_SPLITR trySplit() { return (T_SPLITR) get().trySplit(); } @@ -643,6 +644,7 @@ class StreamSpliterators { // existing and additionally created F/J tasks that perform // redundant work on no elements. while (true) { + @SuppressWarnings("unchecked") T_SPLITR leftSplit = (T_SPLITR) s.trySplit(); if (leftSplit == null) return null; @@ -970,6 +972,7 @@ class StreamSpliterators { // Stop splitting when there are no more limit permits if (permits.get() == 0) return null; + @SuppressWarnings("unchecked") T_SPLITR split = (T_SPLITR) s.trySplit(); return split == null ? null : makeSpliterator(split); } @@ -1068,16 +1071,18 @@ class StreamSpliterators { super(s, skip, limit); } - OfPrimitive(T_SPLITR s, UnorderedSliceSpliterator.OfPrimitive parent) { + OfPrimitive(T_SPLITR s, UnorderedSliceSpliterator.OfPrimitive parent) { super(s, parent); } @Override public boolean tryAdvance(T_CONS action) { Objects.requireNonNull(action); + @SuppressWarnings("unchecked") + T_CONS consumer = (T_CONS) this; while (permitStatus() != PermitStatus.NO_MORE) { - if (!s.tryAdvance((T_CONS) this)) + if (!s.tryAdvance(consumer)) return false; else if (acquirePermits(1) == 1) { acceptConsumed(action); @@ -1316,7 +1321,7 @@ class StreamSpliterators { * estimate size is 0. * *

      The {@code forEachRemaining} method if invoked will never terminate. - * The {@coe tryAdvance} method always returns true. + * The {@code tryAdvance} method always returns true. * */ static abstract class InfiniteSupplyingSpliterator implements Spliterator { diff --git a/jdk/src/share/classes/java/util/stream/StreamSupport.java b/jdk/src/share/classes/java/util/stream/StreamSupport.java index 70af2da5e3b..9a1820cca28 100644 --- a/jdk/src/share/classes/java/util/stream/StreamSupport.java +++ b/jdk/src/share/classes/java/util/stream/StreamSupport.java @@ -54,7 +54,7 @@ public final class StreamSupport { * late-binding. Otherwise, * {@link #stream(java.util.function.Supplier, int, boolean)} should be used * to reduce the scope of potential interference with the source. See - * Non-Interference for + * Non-Interference for * more details. * * @param the type of stream elements @@ -89,7 +89,7 @@ public final class StreamSupport { * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See - * Non-Interference for + * Non-Interference for * more details. * * @param the type of stream elements @@ -125,7 +125,7 @@ public final class StreamSupport { * late-binding. Otherwise, * {@link #intStream(java.util.function.Supplier, int, boolean)} should be * used to reduce the scope of potential interference with the source. See - * Non-Interference for + * Non-Interference for * more details. * * @param spliterator a {@code Spliterator.OfInt} describing the stream elements @@ -158,7 +158,7 @@ public final class StreamSupport { * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See - * Non-Interference for + * Non-Interference for * more details. * * @param supplier a {@code Supplier} of a {@code Spliterator.OfInt} @@ -192,7 +192,7 @@ public final class StreamSupport { * late-binding. Otherwise, * {@link #longStream(java.util.function.Supplier, int, boolean)} should be * used to reduce the scope of potential interference with the source. See - * Non-Interference for + * Non-Interference for * more details. * * @param spliterator a {@code Spliterator.OfLong} describing the stream elements @@ -226,7 +226,7 @@ public final class StreamSupport { * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See - * Non-Interference for + * Non-Interference for * more details. * * @param supplier a {@code Supplier} of a {@code Spliterator.OfLong} @@ -260,7 +260,7 @@ public final class StreamSupport { * late-binding. Otherwise, * {@link #doubleStream(java.util.function.Supplier, int, boolean)} should * be used to reduce the scope of potential interference with the source. See - * Non-Interference for + * Non-Interference for * more details. * * @param spliterator A {@code Spliterator.OfDouble} describing the stream elements @@ -294,7 +294,7 @@ public final class StreamSupport { * source. Since the supplier is only invoked after the terminal operation * commences, any modifications to the source up to the start of the * terminal operation are reflected in the stream result. See - * Non-Interference for + * Non-Interference for * more details. * * @param supplier A {@code Supplier} of a {@code Spliterator.OfDouble} diff --git a/jdk/src/share/classes/java/util/stream/Streams.java b/jdk/src/share/classes/java/util/stream/Streams.java index 41f3adad592..072691aeccb 100644 --- a/jdk/src/share/classes/java/util/stream/Streams.java +++ b/jdk/src/share/classes/java/util/stream/Streams.java @@ -715,6 +715,7 @@ final class Streams { @Override public T_SPLITR trySplit() { + @SuppressWarnings("unchecked") T_SPLITR ret = beforeSplit ? aSpliterator : (T_SPLITR) bSpliterator.trySplit(); beforeSplit = false; return ret; diff --git a/jdk/src/share/classes/java/util/stream/package-info.java b/jdk/src/share/classes/java/util/stream/package-info.java index 810e2fc37f9..016c86dd382 100644 --- a/jdk/src/share/classes/java/util/stream/package-info.java +++ b/jdk/src/share/classes/java/util/stream/package-info.java @@ -206,7 +206,7 @@ * as {@link java.util.function.Function}, and are often lambda expressions or * method references. * - *

      Non-interference

      + *

      Non-interference

      * * Streams enable you to execute possibly-parallel aggregate operations over a * variety of data sources, including even non-thread-safe collections such as @@ -729,7 +729,7 @@ * modifications of the data source prior to commencement of the terminal * operation (provided the behavioral parameters to the stream operations meet * the required criteria for non-interference and statelessness). See - * Non-Interference + * Non-Interference * for more details. * * @since 1.8 diff --git a/jdk/src/share/classes/javax/accessibility/AccessibleContext.java b/jdk/src/share/classes/javax/accessibility/AccessibleContext.java index 036196cee4e..15f0f7f3983 100644 --- a/jdk/src/share/classes/javax/accessibility/AccessibleContext.java +++ b/jdk/src/share/classes/javax/accessibility/AccessibleContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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,7 +39,7 @@ import java.awt.IllegalComponentStateException; * obtaining more specific accessibility information about a component. * If the component supports them, these methods will return an object that * implements one or more of the following interfaces: - *

        + *
          *
        • {@link AccessibleAction} - the object can perform one or more actions. * This interface provides the standard mechanism for an assistive * technology to determine what those actions are and tell the object diff --git a/jdk/src/share/classes/javax/imageio/ImageWriter.java b/jdk/src/share/classes/javax/imageio/ImageWriter.java index 9c150b93de3..acb328d4215 100644 --- a/jdk/src/share/classes/javax/imageio/ImageWriter.java +++ b/jdk/src/share/classes/javax/imageio/ImageWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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,8 +53,6 @@ import javax.imageio.spi.ImageWriterSpi; * which uses them for format recognition and presentation of * available format readers and writers. * - *

          - * * @see ImageReader * @see ImageWriteParam * @see javax.imageio.spi.IIORegistry diff --git a/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java b/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java index 230f7203fc4..25ddf722e54 100644 --- a/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java +++ b/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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 @@ -54,7 +54,7 @@ import com.sun.imageio.plugins.bmp.BMPCompressionTypes; * listed in the following * table: * - *

    + *
    * * * diff --git a/jdk/src/share/classes/javax/imageio/stream/ImageInputStream.java b/jdk/src/share/classes/javax/imageio/stream/ImageInputStream.java index 822971f18a4..ac08c511f6e 100644 --- a/jdk/src/share/classes/javax/imageio/stream/ImageInputStream.java +++ b/jdk/src/share/classes/javax/imageio/stream/ImageInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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 @@ -446,7 +446,7 @@ public interface ImageInputStream extends DataInput, Closeable { * UTFDataFormatException is thrown. Otherwise, the * group is converted to the character: * - *

    
    +     * 
    
          * (char)(((a& 0x1F) << 6) | (b & 0x3F))
          * 
    * @@ -460,7 +460,7 @@ public interface ImageInputStream extends DataInput, Closeable { * UTFDataFormatException is thrown. Otherwise, the * group is converted to the character: * - *

    
    +     * 
    
          * (char)(((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F))
          * 
    * diff --git a/jdk/src/share/classes/javax/imageio/stream/ImageOutputStream.java b/jdk/src/share/classes/javax/imageio/stream/ImageOutputStream.java index 8deddd3b36b..e0248a1f3d4 100644 --- a/jdk/src/share/classes/javax/imageio/stream/ImageOutputStream.java +++ b/jdk/src/share/classes/javax/imageio/stream/ImageOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -379,7 +379,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * \u0001 through \u007f, it is * represented by one byte: * - *

    +     * 
          * (byte)c
          * 
    * @@ -388,7 +388,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * \u07ff, then it is represented by two bytes, * to be written in the order shown: * - *

    
    +     * 
    
          * (byte)(0xc0 | (0x1f & (c >> 6)))
          * (byte)(0x80 | (0x3f & c))
          * 
    @@ -397,7 +397,7 @@ public interface ImageOutputStream extends ImageInputStream, DataOutput { * \u0800 through uffff, then it is * represented by three bytes, to be written in the order shown: * - *

    
    +     * 
    
          * (byte)(0xe0 | (0x0f & (c >> 12)))
          * (byte)(0x80 | (0x3f & (c >> 6)))
          * (byte)(0x80 | (0x3f & c))
    diff --git a/jdk/src/share/classes/javax/print/Doc.java b/jdk/src/share/classes/javax/print/Doc.java
    index 187873135a8..d28a3e565ef 100644
    --- a/jdk/src/share/classes/javax/print/Doc.java
    +++ b/jdk/src/share/classes/javax/print/Doc.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2000, 2013, 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,12 +44,12 @@ import javax.print.attribute.DocAttributeSet;
      * in which the print data is available. A doc flavor designates the print
      * data format (a MIME type) and the representation class of the object
      * from which the print data comes.
    - * 

    + * *

  • * Obtain the print data representation object, which is an instance of the * doc flavor's representation class. The Print Job can then obtain the actual * print data from the representation object. - *

    + * *

  • * Obtain the printing attributes that specify additional characteristics of * the doc or that specify processing instructions to be applied to the doc. @@ -104,7 +104,6 @@ import javax.print.attribute.DocAttributeSet; * a stream does not mean that it will, with the implications that Doc * implementors which rely on the service to close them should create such * streams only in response to a request from the service. - *

    *


    */ public interface Doc { diff --git a/jdk/src/share/classes/javax/print/DocFlavor.java b/jdk/src/share/classes/javax/print/DocFlavor.java index 0cdcda324ea..1d5464edb10 100644 --- a/jdk/src/share/classes/javax/print/DocFlavor.java +++ b/jdk/src/share/classes/javax/print/DocFlavor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,7 +49,7 @@ import java.io.Serializable; * See * character encodings for more information on the character encodings * supported on the Java platform. - *

    + * *

  • * Representation class name. This specifies the fully-qualified name of * the class of the object from which the actual print data comes, as returned @@ -64,7 +64,7 @@ import java.io.Serializable; * also lets the DocPrintJob obtain an instance of the doc flavor's * representation class, from which the DocPrintJob then obtains * the actual print data. - *

    + * *


    *

    Client Formatted Print Data

    * There are two broad categories of print data, client formatted print data @@ -96,22 +96,22 @@ import java.io.Serializable; *
  • * Character array (char[]) -- The print data consists of the * Unicode characters in the array. - *

    + * *

  • * String -- * The print data consists of the Unicode characters in the string. - *

    + * *

  • * Character stream ({@link java.io.Reader java.io.Reader}) * -- The print data consists of the Unicode characters read from the stream * up to the end-of-stream. - *

    + * *

  • * Byte array (byte[]) -- The print data consists of the bytes in * the array. The bytes are encoded in the character set specified by the doc * flavor's MIME type. If the MIME type does not specify a character set, the * default character set is US-ASCII. - *

    + * *

  • * Byte stream ({@link java.io.InputStream java.io.InputStream}) -- * The print data consists of the bytes read from the stream up to the @@ -139,7 +139,7 @@ import java.io.Serializable; * To print such documents, let the client open an input stream on the URL * or file and use an input stream data flavor. * - *

    + * *


    *

    Default and Platform Encodings

    *

    @@ -179,11 +179,9 @@ import java.io.Serializable; * understood by this VM. * For common flavors, the pre-defined *HOST DocFlavors may be used. *

    - *

    * See * character encodings for more information on the character encodings * supported on the Java platform. - *

    *


    *

    Recommended DocFlavors

    *

    @@ -196,7 +194,6 @@ import java.io.Serializable; * constructor can be used to create an arbitrary doc flavor. *

      *
    • Preformatted text - *

      *

  • Compression Types
    Type String Description Image Types
    BI_RGB Uncompressed RLE {@literal <= } 8-bits/sample
    * * @@ -222,9 +219,9 @@ import java.io.Serializable; * In general, preformatted text print data is provided either in a character * oriented representation class (character array, String, Reader) or in a * byte oriented representation class (byte array, InputStream, URL). - *

    + * *

  • Preformatted page description language (PDL) documents - *

    + * *

  • MIME-TypeDescription
    * * @@ -245,9 +242,9 @@ import java.io.Serializable; *

    * In general, preformatted PDL print data is provided in a byte oriented * representation class (byte array, InputStream, URL). - *

    + * *

  • Preformatted images - *

    + * *

  • MIME-TypeDescription
    * * @@ -269,9 +266,9 @@ import java.io.Serializable; *

    * In general, preformatted image print data is provided in a byte oriented * representation class (byte array, InputStream, URL). - *

    + * *

  • Preformatted autosense print data - *

    + * *

  • MIME-TypeDescription
    * * @@ -287,7 +284,7 @@ import java.io.Serializable; * autosense print data is provided in a byte oriented representation class * (byte array, InputStream, URL). * - *

    + * *


    *

    Service Formatted Print Data

    *

    @@ -315,7 +312,7 @@ import java.io.Serializable; * {@link java.awt.image.renderable.RenderableImage RenderableImage}. The * printer calls methods * in that interface to obtain the image to be printed. - *

    + * *

  • * Printable object -- The client supplies an object that implements interface * {@link java.awt.print.Printable Printable}. @@ -323,7 +320,7 @@ import java.io.Serializable; * printed, one by one. * For each page, the printer supplies a graphics context, and whatever the * client draws in that graphics context gets printed. - *

    + * *

  • * Pageable object -- The client supplies an object that implements interface * {@link java.awt.print.Pageable Pageable}. The printer calls @@ -331,9 +328,9 @@ import java.io.Serializable; * For each page, the printer supplies a graphics context, and whatever * the client draws in that graphics context gets printed. * - *

    + * *


    - *

    + * *


    *

    Pre-defined Doc Flavors

    * A Java Print Service instance is not required to support the @@ -354,7 +351,7 @@ import java.io.Serializable; * ("text/plain; charset=us-ascii", "java.io.InputStream") *
    ·   * ("text/plain; charset=utf-8", "java.io.InputStream") - *

    + * *

  • * Renderable image objects. Specifically, the following doc flavor is * recommended to be supported: @@ -389,7 +386,7 @@ import java.io.Serializable; *

    * The client must itself perform all plain text print data formatting not * addressed by the above requirements. - *

    + * *

    Design Rationale

    *

    * Class DocFlavor in package javax.print.data is similar to class @@ -403,13 +400,13 @@ import java.io.Serializable; *

  • * The JPS API is designed to be used in Java profiles which do not support * AWT. - *

    + * *

  • * The implementation of class java.awt.datatransfer.DataFlavor * does not guarantee that equivalent data flavors will have the same * serialized representation. DocFlavor does, and can be used in services * which need this. - *

    + * *

  • * The implementation of class java.awt.datatransfer.DataFlavor * includes a human presentable name as part of the serialized representation. diff --git a/jdk/src/share/classes/javax/print/MultiDoc.java b/jdk/src/share/classes/javax/print/MultiDoc.java index a7ded912521..2d578bd253c 100644 --- a/jdk/src/share/classes/javax/print/MultiDoc.java +++ b/jdk/src/share/classes/javax/print/MultiDoc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -67,7 +67,7 @@ import java.io.IOException; * data from the print data representation object. Get the next multidoc from * the current multidoc, and repeat until there are no more. (The code example * above uses the interleaved pattern.) - *

    + * *

  • * The all-at-once pattern: Get the doc from the current multidoc, and * save the doc in a list. Get the next multidoc from the current multidoc, and diff --git a/jdk/src/share/classes/javax/print/MultiDocPrintJob.java b/jdk/src/share/classes/javax/print/MultiDocPrintJob.java index 07863ae7e85..6bf8410f701 100644 --- a/jdk/src/share/classes/javax/print/MultiDocPrintJob.java +++ b/jdk/src/share/classes/javax/print/MultiDocPrintJob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,7 +32,6 @@ import javax.print.attribute.PrintRequestAttributeSet; * Obtained from a MultiDocPrintService, a MultiDocPrintJob can print a * specified collection of documents as a single print job with a set of * job attributes. - *

    */ public interface MultiDocPrintJob extends DocPrintJob { diff --git a/jdk/src/share/classes/javax/print/PrintService.java b/jdk/src/share/classes/javax/print/PrintService.java index f70d19d6c6d..0b53a13d9d7 100644 --- a/jdk/src/share/classes/javax/print/PrintService.java +++ b/jdk/src/share/classes/javax/print/PrintService.java @@ -119,6 +119,7 @@ public interface PrintService { * Gets the value of the single specified service attribute. * This may be useful to clients which only need the value of one * attribute and want to minimize overhead. + * @param the type of the specified service attribute * @param category the category of a PrintServiceAttribute supported * by this service - may not be null. * @return the value of the supported attribute or null if the diff --git a/jdk/src/share/classes/javax/print/ServiceUI.java b/jdk/src/share/classes/javax/print/ServiceUI.java index 38439cc27a6..fee1e4529cf 100644 --- a/jdk/src/share/classes/javax/print/ServiceUI.java +++ b/jdk/src/share/classes/javax/print/ServiceUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -52,7 +52,6 @@ import sun.print.SunAlternateMedia; *for a user as well as allowing the user to select the print service to use *and specify choices such as paper size and number of copies. *

    - *

    * The dialogs are designed to work with pluggable print services though the * public APIs of those print services. *

    diff --git a/jdk/src/share/classes/javax/print/SimpleDoc.java b/jdk/src/share/classes/javax/print/SimpleDoc.java index 405faa00da5..8bb812a66f4 100644 --- a/jdk/src/share/classes/javax/print/SimpleDoc.java +++ b/jdk/src/share/classes/javax/print/SimpleDoc.java @@ -91,7 +91,10 @@ public final class SimpleDoc implements Doc { Class repClass = null; try { - repClass = Class.forName(flavor.getRepresentationClassName()); + String className = flavor.getRepresentationClassName(); + sun.reflect.misc.ReflectUtil.checkPackageAccess(className); + repClass = Class.forName(className, false, + Thread.currentThread().getContextClassLoader()); } catch (Throwable e) { throw new IllegalArgumentException("unknown representation class"); } diff --git a/jdk/src/share/classes/javax/print/StreamPrintServiceFactory.java b/jdk/src/share/classes/javax/print/StreamPrintServiceFactory.java index 30d2b0aeea3..3199dac2985 100644 --- a/jdk/src/share/classes/javax/print/StreamPrintServiceFactory.java +++ b/jdk/src/share/classes/javax/print/StreamPrintServiceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,7 +45,7 @@ import java.util.ServiceConfigurationError; *

    * This class is implemented by a service and located by the * implementation using the - * + * * SPI JAR File specification. *

    * Applications locate instances of this class by calling the diff --git a/jdk/src/share/classes/javax/print/attribute/AttributeSet.java b/jdk/src/share/classes/javax/print/attribute/AttributeSet.java index 0f90dbdeacd..350753a64e3 100644 --- a/jdk/src/share/classes/javax/print/attribute/AttributeSet.java +++ b/jdk/src/share/classes/javax/print/attribute/AttributeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -69,17 +69,17 @@ package javax.print.attribute; * A {@link DocAttributeSet DocAttributeSet}, containing {@link DocAttribute * DocAttribute}s, specifies the characteristics of an individual doc and the * print job settings to be applied to an individual doc. - *

    + * *

  • * A {@link PrintRequestAttributeSet PrintRequestAttributeSet}, containing * {@link PrintRequestAttribute PrintRequestAttribute}s, specifies the * settings * to be applied to a whole print job and to all the docs in the print job. - *

    + * *

  • * A {@link PrintJobAttributeSet PrintJobAttributeSet}, containing {@link * PrintJobAttribute PrintJobAttribute}s, reports the status of a print job. - *

    + * *

  • * A {@link PrintServiceAttributeSet PrintServiceAttributeSet}, containing * {@link PrintServiceAttribute PrintServiceAttribute}s, reports the status of @@ -103,7 +103,6 @@ package javax.print.attribute; * HashPrintRequestAttributeSet}, {@link HashPrintJobAttributeSet * HashPrintJobAttributeSet}, and {@link HashPrintServiceAttributeSet * HashPrintServiceAttributeSet}. - *

    * * @author Alan Kaminsky */ diff --git a/jdk/src/share/classes/javax/print/attribute/standard/Chromaticity.java b/jdk/src/share/classes/javax/print/attribute/standard/Chromaticity.java index 8e29e972b36..0cce5fde315 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/Chromaticity.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/Chromaticity.java @@ -1,6 +1,5 @@ - /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -42,7 +41,7 @@ import javax.print.attribute.PrintJobAttribute; * The table below shows the effects of specifying a Chromaticity attribute of * {@link #MONOCHROME MONOCHROME} or {@link #COLOR COLOR} * for a monochrome or color document. - *

    + * *

  • MIME-TypeDescription
    * * *
    @@ -79,9 +78,7 @@ import javax.print.attribute.PrintJobAttribute; *
    *

    - *

    * IPP Compatibility: Chromaticity is not an IPP attribute at present. - *

    * * @author Alan Kaminsky */ diff --git a/jdk/src/share/classes/javax/print/attribute/standard/Copies.java b/jdk/src/share/classes/javax/print/attribute/standard/Copies.java index 4ce350b65b7..55b8db8489b 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/Copies.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/Copies.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,17 +44,17 @@ import javax.print.attribute.PrintJobAttribute; *

  • * SINGLE_DOCUMENT -- The result will be n copies of a single output * document comprising all the input docs. - *

    + * *

  • * SINGLE_DOCUMENT_NEW_SHEET -- The result will be n copies of a single * output document comprising all the input docs, and the first impression of * each input doc will always start on a new media sheet. - *

    + * *

  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The result will be n copies of * the first input document, followed by n copies of the second input * document, . . . followed by n copies of the last input document. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The result will be the first input * document, the second input document, . . . the last input document, the group @@ -64,7 +64,6 @@ import javax.print.attribute.PrintJobAttribute; * IPP Compatibility: The integer value gives the IPP integer value. The * category name returned by getName() gives the IPP attribute * name. - *

    * * @author David Mendenhall * @author Alan Kamihensky diff --git a/jdk/src/share/classes/javax/print/attribute/standard/Fidelity.java b/jdk/src/share/classes/javax/print/attribute/standard/Fidelity.java index d73e8f57930..8db0c98366b 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/Fidelity.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/Fidelity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,7 +46,6 @@ import javax.print.attribute.PrintRequestAttribute; * returns the IPP string representation of the attribute value. * See RFC 2911 Section 15.1 for * a fuller description of the IPP fidelity attribute. - *

    * */ public final class Fidelity extends EnumSyntax diff --git a/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java b/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java index 65332e54e1c..413bc7d1f47 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -178,21 +178,21 @@ import javax.print.attribute.PrintJobAttribute; *

  • * SINGLE_DOCUMENT -- All the input docs will be bound together as one output * document with the specified binding. - *

    + * *

  • * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be bound together as one * output document with the specified binding, and the first impression of each * input doc will always start on a new media sheet. - *

    + * *

  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- Each input doc will be bound * separately with the specified binding. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- Each input doc will be bound separately * with the specified binding. * - *

    + * *

  • * If different docs have different bindings specified, then only two values of * {@link MultipleDocumentHandling MultipleDocumentHandling} make sense, and the @@ -202,7 +202,7 @@ import javax.print.attribute.PrintJobAttribute; *
  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- Each input doc will be bound * separately with its own specified binding. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- Each input doc will be bound separately * with its own specified binding. diff --git a/jdk/src/share/classes/javax/print/attribute/standard/JobKOctets.java b/jdk/src/share/classes/javax/print/attribute/standard/JobKOctets.java index f5b16307df9..b56e36edb2b 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/JobKOctets.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/JobKOctets.java @@ -65,7 +65,7 @@ import javax.print.attribute.PrintJobAttribute; * The size of a doc is computed based on the print data representation class as * specified by the doc's {@link javax.print.DocFlavor DocFlavor}, as * shown in the table below. - *

    + * * * * diff --git a/jdk/src/share/classes/javax/print/attribute/standard/JobState.java b/jdk/src/share/classes/javax/print/attribute/standard/JobState.java index 7b938abedac..1be9118e08d 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/JobState.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/JobState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -76,12 +76,12 @@ public class JobState extends EnumSyntax implements PrintJobAttribute { *
  • * The job is using, or is attempting to use, one or more purely software * processes that are analyzing, creating, or interpreting a PDL, etc. - *

    + * *

  • * The job is using, or is attempting to use, one or more hardware * devices that are interpreting a PDL, making marks on a medium, and/or * performing finishing, such as stapling, etc. - *

    + * *

  • * The printer has made the job ready for printing, but the output * device is not yet printing it, either because the job hasn't reached the diff --git a/jdk/src/share/classes/javax/print/attribute/standard/MediaName.java b/jdk/src/share/classes/javax/print/attribute/standard/MediaName.java index ebe2443db65..78ae6a82d0a 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/MediaName.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,7 +40,6 @@ import javax.print.attribute.EnumSyntax; *

    * IPP Compatibility: MediaName is a representation class for * values of the IPP "media" attribute which names media. - *

    * */ public class MediaName extends Media implements Attribute { diff --git a/jdk/src/share/classes/javax/print/attribute/standard/MediaSize.java b/jdk/src/share/classes/javax/print/attribute/standard/MediaSize.java index 1d6677fb674..e50960e5060 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/MediaSize.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaSize.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -288,7 +288,6 @@ public class MediaSize extends Size2DSyntax implements Attribute { /** * Class MediaSize.ISO includes {@link MediaSize MediaSize} values for ISO * media. - *

    */ public final static class ISO { /** diff --git a/jdk/src/share/classes/javax/print/attribute/standard/MediaSizeName.java b/jdk/src/share/classes/javax/print/attribute/standard/MediaSizeName.java index 2fbcfb0a2d4..8dae36f9783 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/MediaSizeName.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaSizeName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,6 @@ import javax.print.attribute.Attribute; * values of the IPP "media" attribute which names media sizes. * The names of the media sizes correspond to those in the IPP 1.1 RFC * RFC 2911 - *

    * */ public class MediaSizeName extends Media { diff --git a/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java b/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java index 9acda4fafd8..318a2e7c778 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -42,8 +42,6 @@ import javax.print.attribute.EnumSyntax; *

    * IPP Compatibility: MediaTray is a representation class for * values of the IPP "media" attribute which name paper trays. - *

    - * */ public class MediaTray extends Media implements Attribute { diff --git a/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java b/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java index 30f4fe0a5f0..0ddbbe5d296 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -51,7 +51,7 @@ import javax.print.attribute.PrintJobAttribute; * single output document to produce. The MultipleDocumentHandling values * SINGLE_DOCUMENT and SINGLE_DOCUMENT_NEW_SHEET specify two variations of * this possibility. - *

    + * *

  • * The multiple input documents remain separate output documents. Finishing * operations ({@link Finishings Finishings}), @@ -83,7 +83,7 @@ import javax.print.attribute.PrintJobAttribute; * sheets resulting from processing the document data must be * a(*),b(*),a(*),b(*),..., and the printer object must force * each copy (a(*),b(*)) to start on a new media sheet. - *

    + * *

  • * {@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES}. If a print job @@ -96,7 +96,7 @@ import javax.print.attribute.PrintJobAttribute; * If more than one copy is made, the ordering of the sets of media sheets * resulting from processing the document data must be * a(*),a(*),...,b(*),b(*).... - *

    + * *

  • * {@link #SEPARATE_DOCUMENTS_COLLATED_COPIES * SEPARATE_DOCUMENTS_COLLATED_COPIES}. If a print job @@ -109,7 +109,7 @@ import javax.print.attribute.PrintJobAttribute; * If more than one copy is made, the ordering of the sets of media sheets * resulting from processing the document data must be * a(*),b(*),a(*),b(*),.... - *

    + * *

  • * {@link #SINGLE_DOCUMENT_NEW_SHEET * SINGLE_DOCUMENT_NEW_SHEET}. Same as SINGLE_DOCUMENT, @@ -132,12 +132,12 @@ import javax.print.attribute.PrintJobAttribute; *
  • * With SINGLE_DOCUMENT, documents a and b are * stapled together as a single document with no regard to new sheets. - *

    + * *

  • * With SINGLE_DOCUMENT_NEW_SHEET, documents a and b * are stapled together as a single document, but document b * starts on a new sheet. - *

    + * *

  • * With SEPARATE_DOCUMENTS_UNCOLLATED_COPIES and * SEPARATE_DOCUMENTS_COLLATED_COPIES, documents a and diff --git a/jdk/src/share/classes/javax/print/attribute/standard/NumberUp.java b/jdk/src/share/classes/javax/print/attribute/standard/NumberUp.java index 178c303dd7d..d029d82faa8 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/NumberUp.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/NumberUp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -56,7 +56,7 @@ import javax.print.attribute.PrintJobAttribute; * SINGLE_DOCUMENT -- All the input docs will be combined together into one * output document. Each media impression will consist of nm * print-stream pages from the output document. - *

    + * *

  • * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together * into one output document. Each media impression will consist of n @@ -64,7 +64,7 @@ import javax.print.attribute.PrintJobAttribute; * each input doc will always start on a new media sheet; this means the last * impression of an input doc may have fewer than n print-stream pages * on it. - *

    + * *

  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate. * Each media impression will consist of n print-stream pages from the @@ -72,7 +72,7 @@ import javax.print.attribute.PrintJobAttribute; * input doc will always start on a new media sheet; this means the last * impression of an input doc may have fewer than n print-stream pages on * it. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate. * Each media impression will consist of n print-stream pages from the @@ -91,7 +91,7 @@ import javax.print.attribute.PrintJobAttribute; * the first print-stream page of the next input doc goes at the start of the * next media impression, possibly leaving fewer than the full number of * print-stream pages on the previous media impression. - *

    + * *

  • * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together * into one output document. Each media impression will consist of n @@ -99,7 +99,7 @@ import javax.print.attribute.PrintJobAttribute; * each input doc will always start on a new media sheet; this means the last * impression of an input doc may have fewer than n print-stream pages * on it. - *

    + * *

  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate. * For input doc i, each media impression will consist of @@ -107,7 +107,7 @@ import javax.print.attribute.PrintJobAttribute; * docs are separate, the first impression of each input doc will always start * on a new media sheet; this means the last impression of an input doc may have * fewer than ni print-stream pages on it. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate. * For input doc i, each media impression will consist of @@ -120,7 +120,6 @@ import javax.print.attribute.PrintJobAttribute; * IPP Compatibility: The integer value gives the IPP integer value. * The category name returned by getName() gives the IPP * attribute name. - *

    * * @author Alan Kaminsky */ diff --git a/jdk/src/share/classes/javax/print/attribute/standard/PageRanges.java b/jdk/src/share/classes/javax/print/attribute/standard/PageRanges.java index f84290c624e..6038f0bb534 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/PageRanges.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/PageRanges.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -68,17 +68,17 @@ import javax.print.attribute.PrintJobAttribute; * SINGLE_DOCUMENT -- All the input docs will be combined together into one * output document. The specified page ranges of that output document will be * printed. - *

    + * *

  • * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together * into one output document, and the first impression of each input doc will * always start on a new media sheet. The specified page ranges of that output * document will be printed. - *

    + * *

  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- For each separate input doc, the * specified page ranges will be printed. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- For each separate input doc, the * specified page ranges will be printed. @@ -87,7 +87,7 @@ import javax.print.attribute.PrintJobAttribute; *
  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- For each separate input doc, its own * specified page ranges will be printed.. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- For each separate input doc, its own * specified page ranges will be printed.. @@ -100,7 +100,6 @@ import javax.print.attribute.PrintJobAttribute; * javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an * explanation of canonical array form. The category name returned by * getName() gives the IPP attribute name. - *

    * * @author David Mendenhall * @author Alan Kaminsky diff --git a/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java b/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java index 8d507d54389..8cedd1517f8 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,7 +45,6 @@ import javax.print.attribute.PrintServiceAttribute; * to find out more information about this specific printer rather than this * general kind of printer. *

    - *

    * IPP Compatibility: The string form returned by * toString() gives the IPP uri value. * The category name returned by getName() diff --git a/jdk/src/share/classes/javax/print/attribute/standard/PrinterResolution.java b/jdk/src/share/classes/javax/print/attribute/standard/PrinterResolution.java index e4ad0486496..795ee5e860d 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterResolution.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterResolution.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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,7 +44,7 @@ import javax.print.attribute.PrintJobAttribute; * an instance of class PrinterResolution indicating the exact resolution the * client wants. Only printers supporting that exact resolution will match the * search. - *

    + * *

  • * When a client needs to print a job using the client's desired resolution * exactly (no more, no less), the client specifies an instance of class @@ -60,7 +60,6 @@ import javax.print.attribute.PrintJobAttribute; * In some cases this may be more simply achieved by specifying a * PrintQuality attribute which often controls resolution. *

    - *

    * IPP Compatibility: The information needed to construct an IPP * "printer-resolution" attribute can be obtained by calling * methods on the PrinterResolution object. The category name returned by diff --git a/jdk/src/share/classes/javax/print/attribute/standard/SheetCollate.java b/jdk/src/share/classes/javax/print/attribute/standard/SheetCollate.java index 5b95f370e50..92095a1a16b 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/SheetCollate.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/SheetCollate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -77,7 +77,7 @@ import javax.print.attribute.PrintJobAttribute; * combined into one output document. Multiple copies of the output document * will be produced with pages in collated order, i.e. pages 1, 2, 3, . . ., * 1, 2, 3, . . . - *

    + * *

  • * SheetCollate = COLLATED, {@link MultipleDocumentHandling * MultipleDocumentHandling} = SINGLE_DOCUMENT_NEW_SHEET -- All the input docs @@ -85,7 +85,7 @@ import javax.print.attribute.PrintJobAttribute; * input doc will always start on a new media sheet. Multiple copies of the * output document will be produced with pages in collated order, i.e. pages * 1, 2, 3, . . ., 1, 2, 3, . . . - *

    + * *

  • * SheetCollate = COLLATED, {@link MultipleDocumentHandling * MultipleDocumentHandling} = SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- Each @@ -94,7 +94,7 @@ import javax.print.attribute.PrintJobAttribute; * pages in collated order, but the documents themselves in uncollated order, * i.e. pages A1, A2, A3, . . ., A1, A2, A3, . . ., B1, B2, B3, . . ., B1, B2, * B3, . . . - *

    + * *

  • * SheetCollate = COLLATED, {@link MultipleDocumentHandling * MultipleDocumentHandling} = SEPARATE_DOCUMENTS_COLLATED_COPIES -- Each input @@ -103,14 +103,14 @@ import javax.print.attribute.PrintJobAttribute; * in collated order, with the documents themselves also in collated order, i.e. * pages A1, A2, A3, . . ., B1, B2, B3, . . ., A1, A2, A3, . . ., B1, B2, B3, * . . . - *

    + * *

  • * SheetCollate = UNCOLLATED, {@link MultipleDocumentHandling * MultipleDocumentHandling} = SINGLE_DOCUMENT -- All the input docs will be * combined into one output document. Multiple copies of the output document * will be produced with pages in uncollated order, i.e. pages 1, 1, . . ., * 2, 2, . . ., 3, 3, . . . - *

    + * *

  • * SheetCollate = UNCOLLATED, {@link MultipleDocumentHandling * MultipleDocumentHandling} = SINGLE_DOCUMENT_NEW_SHEET -- All the input docs @@ -118,7 +118,7 @@ import javax.print.attribute.PrintJobAttribute; * input doc will always start on a new media sheet. Multiple copies of the * output document will be produced with pages in uncollated order, i.e. pages * 1, 1, . . ., 2, 2, . . ., 3, 3, . . . - *

    + * *

  • * SheetCollate = UNCOLLATED, {@link MultipleDocumentHandling * MultipleDocumentHandling} = SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- Each @@ -128,7 +128,7 @@ import javax.print.attribute.PrintJobAttribute; * order, i.e. pages A1, A1, . . ., A2, A2, . . ., A3, A3, . . ., B1, B1, . . ., * B2, B2, . . ., B3, B3, . . . * - *

    + * *

  • * If different docs have different sheet collations specified, then only one * value of {@link MultipleDocumentHandling MultipleDocumentHandling} is diff --git a/jdk/src/share/classes/javax/print/attribute/standard/Sides.java b/jdk/src/share/classes/javax/print/attribute/standard/Sides.java index 93fed683e51..664f07d03dc 100644 --- a/jdk/src/share/classes/javax/print/attribute/standard/Sides.java +++ b/jdk/src/share/classes/javax/print/attribute/standard/Sides.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -51,21 +51,21 @@ import javax.print.attribute.PrintJobAttribute; * SINGLE_DOCUMENT -- All the input docs will be combined together into one * output document. Each media sheet will consist of n impressions from * the output document. - *

    + * *

  • * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together * into one output document. Each media sheet will consist of n * impressions from the output document. However, the first impression of each * input doc will always start on a new media sheet; this means the last media * sheet of an input doc may have only one impression on it. - *

    + * *

  • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate. * Each media sheet will consist of n impressions from the input doc. * Since the input docs are separate, the first impression of each input doc * will always start on a new media sheet; this means the last media sheet of * an input doc may have only one impression on it. - *

    + * *

  • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate. * Each media sheet will consist of n impressions from the input doc. @@ -73,7 +73,7 @@ import javax.print.attribute.PrintJobAttribute; * will always start on a new media sheet; this means the last media sheet of * an input doc may have only one impression on it. * - *

    + * *

      *
    • * SINGLE_DOCUMENT -- All the input docs will be combined together into one @@ -83,14 +83,14 @@ import javax.print.attribute.PrintJobAttribute; * input doc has a different sides value from the previous input doc, the first * print-stream page of the next input doc goes at the start of the next media * sheet, possibly leaving only one impression on the previous media sheet. - *

      + * *

    • * SINGLE_DOCUMENT_NEW_SHEET -- All the input docs will be combined together * into one output document. Each media sheet will consist of n * impressions from the output document. However, the first impression of each * input doc will always start on a new media sheet; this means the last * impression of an input doc may have only one impression on it. - *

      + * *

    • * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES -- The input docs will remain separate. * For input doc i, each media sheet will consist of ni @@ -98,7 +98,7 @@ import javax.print.attribute.PrintJobAttribute; * impression of each input doc will always start on a new media sheet; this * means the last media sheet of an input doc may have only one impression on * it. - *

      + * *

    • * SEPARATE_DOCUMENTS_COLLATED_COPIES -- The input docs will remain separate. * For input doc i, each media sheet will consist of ni @@ -113,7 +113,6 @@ import javax.print.attribute.PrintJobAttribute; * getName() is the IPP attribute name. The enumeration's * integer value is the IPP enum value. The toString() method * returns the IPP string representation of the attribute value. - *

      * * @author Alan Kaminsky */ diff --git a/jdk/src/share/classes/javax/security/auth/Policy.java b/jdk/src/share/classes/javax/security/auth/Policy.java index 607bf40aca8..97d08a7ccc0 100644 --- a/jdk/src/share/classes/javax/security/auth/Policy.java +++ b/jdk/src/share/classes/javax/security/auth/Policy.java @@ -26,6 +26,10 @@ package javax.security.auth; import java.security.Security; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedExceptionAction; +import java.util.Objects; import sun.security.util.Debug; /** @@ -155,22 +159,15 @@ import sun.security.util.Debug; public abstract class Policy { private static Policy policy; - private static ClassLoader contextClassLoader; private final static String AUTH_POLICY = "sun.security.provider.AuthPolicyFile"; + private final java.security.AccessControlContext acc = + java.security.AccessController.getContext(); + // true if a custom (not AUTH_POLICY) system-wide policy object is set private static boolean isCustomPolicy; - static { - contextClassLoader = java.security.AccessController.doPrivileged - (new java.security.PrivilegedAction() { - public ClassLoader run() { - return Thread.currentThread().getContextClassLoader(); - } - }); - }; - /** * Sole constructor. (For invocation by subclass constructors, typically * implicit.) @@ -213,8 +210,8 @@ public abstract class Policy { if (policy == null) { String policy_class = null; - policy_class = java.security.AccessController.doPrivileged - (new java.security.PrivilegedAction() { + policy_class = AccessController.doPrivileged + (new PrivilegedAction() { public String run() { return java.security.Security.getProperty ("auth.policy.provider"); @@ -226,18 +223,28 @@ public abstract class Policy { try { final String finalClass = policy_class; - policy = java.security.AccessController.doPrivileged - (new java.security.PrivilegedExceptionAction() { - public Policy run() throws ClassNotFoundException, - InstantiationException, - IllegalAccessException { - return (Policy) Class.forName - (finalClass, - true, - contextClassLoader).newInstance(); - } - }); - isCustomPolicy = !finalClass.equals(AUTH_POLICY); + + Policy untrustedImpl = AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Policy run() throws ClassNotFoundException, + InstantiationException, + IllegalAccessException { + Class implClass = Class.forName( + finalClass, false, + Thread.currentThread().getContextClassLoader() + ).asSubclass(Policy.class); + return implClass.newInstance(); + } + }); + AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Void run() { + setPolicy(untrustedImpl); + isCustomPolicy = !finalClass.equals(AUTH_POLICY); + return null; + } + }, Objects.requireNonNull(untrustedImpl.acc) + ); } catch (Exception e) { throw new SecurityException (sun.security.util.ResourcesMgr.getString diff --git a/jdk/src/share/classes/javax/security/auth/Subject.java b/jdk/src/share/classes/javax/security/auth/Subject.java index 23ffd229534..23197b79935 100644 --- a/jdk/src/share/classes/javax/security/auth/Subject.java +++ b/jdk/src/share/classes/javax/security/auth/Subject.java @@ -964,6 +964,10 @@ public final class Subject implements java.io.Serializable { s.defaultReadObject(); + // Rewrap the principals into a SecureSet + principals = Collections.synchronizedSet(new SecureSet + (this, PRINCIPAL_SET, principals)); + // The Credential {@code Set} is not serialized, but we do not // want the default deserialization routine to set it to null. this.pubCredentials = Collections.synchronizedSet diff --git a/jdk/src/share/classes/javax/security/auth/login/Configuration.java b/jdk/src/share/classes/javax/security/auth/login/Configuration.java index c74901bd3ba..6d442cfcdc2 100644 --- a/jdk/src/share/classes/javax/security/auth/login/Configuration.java +++ b/jdk/src/share/classes/javax/security/auth/login/Configuration.java @@ -27,9 +27,6 @@ package javax.security.auth.login; import javax.security.auth.AuthPermission; -import java.io.*; -import java.util.*; -import java.net.URI; import java.security.AccessController; import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; @@ -38,7 +35,7 @@ import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; -import java.security.SecurityPermission; +import java.util.Objects; import sun.security.jca.GetInstance; @@ -191,16 +188,9 @@ import sun.security.jca.GetInstance; public abstract class Configuration { private static Configuration configuration; - private static ClassLoader contextClassLoader; - static { - contextClassLoader = AccessController.doPrivileged - (new PrivilegedAction() { - public ClassLoader run() { - return Thread.currentThread().getContextClassLoader(); - } - }); - }; + private final java.security.AccessControlContext acc = + java.security.AccessController.getContext(); private static void checkPermission(String type) { SecurityManager sm = System.getSecurityManager(); @@ -253,17 +243,26 @@ public abstract class Configuration { try { final String finalClass = config_class; - configuration = AccessController.doPrivileged - (new PrivilegedExceptionAction() { - public Configuration run() throws ClassNotFoundException, - InstantiationException, - IllegalAccessException { - return (Configuration)Class.forName - (finalClass, - true, - contextClassLoader).newInstance(); - } - }); + Configuration untrustedImpl = AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Configuration run() throws ClassNotFoundException, + InstantiationException, + IllegalAccessException { + Class implClass = Class.forName( + finalClass, false, + Thread.currentThread().getContextClassLoader() + ).asSubclass(Configuration.class); + return implClass.newInstance(); + } + }); + AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Void run() { + setConfiguration(untrustedImpl); + return null; + } + }, Objects.requireNonNull(untrustedImpl.acc) + ); } catch (PrivilegedActionException e) { Exception ee = e.getException(); if (ee instanceof InstantiationException) { diff --git a/jdk/src/share/classes/javax/security/auth/login/LoginContext.java b/jdk/src/share/classes/javax/security/auth/login/LoginContext.java index ba18e5ce6a0..88510714060 100644 --- a/jdk/src/share/classes/javax/security/auth/login/LoginContext.java +++ b/jdk/src/share/classes/javax/security/auth/login/LoginContext.java @@ -209,8 +209,7 @@ public class LoginContext { private Map state = new HashMap(); private Configuration config; - private boolean configProvided = false; - private AccessControlContext creatorAcc = null; + private AccessControlContext creatorAcc = null; // customized config only private ModuleInfo[] moduleStack; private ClassLoader contextClassLoader = null; private static final Class[] PARAMS = { }; @@ -229,7 +228,7 @@ public class LoginContext { private void init(String name) throws LoginException { SecurityManager sm = System.getSecurityManager(); - if (sm != null && !configProvided) { + if (sm != null && creatorAcc == null) { sm.checkPermission(new AuthPermission ("createLoginContext." + name)); } @@ -252,7 +251,7 @@ public class LoginContext { AppConfigurationEntry[] entries = config.getAppConfigurationEntry(name); if (entries == null) { - if (sm != null && !configProvided) { + if (sm != null && creatorAcc == null) { sm.checkPermission(new AuthPermission ("createLoginContext." + OTHER)); } @@ -279,7 +278,15 @@ public class LoginContext { contextClassLoader = java.security.AccessController.doPrivileged (new java.security.PrivilegedAction() { public ClassLoader run() { - return Thread.currentThread().getContextClassLoader(); + ClassLoader loader = + Thread.currentThread().getContextClassLoader(); + if (loader == null) { + // Don't use bootstrap class loader directly to ensure + // proper package access control! + loader = ClassLoader.getSystemClassLoader(); + } + + return loader; } }); } @@ -298,10 +305,10 @@ public class LoginContext { (DEFAULT_HANDLER); if (defaultHandler == null || defaultHandler.length() == 0) return null; - Class c = Class.forName(defaultHandler, - true, - finalLoader); - return (CallbackHandler)c.newInstance(); + Class c = Class.forName( + defaultHandler, true, + finalLoader).asSubclass(CallbackHandler.class); + return c.newInstance(); } }); } catch (java.security.PrivilegedActionException pae) { @@ -309,7 +316,7 @@ public class LoginContext { } // secure it with the caller's ACC - if (this.callbackHandler != null && !configProvided) { + if (this.callbackHandler != null && creatorAcc == null) { this.callbackHandler = new SecureCallbackHandler (java.security.AccessController.getContext(), this.callbackHandler); @@ -498,8 +505,7 @@ public class LoginContext { CallbackHandler callbackHandler, Configuration config) throws LoginException { this.config = config; - configProvided = (config != null) ? true : false; - if (configProvided) { + if (config != null) { creatorAcc = java.security.AccessController.getContext(); } @@ -510,7 +516,7 @@ public class LoginContext { } if (callbackHandler == null) { loadDefaultCallbackHandler(); - } else if (!configProvided) { + } else if (creatorAcc == null) { this.callbackHandler = new SecureCallbackHandler (java.security.AccessController.getContext(), callbackHandler); @@ -577,23 +583,13 @@ public class LoginContext { } try { - if (configProvided) { - // module invoked in doPrivileged with creatorAcc - invokeCreatorPriv(LOGIN_METHOD); - invokeCreatorPriv(COMMIT_METHOD); - } else { - // module invoked in doPrivileged - invokePriv(LOGIN_METHOD); - invokePriv(COMMIT_METHOD); - } + // module invoked in doPrivileged + invokePriv(LOGIN_METHOD); + invokePriv(COMMIT_METHOD); loginSucceeded = true; } catch (LoginException le) { try { - if (configProvided) { - invokeCreatorPriv(ABORT_METHOD); - } else { - invokePriv(ABORT_METHOD); - } + invokePriv(ABORT_METHOD); } catch (LoginException le2) { throw le; } @@ -628,13 +624,8 @@ public class LoginContext { ("null.subject.logout.called.before.login")); } - if (configProvided) { - // module invoked in doPrivileged with creatorAcc - invokeCreatorPriv(LOGOUT_METHOD); - } else { - // module invoked in doPrivileged - invokePriv(LOGOUT_METHOD); - } + // module invoked in doPrivileged + invokePriv(LOGOUT_METHOD); } /** @@ -677,35 +668,13 @@ public class LoginContext { /** * Invokes the login, commit, and logout methods - * from a LoginModule inside a doPrivileged block. + * from a LoginModule inside a doPrivileged block restricted + * by creatorAcc (may be null). * * This version is called if the caller did not instantiate * the LoginContext with a Configuration object. */ private void invokePriv(final String methodName) throws LoginException { - try { - java.security.AccessController.doPrivileged - (new java.security.PrivilegedExceptionAction() { - public Void run() throws LoginException { - invoke(methodName); - return null; - } - }); - } catch (java.security.PrivilegedActionException pae) { - throw (LoginException)pae.getException(); - } - } - - /** - * Invokes the login, commit, and logout methods - * from a LoginModule inside a doPrivileged block restricted - * by creatorAcc - * - * This version is called if the caller instantiated - * the LoginContext with a Configuration object. - */ - private void invokeCreatorPriv(final String methodName) - throws LoginException { try { java.security.AccessController.doPrivileged (new java.security.PrivilegedExceptionAction() { @@ -735,24 +704,24 @@ public class LoginContext { } else { // instantiate the LoginModule - Class c = Class.forName - (moduleStack[i].entry.getLoginModuleName(), + // + // Allow any object to be a LoginModule as long as it + // conforms to the interface. + Class c = Class.forName( + moduleStack[i].entry.getLoginModuleName(), true, contextClassLoader); Constructor constructor = c.getConstructor(PARAMS); Object[] args = { }; - - // allow any object to be a LoginModule - // as long as it conforms to the interface moduleStack[i].module = constructor.newInstance(args); - methods = moduleStack[i].module.getClass().getMethods(); - // call the LoginModule's initialize method + methods = moduleStack[i].module.getClass().getMethods(); for (mIndex = 0; mIndex < methods.length; mIndex++) { - if (methods[mIndex].getName().equals(INIT_METHOD)) + if (methods[mIndex].getName().equals(INIT_METHOD)) { break; + } } Object[] initArgs = {subject, @@ -760,19 +729,28 @@ public class LoginContext { state, moduleStack[i].entry.getOptions() }; // invoke the LoginModule initialize method + // + // Throws ArrayIndexOutOfBoundsException if no such + // method defined. May improve to use LoginException in + // the future. methods[mIndex].invoke(moduleStack[i].module, initArgs); } // find the requested method in the LoginModule for (mIndex = 0; mIndex < methods.length; mIndex++) { - if (methods[mIndex].getName().equals(methodName)) + if (methods[mIndex].getName().equals(methodName)) { break; + } } // set up the arguments to be passed to the LoginModule method Object[] args = { }; // invoke the LoginModule method + // + // Throws ArrayIndexOutOfBoundsException if no such + // method defined. May improve to use LoginException in + // the future. boolean status = ((Boolean)methods[mIndex].invoke (moduleStack[i].module, args)).booleanValue(); diff --git a/jdk/src/share/classes/javax/sound/sampled/AudioInputStream.java b/jdk/src/share/classes/javax/sound/sampled/AudioInputStream.java index 7eed02602e3..ea4162fa2f3 100644 --- a/jdk/src/share/classes/javax/sound/sampled/AudioInputStream.java +++ b/jdk/src/share/classes/javax/sound/sampled/AudioInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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 @@ -193,7 +193,6 @@ public class AudioInputStream extends InputStream { * @see #read(byte[], int, int) * @see #read(byte[]) * @see #available - *

      */ public int read() throws IOException { if( frameSize != 1 ) { diff --git a/jdk/src/share/classes/javax/sound/sampled/AudioPermission.java b/jdk/src/share/classes/javax/sound/sampled/AudioPermission.java index 1db913716a5..a265544d590 100644 --- a/jdk/src/share/classes/javax/sound/sampled/AudioPermission.java +++ b/jdk/src/share/classes/javax/sound/sampled/AudioPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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,7 +40,7 @@ import java.security.BasicPermission; * The following table lists the possible AudioPermission target names. * For each name, the table provides a description of exactly what that permission * allows, as well as a discussion of the risks of granting code the permission. - *

      + * * *

  • Representation Class
    * diff --git a/jdk/src/share/classes/javax/sound/sampled/ReverbType.java b/jdk/src/share/classes/javax/sound/sampled/ReverbType.java index 424b6ac4db1..7afd7aefe56 100644 --- a/jdk/src/share/classes/javax/sound/sampled/ReverbType.java +++ b/jdk/src/share/classes/javax/sound/sampled/ReverbType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, 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 @@ -77,7 +77,7 @@ package javax.sound.sampled; *

    * * Reverberation Types and Parameters - *

    + * *

    * * diff --git a/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java b/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java index fceeab85e2b..f1a5eedf1f9 100644 --- a/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java +++ b/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java @@ -35,6 +35,8 @@ import java.io.FileInputStream; import java.io.InputStream; import java.io.IOException; import java.io.FileNotFoundException; +import java.security.AccessController; +import java.security.PrivilegedAction; import javax.naming.*; @@ -348,7 +350,17 @@ public class SyncFactory { /* * Dependent on application */ - String strRowsetProperties = System.getProperty("rowset.properties"); + String strRowsetProperties; + try { + strRowsetProperties = AccessController.doPrivileged(new PrivilegedAction() { + public String run() { + return System.getProperty("rowset.properties"); + } + }, null, new PropertyPermission("rowset.properties","read")); + } catch (Exception ex) { + strRowsetProperties = null; + } + if (strRowsetProperties != null) { // Load user's implementation of SyncProvider // here. -Drowset.properties=/abc/def/pqr.txt @@ -393,7 +405,16 @@ public class SyncFactory { * load additional properties from -D command line */ properties.clear(); - String providerImpls = System.getProperty(ROWSET_SYNC_PROVIDER); + String providerImpls; + try { + providerImpls = AccessController.doPrivileged(new PrivilegedAction() { + public String run() { + return System.getProperty(ROWSET_SYNC_PROVIDER); + } + }, null, new PropertyPermission(ROWSET_SYNC_PROVIDER,"read")); + } catch (Exception ex) { + providerImpls = null; + } if (providerImpls != null) { int i = 0; diff --git a/jdk/src/share/classes/javax/swing/DefaultComboBoxModel.java b/jdk/src/share/classes/javax/swing/DefaultComboBoxModel.java index 3cb3c6f22d5..1700e902cb6 100644 --- a/jdk/src/share/classes/javax/swing/DefaultComboBoxModel.java +++ b/jdk/src/share/classes/javax/swing/DefaultComboBoxModel.java @@ -115,7 +115,7 @@ public class DefaultComboBoxModel extends AbstractListModel implements Mut /** * Returns the index-position of the specified object in the list. * - * @param anObject + * @param anObject the object to return the index of * @return an int representing the index position, where 0 is * the first position */ diff --git a/jdk/src/share/classes/javax/swing/JComboBox.java b/jdk/src/share/classes/javax/swing/JComboBox.java index a277da79b2b..11081f959df 100644 --- a/jdk/src/share/classes/javax/swing/JComboBox.java +++ b/jdk/src/share/classes/javax/swing/JComboBox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -675,7 +675,7 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible { * the model and its preferred size obtained, which can be * relatively expensive. * - * @param prototypeDisplayValue + * @param prototypeDisplayValue the prototype display value * @see #getPrototypeDisplayValue * @since 1.4 * @beaninfo diff --git a/jdk/src/share/classes/javax/swing/JEditorPane.java b/jdk/src/share/classes/javax/swing/JEditorPane.java index a104d1c0858..cbb888c3a88 100644 --- a/jdk/src/share/classes/javax/swing/JEditorPane.java +++ b/jdk/src/share/classes/javax/swing/JEditorPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -160,9 +160,9 @@ import javax.accessibility.*; * the character set specified in the ChangedCharSetException * (which is an IOException). * - *

    + * *

    - *
    Newlines + *
    Newlines *
    * For a discussion on how newlines are handled, see * DefaultEditorKit. diff --git a/jdk/src/share/classes/javax/swing/JLabel.java b/jdk/src/share/classes/javax/swing/JLabel.java index c6e28d92eaa..c5d527b808d 100644 --- a/jdk/src/share/classes/javax/swing/JLabel.java +++ b/jdk/src/share/classes/javax/swing/JLabel.java @@ -855,7 +855,6 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * RIGHT, * LEADING, or * TRAILING (the default). - * @exception IllegalArgumentException * * @see SwingConstants * @beaninfo diff --git a/jdk/src/share/classes/javax/swing/JLayeredPane.java b/jdk/src/share/classes/javax/swing/JLayeredPane.java index 71d57bdabb8..56685df9e66 100644 --- a/jdk/src/share/classes/javax/swing/JLayeredPane.java +++ b/jdk/src/share/classes/javax/swing/JLayeredPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -58,20 +58,20 @@ import javax.accessibility.*; * layers makes it easy to ensure that components overlap properly, * without having to worry about specifying numbers for specific depths: *
    - *
    DEFAULT_LAYER
    + *
    DEFAULT_LAYER
    *
    The standard layer, where most components go. This the bottommost * layer. - *
    PALETTE_LAYER
    + *
    PALETTE_LAYER
    *
    The palette layer sits over the default layer. Useful for floating * toolbars and palettes, so they can be positioned above other components. - *
    MODAL_LAYER
    + *
    MODAL_LAYER
    *
    The layer used for modal dialogs. They will appear on top of any * toolbars, palettes, or standard components in the container. - *
    POPUP_LAYER
    + *
    POPUP_LAYER
    *
    The popup layer displays above dialogs. That way, the popup windows * associated with combo boxes, tooltips, and other help text will appear * above the component, palette, or dialog that generated them. - *
    DRAG_LAYER
    + *
    DRAG_LAYER
    *
    When dragging a component, reassigning it to the drag layer ensures * that it is positioned over every other component in the container. When * finished dragging, it can be reassigned to its normal layer. diff --git a/jdk/src/share/classes/javax/swing/JOptionPane.java b/jdk/src/share/classes/javax/swing/JOptionPane.java index a2dbf810a1d..dcb991947e1 100644 --- a/jdk/src/share/classes/javax/swing/JOptionPane.java +++ b/jdk/src/share/classes/javax/swing/JOptionPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -131,7 +131,7 @@ import static javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP * Parameters:
    * The parameters to these methods follow consistent patterns: *
    - *
    + *
    *
    parentComponent
    * Defines the Component that is to be the parent of this * dialog box. @@ -149,7 +149,7 @@ import static javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP * String constant. * However, the type of this parameter is actually Object. Its * interpretation depends on its type: - *
    + *
    *
    Object[]
    An array of objects is interpreted as a series of * messages (one per object) arranged in a vertical stack. * The interpretation is recursive -- each object in the @@ -187,7 +187,7 @@ import static javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP * Strings. But * the parameter type is an array of Objects. * A button is created for each object depending on its type: - *
    + *
    *
    Component
    The component is added to the button row directly. *
    Icon
    A JButton is created with this as its label. *
    other
    The Object is converted to a string using its diff --git a/jdk/src/share/classes/javax/swing/JTextArea.java b/jdk/src/share/classes/javax/swing/JTextArea.java index 06b6ea593b7..570819f9df9 100644 --- a/jdk/src/share/classes/javax/swing/JTextArea.java +++ b/jdk/src/share/classes/javax/swing/JTextArea.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -95,7 +95,7 @@ import java.io.IOException; * * *
    - *
    Newlines + *
    Newlines *
    * For a discussion on how newlines are handled, see * DefaultEditorKit. diff --git a/jdk/src/share/classes/javax/swing/JTextPane.java b/jdk/src/share/classes/javax/swing/JTextPane.java index b2ca7fc89a4..0cb9ff8d722 100644 --- a/jdk/src/share/classes/javax/swing/JTextPane.java +++ b/jdk/src/share/classes/javax/swing/JTextPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -51,7 +51,7 @@ import javax.swing.plaf.*; * be embedded in the flow of text. * *
    - *
    Newlines + *
    Newlines *
    * For a discussion on how newlines are handled, see * DefaultEditorKit. diff --git a/jdk/src/share/classes/javax/swing/SwingUtilities.java b/jdk/src/share/classes/javax/swing/SwingUtilities.java index 5dfbb08695c..9d1728028a2 100644 --- a/jdk/src/share/classes/javax/swing/SwingUtilities.java +++ b/jdk/src/share/classes/javax/swing/SwingUtilities.java @@ -24,6 +24,7 @@ */ package javax.swing; +import sun.reflect.misc.ReflectUtil; import sun.swing.SwingUtilities2; import sun.swing.UIAction; @@ -33,9 +34,6 @@ import java.awt.*; import java.awt.event.*; import java.awt.dnd.DropTarget; -import java.util.Vector; -import java.util.Hashtable; - import java.lang.reflect.*; import javax.accessibility.*; @@ -1872,6 +1870,7 @@ public class SwingUtilities implements SwingConstants static Class loadSystemClass(String className) throws ClassNotFoundException { + ReflectUtil.checkPackageAccess(className); return Class.forName(className, true, Thread.currentThread(). getContextClassLoader()); } diff --git a/jdk/src/share/classes/javax/swing/event/EventListenerList.java b/jdk/src/share/classes/javax/swing/event/EventListenerList.java index 2d1e9ab2895..e02e7f3e570 100644 --- a/jdk/src/share/classes/javax/swing/event/EventListenerList.java +++ b/jdk/src/share/classes/javax/swing/event/EventListenerList.java @@ -27,6 +27,7 @@ package javax.swing.event; import java.io.*; import java.util.*; import java.lang.reflect.Array; +import sun.reflect.misc.ReflectUtil; /** * A class that holds a list of EventListeners. A single instance @@ -271,7 +272,9 @@ public class EventListenerList implements Serializable { while (null != (listenerTypeOrNull = s.readObject())) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); EventListener l = (EventListener)s.readObject(); - add((Class)Class.forName((String)listenerTypeOrNull, true, cl), l); + String name = (String) listenerTypeOrNull; + ReflectUtil.checkPackageAccess(name); + add((Class)Class.forName(name, true, cl), l); } } diff --git a/jdk/src/share/classes/javax/swing/plaf/TextUI.java b/jdk/src/share/classes/javax/swing/plaf/TextUI.java index 5d55124ed90..0ce25c19071 100644 --- a/jdk/src/share/classes/javax/swing/plaf/TextUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/TextUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -105,7 +105,7 @@ public abstract class TextUI extends ComponentUI * @param biasRet an array to contain the bias for the returned position * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException + * @exception BadLocationException for a bad location within a document model * @exception IllegalArgumentException for an invalid direction */ public abstract int getNextVisualPositionFrom(JTextComponent t, diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java index 9d037c1e670..e3a2fb66ac3 100644 --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -1199,7 +1199,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { * can be traversed to determine how the model is being * represented spatially. *

    - * NOTE:The View hierarchy can + * NOTE:The View hierarchy can * be traversed from the root view, and other things * can be done as well. Things done in this way cannot * be protected like simple method calls through the TextUI. diff --git a/jdk/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java b/jdk/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java index 6cdeb119c1e..e095b582ba4 100644 --- a/jdk/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java +++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java @@ -356,12 +356,12 @@ public abstract class AbstractRegionPainter implements Painter { * end points are equal. In such a case, the end y point is slightly * increased to avoid the overlap. * - * @param x1 - * @param y1 - * @param x2 - * @param y2 - * @param midpoints - * @param colors + * @param x1 x1 + * @param y1 y1 + * @param x2 x2 + * @param y2 y2 + * @param midpoints the midpoints + * @param colors the colors * @return a valid LinearGradientPaint. This method never returns null. * @throws NullPointerException * if {@code midpoints} array is null, @@ -387,11 +387,11 @@ public abstract class AbstractRegionPainter implements Painter { * is non-positive. In such a case, the radius is just slightly * increased to avoid 0. * - * @param x - * @param y - * @param r - * @param midpoints - * @param colors + * @param x x-coordinate + * @param y y-coordinate + * @param r radius + * @param midpoints the midpoints + * @param colors the colors * @return a valid RadialGradientPaint. This method never returns null. * @throws NullPointerException * if {@code midpoints} array is null, diff --git a/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java b/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java index b4dfaffd124..e38a0789e3c 100644 --- a/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java +++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, 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 @@ -645,7 +645,7 @@ public final class NimbusStyle extends SynthStyle { * passed to the NimbusStyle constructor. In either case, it looks for * "background".

    * - * @param ctx + * @param ctx SynthContext identifying requester * @param key must not be null */ @Override public Object get(SynthContext ctx, Object key) { diff --git a/jdk/src/share/classes/javax/swing/text/CompositeView.java b/jdk/src/share/classes/javax/swing/text/CompositeView.java index 6d57c638bb9..fa9bf093ab7 100644 --- a/jdk/src/share/classes/javax/swing/text/CompositeView.java +++ b/jdk/src/share/classes/javax/swing/text/CompositeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -713,7 +713,7 @@ public abstract class CompositeView extends View { * @param biasRet an array containing the bias that was checked * @return the location within the model that best represents the next * north or south location - * @exception BadLocationException + * @exception BadLocationException for a bad location within a document model * @exception IllegalArgumentException if direction is invalid * @see #getNextVisualPositionFrom * @@ -745,7 +745,7 @@ public abstract class CompositeView extends View { * @param biasRet an array containing the bias that was checked * @return the location within the model that best represents the next * west or east location - * @exception BadLocationException + * @exception BadLocationException for a bad location within a document model * @exception IllegalArgumentException if direction is invalid * @see #getNextVisualPositionFrom */ diff --git a/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java b/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java index 139615bdf0e..ec5a04f3780 100644 --- a/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java +++ b/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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,7 +43,7 @@ import javax.swing.UIManager; * provides a minimal set of actions for a simple editor. * *
    - *
    Newlines + *
    Newlines *
    * There are two properties which deal with newlines. The * system property, line.separator, is defined to be diff --git a/jdk/src/share/classes/javax/swing/text/Document.java b/jdk/src/share/classes/javax/swing/text/Document.java index 946e18ae222..12c9a09bc5c 100644 --- a/jdk/src/share/classes/javax/swing/text/Document.java +++ b/jdk/src/share/classes/javax/swing/text/Document.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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,7 +33,7 @@ import javax.swing.event.*; * interface is to scale from very simple needs (a plain text textfield) * to complex needs (an HTML or XML document, for example). * - *

    Content + *

    Content *

    * At the simplest level, text can be * modeled as a linear sequence of characters. To support @@ -62,7 +62,7 @@ import javax.swing.event.*; *

  • {@link #getText(int, int)} *
  • {@link #getText(int, int, javax.swing.text.Segment)} * - *

    Structure + *

    Structure *

    * Text is rarely represented simply as featureless content. Rather, * text typically has some sort of structure associated with it. @@ -83,7 +83,7 @@ import javax.swing.event.*; *

  • {@link #getRootElements()} * * - *

    Mutations + *

    Mutations *

    * All documents need to be able to add and remove simple text. * Typically, text is inserted and removed via gestures from @@ -98,7 +98,7 @@ import javax.swing.event.*; *

  • {@link #createPosition(int)} * * - *

    Notification + *

    Notification *

    * Mutations to the Document must be communicated to * interested observers. The notification of change follows the event model @@ -152,7 +152,7 @@ import javax.swing.event.*; *

  • removeUndoableEditListener(UndoableEditListener) * * - *

    Properties + *

    Properties *

    * Document implementations will generally have some set of properties * associated with them at runtime. Two well known properties are the diff --git a/jdk/src/share/classes/javax/swing/text/GlyphView.java b/jdk/src/share/classes/javax/swing/text/GlyphView.java index 6aef3682392..2ab6cbc3618 100644 --- a/jdk/src/share/classes/javax/swing/text/GlyphView.java +++ b/jdk/src/share/classes/javax/swing/text/GlyphView.java @@ -1250,7 +1250,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * is returned as the zero-th element of this array * @return the location within the model that best represents the next * location visual position. - * @exception BadLocationException + * @exception BadLocationException for a bad location within a document model * @exception IllegalArgumentException for an invalid direction */ public int getNextVisualPositionFrom(GlyphView v, int pos, Position.Bias b, Shape a, diff --git a/jdk/src/share/classes/javax/swing/text/JTextComponent.java b/jdk/src/share/classes/javax/swing/text/JTextComponent.java index 5f4fd2021be..42c2a2e1764 100644 --- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java +++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -88,7 +88,7 @@ import sun.swing.SwingAccessor; * a section in The Java Tutorial. * *

    - *
    Caret Changes + *
    Caret Changes *
    * The caret is a pluggable object in swing text components. * Notification of changes to the caret position and the selection @@ -107,7 +107,7 @@ import sun.swing.SwingAccessor; * Note: Non-editable text components also have a caret though * it may not be painted. * - *
    Commands + *
    Commands *
    * Text components provide a number of commands that can be used * to manipulate the component. This is essentially the way that @@ -118,7 +118,7 @@ import sun.swing.SwingAccessor; * found with the {@link #getActions} method. These actions * can be bound to key events, fired from buttons, etc. * - *
    Text Input + *
    Text Input *
    * The text components support flexible and internationalized text input, using * keymaps and the input method framework, while maintaining compatibility with @@ -203,7 +203,7 @@ import sun.swing.SwingAccessor; *
  • caret movement forward and backward * * - *
    Model/View Split + *
    Model/View Split *
    * The text components have a model-view split. A text component pulls * together the objects used to represent the model, view, and controller. @@ -227,13 +227,13 @@ import sun.swing.SwingAccessor; * {@link DocumentListener} * interface and registered interest with the model being observed. * - *
    Location Information + *
    Location Information *
    * The capability of determining the location of text in * the view is provided. There are two methods, {@link #modelToView} * and {@link #viewToModel} for determining this information. * - *
    Undo/Redo support + *
    Undo/Redo support *
    * Support for an edit history mechanism is provided to allow * undo/redo operations. The text component does not itself @@ -243,7 +243,7 @@ import sun.swing.SwingAccessor; * The support is provided by the Document model, which allows * one to attach UndoableEditListener implementations. * - *
    Thread Safety + *
    Thread Safety *
    * The swing text components provide some support of thread * safe operations. Because of the high level of configurability @@ -254,13 +254,13 @@ import sun.swing.SwingAccessor; * The methods that are safe to call asynchronously are marked * with comments. * - *
    Newlines + *
    Newlines *
    * For a discussion on how newlines are handled, see * DefaultEditorKit. * * - *
    Printing support + *
    Printing support *
    * Several {@link #print print} methods are provided for basic * document printing. If more advanced printing is needed, use the diff --git a/jdk/src/share/classes/javax/swing/text/NavigationFilter.java b/jdk/src/share/classes/javax/swing/text/NavigationFilter.java index d5ca6575d58..94e76e71a1c 100644 --- a/jdk/src/share/classes/javax/swing/text/NavigationFilter.java +++ b/jdk/src/share/classes/javax/swing/text/NavigationFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, 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 @@ -100,7 +100,7 @@ public class NavigationFilter { * @param biasRet Used to return resulting Bias of next position * @return the location within the model that best represents the next * location visual position - * @exception BadLocationException + * @exception BadLocationException for a bad location within a document model * @exception IllegalArgumentException if direction * doesn't have one of the legal values above */ diff --git a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java index 852776e61c7..254d6156b9f 100644 --- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java +++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -183,7 +183,7 @@ import static sun.swing.SwingUtilities2.IMPLIED_CR; *

    The following table shows the example document and the results * of various methods described above.

    * - *
  • + *
    * * * @@ -994,16 +994,16 @@ public class HTMLDocument extends DefaultStyledDocument { * *

    Invoking setInnerHTML(elem, "<ul><li>") * results in the following structure (new elements are in red).

    + * style="color: red;">in red
    ).

    * *
          *     <body>
          *       |
          *     <div>
          *         \
    -     *         <ul>
    +     *         <ul>
          *           \
    -     *           <li>
    +     *           <li>
          * 
    * *

    Parameter elem must not be a leaf element, @@ -1075,14 +1075,14 @@ public class HTMLDocument extends DefaultStyledDocument { * *

    Invoking setOuterHTML(elem, "<ul><li>") * results in the following structure (new elements are in red).

    + * style="color: red;">in red
    ).

    * *
          *    <body>
          *      |
    -     *     <ul>
    +     *     <ul>
          *       \
    -     *       <li>
    +     *       <li>
          * 
    * *

    If either elem or htmlText @@ -1145,16 +1145,16 @@ public class HTMLDocument extends DefaultStyledDocument { * *

    Invoking insertAfterStart(elem, * "<ul><li>") results in the following structure - * (new elements are in red).

    + * (new elements are in red).

    * *
          *        <body>
          *          |
          *        <div>
          *       /  |  \
    -     *    <ul> <p> <p>
    +     *    <ul> <p> <p>
          *     /
    -     *  <li>
    +     *  <li>
          * 
    * *

    Unlike the insertBeforeStart method, new @@ -1215,16 +1215,16 @@ public class HTMLDocument extends DefaultStyledDocument { * *

    Invoking insertBeforeEnd(elem, "<ul><li>") * results in the following structure (new elements are in red).

    + * style="color: red;">in red).

    * *
          *        <body>
          *          |
          *        <div>
          *       /  |  \
    -     *     <p> <p> <ul>
    +     *     <p> <p> <ul>
          *               \
    -     *               <li>
    +     *               <li>
          * 
    * *

    Unlike the insertAfterEnd method, new elements @@ -1282,14 +1282,14 @@ public class HTMLDocument extends DefaultStyledDocument { * *

    Invoking insertBeforeStart(elem, * "<ul><li>") results in the following structure - * (new elements are in red).

    + * (new elements are in red).

    * *
          *        <body>
          *         /  \
    -     *      <ul> <div>
    +     *      <ul> <div>
          *       /    /  \
    -     *     <li> <p>  <p>
    +     *     <li> <p>  <p>
          * 
    * *

    Unlike the insertAfterStart method, new @@ -1340,14 +1340,14 @@ public class HTMLDocument extends DefaultStyledDocument { * *

    Invoking insertAfterEnd(elem, "<ul><li>") * results in the following structure (new elements are in red).

    + * style="color: red;">in red).

    * *
          *        <body>
          *         /  \
    -     *      <div> <ul>
    +     *      <div> <ul>
          *       / \    \
    -     *     <p> <p>  <li>
    +     *     <p> <p>  <li>
          * 
    * *

    Unlike the insertBeforeEnd method, new elements diff --git a/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java b/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java index ae4a5ce5185..2e7998a6670 100644 --- a/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java +++ b/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -117,10 +117,10 @@ import javax.swing.text.*; * support are pseudo selectors, such as A:link { color: red }, * and the important modifier. *

    - * Note: This implementation is currently + * @implNote This implementation is currently * incomplete. It can be replaced with alternative implementations * that are complete. Future versions of this class will provide - * better CSS support. + * better CSS support. * * @author Timothy Prinzing * @author Sunita Mani diff --git a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java index 5b332243dfb..7e02ea496ba 100644 --- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java +++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java @@ -541,9 +541,11 @@ public class HttpURLConnection extends java.net.HttpURLConnection { * to last and last, respectively, in the case of a POST * request. */ - if (!failedOnce) + if (!failedOnce) { + checkURLFile(); requests.prepend(method + " " + getRequestURI()+" " + httpVersion, null); + } if (!getUseCaches()) { requests.setIfNotSet ("Cache-Control", "no-cache"); requests.setIfNotSet ("Pragma", "no-cache"); @@ -554,7 +556,12 @@ public class HttpURLConnection extends java.net.HttpURLConnection { if (port != -1 && port != url.getDefaultPort()) { host += ":" + String.valueOf(port); } - requests.setIfNotSet("Host", host); + String reqHost = requests.findValue("Host"); + if (reqHost == null || + (!reqHost.equalsIgnoreCase(host) && !checkSetHost())) + { + requests.set("Host", host); + } requests.setIfNotSet("Accept", acceptString); /* @@ -671,6 +678,44 @@ public class HttpURLConnection extends java.net.HttpURLConnection { } } + private boolean checkSetHost() { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + String name = s.getClass().getName(); + if (name.equals("sun.plugin2.applet.AWTAppletSecurityManager") || + name.equals("sun.plugin2.applet.FXAppletSecurityManager") || + name.equals("com.sun.javaws.security.JavaWebStartSecurity") || + name.equals("sun.plugin.security.ActivatorSecurityManager")) + { + int CHECK_SET_HOST = -2; + try { + s.checkConnect(url.toExternalForm(), CHECK_SET_HOST); + } catch (SecurityException ex) { + return false; + } + } + } + return true; + } + + private void checkURLFile() { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + String name = s.getClass().getName(); + if (name.equals("sun.plugin2.applet.AWTAppletSecurityManager") || + name.equals("sun.plugin2.applet.FXAppletSecurityManager") || + name.equals("com.sun.javaws.security.JavaWebStartSecurity") || + name.equals("sun.plugin.security.ActivatorSecurityManager")) + { + int CHECK_SUBPATH = -3; + try { + s.checkConnect(url.toExternalForm(), CHECK_SUBPATH); + } catch (SecurityException ex) { + throw new SecurityException("denied access outside a permitted URL subpath", ex); + } + } + } + } /** * Create a new HttpClient object, bypassing the cache of diff --git a/jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java index 273f9def315..5aaf4a5ffbe 100644 --- a/jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java +++ b/jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java @@ -428,6 +428,10 @@ abstract class AsynchronousSocketChannelImpl throw new AlreadyBoundException(); InetSocketAddress isa = (local == null) ? new InetSocketAddress(0) : Net.checkAddress(local); + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkListen(isa.getPort()); + } NetHooks.beforeTcpBind(fd, isa.getAddress(), isa.getPort()); Net.bind(fd, isa.getAddress(), isa.getPort()); localAddress = Net.localAddress(fd); diff --git a/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java index 806168392e9..28f3fc0c3be 100644 --- a/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java +++ b/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java @@ -572,6 +572,10 @@ class SocketChannelImpl throw new AlreadyBoundException(); InetSocketAddress isa = (local == null) ? new InetSocketAddress(0) : Net.checkAddress(local); + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkListen(isa.getPort()); + } NetHooks.beforeTcpBind(fd, isa.getAddress(), isa.getPort()); Net.bind(fd, isa.getAddress(), isa.getPort()); localAddress = Net.localAddress(fd); diff --git a/jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java b/jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java index 58a30700005..e5d05205dff 100644 --- a/jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java +++ b/jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java @@ -28,7 +28,10 @@ package sun.reflect.generics.reflectiveObjects; import java.lang.annotation.*; import java.lang.reflect.AnnotatedType; import java.lang.reflect.Array; +import java.lang.reflect.Constructor; import java.lang.reflect.GenericDeclaration; +import java.lang.reflect.Member; +import java.lang.reflect.Method; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.LinkedHashMap; @@ -40,6 +43,7 @@ import sun.reflect.annotation.AnnotationType; import sun.reflect.generics.factory.GenericsFactory; import sun.reflect.generics.tree.FieldTypeSignature; import sun.reflect.generics.visitor.Reifier; +import sun.reflect.misc.ReflectUtil; /** * Implementation of java.lang.reflect.TypeVariable interface @@ -95,6 +99,13 @@ public class TypeVariableImpl TypeVariableImpl make(T decl, String name, FieldTypeSignature[] bs, GenericsFactory f) { + + if (!((decl instanceof Class) || + (decl instanceof Method) || + (decl instanceof Constructor))) { + throw new AssertionError("Unexpected kind of GenericDeclaration" + + decl.getClass().toString()); + } return new TypeVariableImpl(decl, name, bs, f); } @@ -149,6 +160,13 @@ public class TypeVariableImpl * @since 1.5 */ public D getGenericDeclaration(){ + if (genericDeclaration instanceof Class) + ReflectUtil.checkPackageAccess((Class)genericDeclaration); + else if ((genericDeclaration instanceof Method) || + (genericDeclaration instanceof Constructor)) + ReflectUtil.conservativeCheckMemberAccess((Member)genericDeclaration); + else + throw new AssertionError("Unexpected kind of GenericDeclaration"); return genericDeclaration; } @@ -164,7 +182,8 @@ public class TypeVariableImpl @Override public boolean equals(Object o) { - if (o instanceof TypeVariable) { + if (o instanceof TypeVariable && + o.getClass() == TypeVariableImpl.class) { TypeVariable that = (TypeVariable) o; GenericDeclaration thatDecl = that.getGenericDeclaration(); diff --git a/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java b/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java index fb9220894ef..482f6b5ca2a 100644 --- a/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java +++ b/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java @@ -26,11 +26,13 @@ package sun.reflect.misc; +import java.lang.reflect.Member; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.Arrays; import sun.reflect.Reflection; +import sun.security.util.SecurityConstants; public final class ReflectUtil { @@ -117,6 +119,40 @@ public final class ReflectUtil { return false; } + /** + * Does a conservative approximation of member access check. Use this if + * you don't have an actual 'userland' caller Class/ClassLoader available. + * This might be more restrictive than a precise member access check where + * you have a caller, but should never allow a member access that is + * forbidden. + * + * @param m the {@code Member} about to be accessed + */ + public static void conservativeCheckMemberAccess(Member m) throws SecurityException{ + final SecurityManager sm = System.getSecurityManager(); + if (sm == null) + return; + + // Check for package access on the declaring class. + // + // In addition, unless the member and the declaring class are both + // public check for access declared member permissions. + // + // This is done regardless of ClassLoader relations between the {@code + // Member m} and any potential caller. + + final Class declaringClass = m.getDeclaringClass(); + + checkPackageAccess(declaringClass); + + if (Modifier.isPublic(m.getModifiers()) && + Modifier.isPublic(declaringClass.getModifiers())) + return; + + // Check for declared member access. + sm.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION); + } + /** * Checks package access on the given class. * diff --git a/jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java b/jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java index 0b01116cdac..f8280552071 100644 --- a/jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java +++ b/jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java @@ -94,8 +94,23 @@ public class RegistryImpl extends java.rmi.server.RemoteServer RMIServerSocketFactory ssf) throws RemoteException { - LiveRef lref = new LiveRef(id, port, csf, ssf); - setup(new UnicastServerRef2(lref)); + if (port == Registry.REGISTRY_PORT && System.getSecurityManager() != null) { + // grant permission for default port only. + try { + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Void run() throws RemoteException { + LiveRef lref = new LiveRef(id, port, csf, ssf); + setup(new UnicastServerRef2(lref)); + return null; + } + }, null, new SocketPermission("localhost:"+port, "listen,accept")); + } catch (PrivilegedActionException pae) { + throw (RemoteException)pae.getException(); + } + } else { + LiveRef lref = new LiveRef(id, port, csf, ssf); + setup(new UnicastServerRef2(lref)); + } } /** @@ -104,8 +119,23 @@ public class RegistryImpl extends java.rmi.server.RemoteServer public RegistryImpl(int port) throws RemoteException { - LiveRef lref = new LiveRef(id, port); - setup(new UnicastServerRef(lref)); + if (port == Registry.REGISTRY_PORT && System.getSecurityManager() != null) { + // grant permission for default port only. + try { + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Void run() throws RemoteException { + LiveRef lref = new LiveRef(id, port); + setup(new UnicastServerRef(lref)); + return null; + } + }, null, new SocketPermission("localhost:"+port, "listen,accept")); + } catch (PrivilegedActionException pae) { + throw (RemoteException)pae.getException(); + } + } else { + LiveRef lref = new LiveRef(id, port); + setup(new UnicastServerRef(lref)); + } } /* @@ -352,7 +382,7 @@ public class RegistryImpl extends java.rmi.server.RemoteServer public RegistryImpl run() throws RemoteException { return new RegistryImpl(regPort); } - }, getAccessControlContext()); + }, getAccessControlContext(regPort)); } catch (PrivilegedActionException ex) { throw (RemoteException) ex.getException(); } @@ -382,7 +412,7 @@ public class RegistryImpl extends java.rmi.server.RemoteServer * The approach used here is taken from the similar method * getAccessControlContext() in the sun.applet.AppletPanel class. */ - private static AccessControlContext getAccessControlContext() { + private static AccessControlContext getAccessControlContext(int port) { // begin with permissions granted to all code in current policy PermissionCollection perms = AccessController.doPrivileged( new java.security.PrivilegedAction() { @@ -404,6 +434,7 @@ public class RegistryImpl extends java.rmi.server.RemoteServer * related classes themselves are more tightly limited by RMI. */ perms.add(new SocketPermission("*", "connect,accept")); + perms.add(new SocketPermission("localhost:"+port, "listen,accept")); perms.add(new RuntimePermission("accessClassInPackage.sun.jvmstat.*")); perms.add(new RuntimePermission("accessClassInPackage.sun.jvm.hotspot.*")); diff --git a/jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java b/jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java index 7ff1d7ff80f..a38a7faecf2 100644 --- a/jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java +++ b/jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, 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,11 +45,12 @@ public class TlsRsaPremasterSecretParameterSpec private final int majorVersion; private final int minorVersion; + private final byte[] encodedSecret; /** * Constructs a new TlsRsaPremasterSecretParameterSpec. - * - *

    The version numbers will be placed inside the premaster secret to + *

    + * The version numbers will be placed inside the premaster secret to * detect version rollbacks attacks as described in the TLS specification. * Note that they do not indicate the protocol version negotiated for * the handshake. @@ -65,7 +66,42 @@ public class TlsRsaPremasterSecretParameterSpec this.majorVersion = TlsMasterSecretParameterSpec.checkVersion(majorVersion); this.minorVersion = - TlsMasterSecretParameterSpec.checkVersion(minorVersion); } + TlsMasterSecretParameterSpec.checkVersion(minorVersion); + this.encodedSecret = null; + } + + /** + * Constructs a new TlsRsaPremasterSecretParameterSpec. + *

    + * The version numbers will be placed inside the premaster secret to + * detect version rollbacks attacks as described in the TLS specification. + * Note that they do not indicate the protocol version negotiated for + * the handshake. + *

    + * Usually, the encoded secret key is a random number that acts as + * dummy pre_master_secret to avoid vulnerabilities described by + * section 7.4.7.1, RFC 5246. + * + * @param majorVersion the major number of the protocol version + * @param minorVersion the minor number of the protocol version + * @param encodedSecret the encoded secret key + * + * @throws IllegalArgumentException if minorVersion or majorVersion are + * negative or larger than 255, or encodedSecret is not exactly 48 bytes. + */ + public TlsRsaPremasterSecretParameterSpec(int majorVersion, + int minorVersion, byte[] encodedSecret) { + this.majorVersion = + TlsMasterSecretParameterSpec.checkVersion(majorVersion); + this.minorVersion = + TlsMasterSecretParameterSpec.checkVersion(minorVersion); + + if (encodedSecret == null || encodedSecret.length != 48) { + throw new IllegalArgumentException( + "Encoded secret is not exactly 48 bytes"); + } + this.encodedSecret = encodedSecret.clone(); + } /** * Returns the major version. @@ -84,4 +120,13 @@ public class TlsRsaPremasterSecretParameterSpec public int getMinorVersion() { return minorVersion; } + + /** + * Returns the encoded secret. + * + * @return the encoded secret, may be null if no encoded secret. + */ + public byte[] getEncodedSecret() { + return encodedSecret == null ? null : encodedSecret.clone(); + } } diff --git a/jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java b/jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java index 61cc1b33f7b..e2ff0fc73e4 100644 --- a/jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java +++ b/jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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 @@ -451,30 +451,7 @@ final class P11RSACipher extends CipherSpi { // see JCE spec protected Key engineUnwrap(byte[] wrappedKey, String algorithm, int type) throws InvalidKeyException, NoSuchAlgorithmException { - if (algorithm.equals("TlsRsaPremasterSecret")) { - // the instance variable "session" has been initialized for - // decrypt mode, so use a local variable instead. - Session s = null; - try { - s = token.getObjSession(); - long keyType = CKK_GENERIC_SECRET; - CK_ATTRIBUTE[] attributes = new CK_ATTRIBUTE[] { - new CK_ATTRIBUTE(CKA_CLASS, CKO_SECRET_KEY), - new CK_ATTRIBUTE(CKA_KEY_TYPE, keyType), - }; - attributes = token.getAttributes - (O_IMPORT, CKO_SECRET_KEY, keyType, attributes); - long keyID = token.p11.C_UnwrapKey(s.id(), - new CK_MECHANISM(mechanism), p11Key.keyID, wrappedKey, - attributes); - return P11Key.secretKey(s, keyID, algorithm, 48 << 3, - attributes); - } catch (PKCS11Exception e) { - throw new InvalidKeyException("unwrap() failed", e); - } finally { - token.releaseSession(s); - } - } + // XXX implement unwrap using C_Unwrap() for all keys implInit(Cipher.DECRYPT_MODE, p11Key); if (wrappedKey.length > maxInputSize) { diff --git a/jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java b/jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java index f9ef1c4ba0b..ff9b183ee26 100644 --- a/jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java +++ b/jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, 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 @@ -88,23 +88,33 @@ final class P11TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi { throw new IllegalStateException ("TlsRsaPremasterSecretGenerator must be initialized"); } - CK_VERSION version = - new CK_VERSION(spec.getMajorVersion(), spec.getMinorVersion()); - Session session = null; - try { - session = token.getObjSession(); - CK_ATTRIBUTE[] attributes = token.getAttributes - (O_GENERATE, CKO_SECRET_KEY, CKK_GENERIC_SECRET, new CK_ATTRIBUTE[0]); - long keyID = token.p11.C_GenerateKey - (session.id(), new CK_MECHANISM(mechanism, version), attributes); - SecretKey key = P11Key.secretKey - (session, keyID, "TlsRsaPremasterSecret", 48 << 3, attributes); - return key; - } catch (PKCS11Exception e) { - throw new ProviderException("Could not generate premaster secret", e); - } finally { - token.releaseSession(session); + + byte[] b = spec.getEncodedSecret(); + if (b == null) { + CK_VERSION version = new CK_VERSION( + spec.getMajorVersion(), spec.getMinorVersion()); + Session session = null; + try { + session = token.getObjSession(); + CK_ATTRIBUTE[] attributes = token.getAttributes( + O_GENERATE, CKO_SECRET_KEY, + CKK_GENERIC_SECRET, new CK_ATTRIBUTE[0]); + long keyID = token.p11.C_GenerateKey(session.id(), + new CK_MECHANISM(mechanism, version), attributes); + SecretKey key = P11Key.secretKey(session, + keyID, "TlsRsaPremasterSecret", 48 << 3, attributes); + return key; + } catch (PKCS11Exception e) { + throw new ProviderException( + "Could not generate premaster secret", e); + } finally { + token.releaseSession(session); + } } + + // Won't worry, the TlsRsaPremasterSecret will be soon converted to + // TlsMasterSecret. + return new SecretKeySpec(b, "TlsRsaPremasterSecret"); } } diff --git a/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java b/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java index 1c7641372ab..e06832bf3c6 100644 --- a/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java +++ b/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2013, 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,10 +43,8 @@ import sun.misc.Unsafe; * These are the only platforms we currently support, but other optimized * variants could be added as needed. * - * NOTE that because this code performs unchecked direct memory access, it - * MUST be restricted to trusted code. It is imperative that the caller protects - * against out of bounds memory access by performing the necessary bounds - * checks before calling methods in this class. + * NOTE that ArrayIndexOutOfBoundsException will be thrown if the bounds checks + * failed. * * This class may also be helpful in improving the performance of the * crypto code in the SunJCE provider. However, for now it is only accessible by @@ -103,6 +101,10 @@ final class ByteArrayAccess { * byte[] to int[] conversion, little endian byte order. */ static void b2iLittle(byte[] in, int inOfs, int[] out, int outOfs, int len) { + if ((inOfs < 0) || ((in.length - inOfs) < len) || + (outOfs < 0) || ((out.length - outOfs) < len/4)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { inOfs += byteArrayOfs; len += inOfs; @@ -131,6 +133,10 @@ final class ByteArrayAccess { // Special optimization of b2iLittle(in, inOfs, out, 0, 64) static void b2iLittle64(byte[] in, int inOfs, int[] out) { + if ((inOfs < 0) || ((in.length - inOfs) < 64) || + (out.length < 16)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { inOfs += byteArrayOfs; out[ 0] = unsafe.getInt(in, (long)(inOfs )); @@ -176,6 +182,10 @@ final class ByteArrayAccess { * int[] to byte[] conversion, little endian byte order. */ static void i2bLittle(int[] in, int inOfs, byte[] out, int outOfs, int len) { + if ((inOfs < 0) || ((in.length - inOfs) < len/4) || + (outOfs < 0) || ((out.length - outOfs) < len)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { outOfs += byteArrayOfs; len += outOfs; @@ -204,6 +214,9 @@ final class ByteArrayAccess { // Store one 32-bit value into out[outOfs..outOfs+3] in little endian order. static void i2bLittle4(int val, byte[] out, int outOfs) { + if ((outOfs < 0) || ((out.length - outOfs) < 4)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { unsafe.putInt(out, (long)(byteArrayOfs + outOfs), val); } else if (bigEndian && ((outOfs & 3) == 0)) { @@ -220,6 +233,10 @@ final class ByteArrayAccess { * byte[] to int[] conversion, big endian byte order. */ static void b2iBig(byte[] in, int inOfs, int[] out, int outOfs, int len) { + if ((inOfs < 0) || ((in.length - inOfs) < len) || + (outOfs < 0) || ((out.length - outOfs) < len/4)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { inOfs += byteArrayOfs; len += inOfs; @@ -248,6 +265,10 @@ final class ByteArrayAccess { // Special optimization of b2iBig(in, inOfs, out, 0, 64) static void b2iBig64(byte[] in, int inOfs, int[] out) { + if ((inOfs < 0) || ((in.length - inOfs) < 64) || + (out.length < 16)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { inOfs += byteArrayOfs; out[ 0] = reverseBytes(unsafe.getInt(in, (long)(inOfs ))); @@ -293,6 +314,10 @@ final class ByteArrayAccess { * int[] to byte[] conversion, big endian byte order. */ static void i2bBig(int[] in, int inOfs, byte[] out, int outOfs, int len) { + if ((inOfs < 0) || ((in.length - inOfs) < len/4) || + (outOfs < 0) || ((out.length - outOfs) < len)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { outOfs += byteArrayOfs; len += outOfs; @@ -321,6 +346,9 @@ final class ByteArrayAccess { // Store one 32-bit value into out[outOfs..outOfs+3] in big endian order. static void i2bBig4(int val, byte[] out, int outOfs) { + if ((outOfs < 0) || ((out.length - outOfs) < 4)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { unsafe.putInt(out, (long)(byteArrayOfs + outOfs), reverseBytes(val)); } else if (bigEndian && ((outOfs & 3) == 0)) { @@ -337,6 +365,10 @@ final class ByteArrayAccess { * byte[] to long[] conversion, big endian byte order. */ static void b2lBig(byte[] in, int inOfs, long[] out, int outOfs, int len) { + if ((inOfs < 0) || ((in.length - inOfs) < len) || + (outOfs < 0) || ((out.length - outOfs) < len/8)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { inOfs += byteArrayOfs; len += inOfs; @@ -378,6 +410,10 @@ final class ByteArrayAccess { // Special optimization of b2lBig(in, inOfs, out, 0, 128) static void b2lBig128(byte[] in, int inOfs, long[] out) { + if ((inOfs < 0) || ((in.length - inOfs) < 128) || + (out.length < 16)) { + throw new ArrayIndexOutOfBoundsException(); + } if (littleEndianUnaligned) { inOfs += byteArrayOfs; out[ 0] = reverseBytes(unsafe.getLong(in, (long)(inOfs ))); @@ -406,6 +442,10 @@ final class ByteArrayAccess { * long[] to byte[] conversion, big endian byte order. */ static void l2bBig(long[] in, int inOfs, byte[] out, int outOfs, int len) { + if ((inOfs < 0) || ((in.length - inOfs) < len/8) || + (outOfs < 0) || ((out.length - outOfs) < len)) { + throw new ArrayIndexOutOfBoundsException(); + } len += outOfs; while (outOfs < len) { long i = in[inOfs++]; @@ -419,5 +459,4 @@ final class ByteArrayAccess { out[outOfs++] = (byte)(i ); } } - } diff --git a/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java b/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java index 2a15bf46206..8075d73fd81 100644 --- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java +++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, 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 @@ -446,10 +446,28 @@ public final class OCSPResponse { } } else if (responderKeyId != null) { for (X509CertImpl cert : certs) { + // Match responder's key identifier against the cert's SKID + // This will match if the SKID is encoded using the 160-bit + // SHA-1 hash method as defined in RFC 5280. KeyIdentifier certKeyId = cert.getSubjectKeyId(); if (certKeyId != null && responderKeyId.equals(certKeyId)) { signerCert = cert; break; + } else { + // The certificate does not have a SKID or may have + // been using a different algorithm (ex: see RFC 7093). + // Check if the responder's key identifier matches + // against a newly generated key identifier of the + // cert's public key using the 160-bit SHA-1 method. + try { + certKeyId = new KeyIdentifier(cert.getPublicKey()); + } catch (IOException e) { + // ignore + } + if (responderKeyId.equals(certKeyId)) { + signerCert = cert; + break; + } } } } diff --git a/jdk/src/share/classes/sun/security/rsa/RSAPadding.java b/jdk/src/share/classes/sun/security/rsa/RSAPadding.java index 76f0d81c20b..35def8b25f2 100644 --- a/jdk/src/share/classes/sun/security/rsa/RSAPadding.java +++ b/jdk/src/share/classes/sun/security/rsa/RSAPadding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, 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 @@ -318,33 +318,53 @@ public final class RSAPadding { /** * PKCS#1 v1.5 unpadding (blocktype 1 and 2). + * + * Note that we want to make it a constant-time operation */ private byte[] unpadV15(byte[] padded) throws BadPaddingException { int k = 0; + BadPaddingException bpe = null; + if (padded[k++] != 0) { - throw new BadPaddingException("Data must start with zero"); + bpe = new BadPaddingException("Data must start with zero"); } - if (padded[k++] != type) { - throw new BadPaddingException("Blocktype mismatch: " + padded[1]); + if (padded[k++] != type && bpe == null) { + bpe = new BadPaddingException("Blocktype mismatch: " + padded[1]); } - while (true) { + int p = 0; + while (k < padded.length) { int b = padded[k++] & 0xff; - if (b == 0) { - break; + if (b == 0 && p == 0) { + p = k; } - if (k == padded.length) { - throw new BadPaddingException("Padding string not terminated"); + if (k == padded.length && p == 0 && bpe == null) { + bpe = new BadPaddingException("Padding string not terminated"); } - if ((type == PAD_BLOCKTYPE_1) && (b != 0xff)) { - throw new BadPaddingException("Padding byte not 0xff: " + b); + if ((type == PAD_BLOCKTYPE_1) && (b != 0xff) && + p == 0 && bpe == null) { + bpe = new BadPaddingException("Padding byte not 0xff: " + b); } } - int n = padded.length - k; - if (n > maxDataSize) { - throw new BadPaddingException("Padding string too short"); + int n = padded.length - p; + if (n > maxDataSize && bpe == null) { + bpe = new BadPaddingException("Padding string too short"); } + + // copy useless padding array for a constant-time method + // + // Is it necessary? + byte[] padding = new byte[p]; + System.arraycopy(padded, 0, padding, 0, p); + byte[] data = new byte[n]; - System.arraycopy(padded, padded.length - n, data, 0, n); + System.arraycopy(padded, p, data, 0, n); + + if (bpe == null) { + bpe = new BadPaddingException("Unused exception"); + } else { + throw bpe; + } + return data; } diff --git a/jdk/src/share/classes/sun/security/ssl/CipherSuite.java b/jdk/src/share/classes/sun/security/ssl/CipherSuite.java index 528b369b976..c29cb69b6f9 100644 --- a/jdk/src/share/classes/sun/security/ssl/CipherSuite.java +++ b/jdk/src/share/classes/sun/security/ssl/CipherSuite.java @@ -985,13 +985,45 @@ final class CipherSuite implements Comparable { // ID Key Exchange Cipher A obs suprt PRF // ====== ============ ========= = === ===== ======== - - // Placeholder for cipher suites in GCM mode. + // Suite B compliant cipher suites, see RFC 6460. // - // For better compatibility and interoperability, we decrease the - // priority of cipher suites in GCM mode for a while as GCM - // technologies mature in the industry. Eventually we'll move - // the GCM suites here. + // Note that, at present this provider is not Suite B compliant. The + // preference order of the GCM cipher suites does not follow the spec + // of RFC 6460. In this section, only two cipher suites are listed + // so that applications can make use of Suite-B compliant cipher + // suite firstly. + add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", + 0xc02c, --p, K_ECDHE_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384); + add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", + 0xc02b, --p, K_ECDHE_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256); + + // AES_256(GCM) + add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", + 0xc030, --p, K_ECDHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); + add("TLS_RSA_WITH_AES_256_GCM_SHA384", + 0x009d, --p, K_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); + add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", + 0xc02e, --p, K_ECDH_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384); + add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", + 0xc032, --p, K_ECDH_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); + add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", + 0x009f, --p, K_DHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); + add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", + 0x00a3, --p, K_DHE_DSS, B_AES_256_GCM, T, max, tls12, P_SHA384); + + // AES_128(GCM) + add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + 0xc02f, --p, K_ECDHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); + add("TLS_RSA_WITH_AES_128_GCM_SHA256", + 0x009c, --p, K_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); + add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", + 0xc02d, --p, K_ECDH_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256); + add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", + 0xc031, --p, K_ECDH_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); + add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", + 0x009e, --p, K_DHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); + add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", + 0x00a2, --p, K_DHE_DSS, B_AES_128_GCM, T, max, tls12, P_SHA256); // AES_256(CBC) add("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", @@ -1067,50 +1099,6 @@ final class CipherSuite implements Comparable { add("TLS_ECDH_RSA_WITH_RC4_128_SHA", 0xC00C, --p, K_ECDH_RSA, B_RC4_128, N); - // Cipher suites in GCM mode, see RFC 5288/5289. - // - // We may increase the priority of cipher suites in GCM mode when - // GCM technologies become mature in the industry. - - // Suite B compliant cipher suites, see RFC 6460. - // - // Note that, at present this provider is not Suite B compliant. The - // preference order of the GCM cipher suites does not follow the spec - // of RFC 6460. - add("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - 0xc02c, --p, K_ECDHE_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - 0xc02b, --p, K_ECDHE_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - - // AES_256(GCM) - add("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - 0xc030, --p, K_ECDHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_RSA_WITH_AES_256_GCM_SHA384", - 0x009d, --p, K_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", - 0xc02e, --p, K_ECDH_ECDSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", - 0xc032, --p, K_ECDH_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", - 0x009f, --p, K_DHE_RSA, B_AES_256_GCM, T, max, tls12, P_SHA384); - add("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", - 0x00a3, --p, K_DHE_DSS, B_AES_256_GCM, T, max, tls12, P_SHA384); - - // AES_128(GCM) - add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - 0xc02f, --p, K_ECDHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_RSA_WITH_AES_128_GCM_SHA256", - 0x009c, --p, K_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", - 0xc02d, --p, K_ECDH_ECDSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", - 0xc031, --p, K_ECDH_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", - 0x009e, --p, K_DHE_RSA, B_AES_128_GCM, T, max, tls12, P_SHA256); - add("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", - 0x00a2, --p, K_DHE_DSS, B_AES_128_GCM, T, max, tls12, P_SHA256); - // End of cipher suites in GCM mode. - // 3DES_EDE add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", 0xC008, --p, K_ECDHE_ECDSA, B_3DES, T); diff --git a/jdk/src/share/classes/sun/security/ssl/Handshaker.java b/jdk/src/share/classes/sun/security/ssl/Handshaker.java index f101a5fd38f..9fea3fada98 100644 --- a/jdk/src/share/classes/sun/security/ssl/Handshaker.java +++ b/jdk/src/share/classes/sun/security/ssl/Handshaker.java @@ -1104,94 +1104,23 @@ abstract class Handshaker { clnt_random.random_bytes, svr_random.random_bytes, prfHashAlg, prfHashLength, prfBlockSize); - SecretKey masterSecret; try { KeyGenerator kg = JsseJce.getKeyGenerator(masterAlg); kg.init(spec); - masterSecret = kg.generateKey(); - } catch (GeneralSecurityException e) { + return kg.generateKey(); + } catch (InvalidAlgorithmParameterException | + NoSuchAlgorithmException iae) { + // unlikely to happen, otherwise, must be a provider exception + // // For RSA premaster secrets, do not signal a protocol error // due to the Bleichenbacher attack. See comments further down. - if (!preMasterSecret.getAlgorithm().equals( - "TlsRsaPremasterSecret")) { - throw new ProviderException(e); - } - if (debug != null && Debug.isOn("handshake")) { System.out.println("RSA master secret generation error:"); - e.printStackTrace(System.out); + iae.printStackTrace(System.out); } + throw new ProviderException(iae); - if (requestedVersion != null) { - preMasterSecret = - RSAClientKeyExchange.generateDummySecret(requestedVersion); - } else { - preMasterSecret = - RSAClientKeyExchange.generateDummySecret(protocolVersion); - } - - // recursive call with new premaster secret - return calculateMasterSecret(preMasterSecret, null); } - - // if no version check requested (client side handshake), or version - // information is not available (not an RSA premaster secret), - // return master secret immediately. - if ((requestedVersion == null) || - !(masterSecret instanceof TlsMasterSecret)) { - return masterSecret; - } - - // we have checked the ClientKeyExchange message when reading TLS - // record, the following check is necessary to ensure that - // JCE provider does not ignore the checking, or the previous - // checking process bypassed the premaster secret version checking. - TlsMasterSecret tlsKey = (TlsMasterSecret)masterSecret; - int major = tlsKey.getMajorVersion(); - int minor = tlsKey.getMinorVersion(); - if ((major < 0) || (minor < 0)) { - return masterSecret; - } - - // check if the premaster secret version is ok - // the specification says that it must be the maximum version supported - // by the client from its ClientHello message. However, many - // implementations send the negotiated version, so accept both - // for SSL v3.0 and TLS v1.0. - // NOTE that we may be comparing two unsupported version numbers, which - // is why we cannot use object reference equality in this special case. - ProtocolVersion premasterVersion = - ProtocolVersion.valueOf(major, minor); - boolean versionMismatch = (premasterVersion.v != requestedVersion.v); - - /* - * we never checked the client_version in server side - * for TLS v1.0 and SSL v3.0. For compatibility, we - * maintain this behavior. - */ - if (versionMismatch && requestedVersion.v <= ProtocolVersion.TLS10.v) { - versionMismatch = (premasterVersion.v != protocolVersion.v); - } - - if (versionMismatch == false) { - // check passed, return key - return masterSecret; - } - - // Due to the Bleichenbacher attack, do not signal a protocol error. - // Generate a random premaster secret and continue with the handshake, - // which will fail when verifying the finished messages. - // For more information, see comments in PreMasterSecret. - if (debug != null && Debug.isOn("handshake")) { - System.out.println("RSA PreMasterSecret version error: expected" - + protocolVersion + " or " + requestedVersion + ", decrypted: " - + premasterVersion); - } - preMasterSecret = - RSAClientKeyExchange.generateDummySecret(requestedVersion); - - // recursive call with new premaster secret - return calculateMasterSecret(preMasterSecret, null); } /* diff --git a/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java b/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java index d77229adb8d..36e4310fef1 100644 --- a/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java +++ b/jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -133,26 +133,37 @@ final class RSAClientKeyExchange extends HandshakeMessage { } else { encrypted = new byte [messageSize]; if (input.read(encrypted) != messageSize) { - throw new SSLProtocolException - ("SSL: read PreMasterSecret: short read"); + throw new SSLProtocolException( + "SSL: read PreMasterSecret: short read"); } } + Exception failover = null; + byte[] encoded = null; try { Cipher cipher = JsseJce.getCipher(JsseJce.CIPHER_RSA_PKCS1); - cipher.init(Cipher.UNWRAP_MODE, privateKey); - preMaster = (SecretKey)cipher.unwrap(encrypted, - "TlsRsaPremasterSecret", Cipher.SECRET_KEY); - - // polish the premaster secret - preMaster = polishPreMasterSecretKey(currentVersion, maxVersion, - generator, preMaster, null); + // Cannot generate key here, please don't use Cipher.UNWRAP_MODE! + cipher.init(Cipher.DECRYPT_MODE, privateKey); + encoded = cipher.doFinal(encrypted); + } catch (BadPaddingException bpe) { + failover = bpe; + encoded = null; + } catch (IllegalBlockSizeException ibse) { + // the message it too big to process with RSA + throw new SSLProtocolException( + "Unable to process PreMasterSecret, may be too big"); } catch (Exception e) { - // polish the premaster secret - preMaster = - polishPreMasterSecretKey(currentVersion, maxVersion, - generator, null, e); + // unlikely to happen, otherwise, must be a provider exception + if (debug != null && Debug.isOn("handshake")) { + System.out.println("RSA premaster secret decryption error:"); + e.printStackTrace(System.out); + } + throw new RuntimeException("Could not generate dummy secret", e); } + + // polish the premaster secret + preMaster = polishPreMasterSecretKey( + currentVersion, maxVersion, generator, encoded, failover); } /** @@ -163,85 +174,74 @@ final class RSAClientKeyExchange extends HandshakeMessage { * * RFC 5246 describes the approach as : * - * 1. Generate a string R of 46 random bytes + * 1. Generate a string R of 48 random bytes * * 2. Decrypt the message to recover the plaintext M * * 3. If the PKCS#1 padding is not correct, or the length of message * M is not exactly 48 bytes: - * pre_master_secret = ClientHello.client_version || R + * pre_master_secret = R * else If ClientHello.client_version <= TLS 1.0, and version * number check is explicitly disabled: - * pre_master_secret = M + * premaster secret = M + * else If M[0..1] != ClientHello.client_version: + * premaster secret = R * else: - * pre_master_secret = ClientHello.client_version || M[2..47] + * premaster secret = M + * + * Note that #2 has completed before the call of this method. */ private SecretKey polishPreMasterSecretKey(ProtocolVersion currentVersion, ProtocolVersion clientHelloVersion, SecureRandom generator, - SecretKey secretKey, Exception failoverException) { + byte[] encoded, Exception failoverException) { this.protocolVersion = clientHelloVersion; + if (generator == null) { + generator = new SecureRandom(); + } + byte[] random = new byte[48]; + generator.nextBytes(random); - if (failoverException == null && secretKey != null) { + if (failoverException == null && encoded != null) { // check the length - byte[] encoded = secretKey.getEncoded(); - if (encoded == null) { // unable to get the encoded key - if (debug != null && Debug.isOn("handshake")) { - System.out.println( - "unable to get the plaintext of the premaster secret"); - } - - int keySize = KeyUtil.getKeySize(secretKey); - if (keySize > 0 && keySize != 384) { // 384 = 48 * 8 - if (debug != null && Debug.isOn("handshake")) { - System.out.println( - "incorrect length of premaster secret: " + - (keySize/8)); - } - - return generateDummySecret(clientHelloVersion); - } - - // The key size is exactly 48 bytes or not accessible. - // - // Conservatively, pass the checking to master secret - // calculation. - return secretKey; - } else if (encoded.length == 48) { - // check the version - if (clientHelloVersion.major == encoded[0] && - clientHelloVersion.minor == encoded[1]) { - - return secretKey; - } else if (clientHelloVersion.v <= ProtocolVersion.TLS10.v && - currentVersion.major == encoded[0] && - currentVersion.minor == encoded[1]) { - /* - * For compatibility, we maintain the behavior that the - * version in pre_master_secret can be the negotiated - * version for TLS v1.0 and SSL v3.0. - */ - this.protocolVersion = currentVersion; - return secretKey; - } - - if (debug != null && Debug.isOn("handshake")) { - System.out.println("Mismatching Protocol Versions, " + - "ClientHello.client_version is " + clientHelloVersion + - ", while PreMasterSecret.client_version is " + - ProtocolVersion.valueOf(encoded[0], encoded[1])); - } - - return generateDummySecret(clientHelloVersion); - } else { + if (encoded.length != 48) { if (debug != null && Debug.isOn("handshake")) { System.out.println( "incorrect length of premaster secret: " + encoded.length); } - return generateDummySecret(clientHelloVersion); + return generatePreMasterSecret( + clientHelloVersion, random, generator); } + + if (clientHelloVersion.major != encoded[0] || + clientHelloVersion.minor != encoded[1]) { + + if (clientHelloVersion.v <= ProtocolVersion.TLS10.v && + currentVersion.major == encoded[0] && + currentVersion.minor == encoded[1]) { + /* + * For compatibility, we maintain the behavior that the + * version in pre_master_secret can be the negotiated + * version for TLS v1.0 and SSL v3.0. + */ + this.protocolVersion = currentVersion; + } else { + if (debug != null && Debug.isOn("handshake")) { + System.out.println("Mismatching Protocol Versions, " + + "ClientHello.client_version is " + + clientHelloVersion + + ", while PreMasterSecret.client_version is " + + ProtocolVersion.valueOf(encoded[0], encoded[1])); + } + + encoded = random; + } + } + + return generatePreMasterSecret( + clientHelloVersion, encoded, generator); } if (debug != null && Debug.isOn("handshake") && @@ -250,11 +250,14 @@ final class RSAClientKeyExchange extends HandshakeMessage { failoverException.printStackTrace(System.out); } - return generateDummySecret(clientHelloVersion); + return generatePreMasterSecret(clientHelloVersion, random, generator); } // generate a premaster secret with the specified version number - static SecretKey generateDummySecret(ProtocolVersion version) { + private static SecretKey generatePreMasterSecret( + ProtocolVersion version, byte[] encodedSecret, + SecureRandom generator) { + if (debug != null && Debug.isOn("handshake")) { System.out.println("Generating a random fake premaster secret"); } @@ -263,11 +266,17 @@ final class RSAClientKeyExchange extends HandshakeMessage { String s = ((version.v >= ProtocolVersion.TLS12.v) ? "SunTls12RsaPremasterSecret" : "SunTlsRsaPremasterSecret"); KeyGenerator kg = JsseJce.getKeyGenerator(s); - kg.init(new TlsRsaPremasterSecretParameterSpec - (version.major, version.minor)); + kg.init(new TlsRsaPremasterSecretParameterSpec( + version.major, version.minor, encodedSecret), generator); return kg.generateKey(); - } catch (GeneralSecurityException e) { - throw new RuntimeException("Could not generate dummy secret", e); + } catch (InvalidAlgorithmParameterException | + NoSuchAlgorithmException iae) { + // unlikely to happen, otherwise, must be a provider exception + if (debug != null && Debug.isOn("handshake")) { + System.out.println("RSA premaster secret generation error:"); + iae.printStackTrace(System.out); + } + throw new RuntimeException("Could not generate dummy secret", iae); } } diff --git a/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java b/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java index 0cc5052a791..c24a68e7126 100644 --- a/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java +++ b/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java @@ -158,8 +158,13 @@ public class Main { private String altSignerClasspath = null; private ZipFile zipFile = null; - private boolean hasExpiredCert = false; + // Informational warnings private boolean hasExpiringCert = false; + private boolean noTimestamp = false; + private Date expireDate = new Date(0L); // used in noTimestamp warning + + // Severe warnings + private boolean hasExpiredCert = false; private boolean notYetValidCert = false; private boolean chainNotValidated = false; private boolean notSignedByAlias = false; @@ -258,9 +263,6 @@ public class Main { if (strict) { int exitCode = 0; - if (hasExpiringCert) { - exitCode |= 2; - } if (chainNotValidated || hasExpiredCert || notYetValidCert) { exitCode |= 4; } @@ -754,14 +756,25 @@ public class Main { System.out.println(rb.getString( "jar.is.unsigned.signatures.missing.or.not.parsable.")); } else { - System.out.println(rb.getString("jar.verified.")); - if (hasUnsignedEntry || hasExpiredCert || hasExpiringCert || - badKeyUsage || badExtendedKeyUsage || badNetscapeCertType || - notYetValidCert || chainNotValidated || - aliasNotInStore || notSignedByAlias) { + boolean warningAppeared = false; + boolean errorAppeared = false; + if (badKeyUsage || badExtendedKeyUsage || badNetscapeCertType || + notYetValidCert || chainNotValidated || hasExpiredCert || + hasUnsignedEntry || + aliasNotInStore || notSignedByAlias) { + + if (strict) { + System.out.println(rb.getString("jar.verified.with.signer.errors.")); + System.out.println(); + System.out.println(rb.getString("Error.")); + errorAppeared = true; + } else { + System.out.println(rb.getString("jar.verified.")); + System.out.println(); + System.out.println(rb.getString("Warning.")); + warningAppeared = true; + } - System.out.println(); - System.out.println(rb.getString("Warning.")); if (badKeyUsage) { System.out.println( rb.getString("This.jar.contains.entries.whose.signer.certificate.s.KeyUsage.extension.doesn.t.allow.code.signing.")); @@ -785,10 +798,6 @@ public class Main { System.out.println(rb.getString( "This.jar.contains.entries.whose.signer.certificate.has.expired.")); } - if (hasExpiringCert) { - System.out.println(rb.getString( - "This.jar.contains.entries.whose.signer.certificate.will.expire.within.six.months.")); - } if (notYetValidCert) { System.out.println(rb.getString( "This.jar.contains.entries.whose.signer.certificate.is.not.yet.valid.")); @@ -807,10 +816,29 @@ public class Main { if (aliasNotInStore) { System.out.println(rb.getString("This.jar.contains.signed.entries.that.s.not.signed.by.alias.in.this.keystore.")); } + } else { + System.out.println(rb.getString("jar.verified.")); + } + if (hasExpiringCert || noTimestamp) { + if (!warningAppeared) { + System.out.println(); + System.out.println(rb.getString("Warning.")); + warningAppeared = true; + } + if (hasExpiringCert) { + System.out.println(rb.getString( + "This.jar.contains.entries.whose.signer.certificate.will.expire.within.six.months.")); + } + if (noTimestamp) { + System.out.println( + String.format(rb.getString("no.timestamp.verifying"), expireDate)); + } + } + if (warningAppeared || errorAppeared) { if (! (verbose != null && showcerts)) { System.out.println(); System.out.println(rb.getString( - "Re.run.with.the.verbose.and.certs.options.for.more.details.")); + "Re.run.with.the.verbose.and.certs.options.for.more.details.")); } } } @@ -870,6 +898,9 @@ public class Main { try { boolean printValidity = true; if (timestamp == null) { + if (expireDate.getTime() == 0 || expireDate.after(notAfter)) { + expireDate = notAfter; + } x509Cert.checkValidity(); // test if cert will expire within six months if (notAfter.getTime() < System.currentTimeMillis() + SIX_MONTHS) { @@ -1233,6 +1264,10 @@ public class Main { tsaCert = getTsaCert(tsaAlias); } + if (tsaUrl == null && tsaCert == null) { + noTimestamp = true; + } + SignatureFile.Block block = null; try { @@ -1380,12 +1415,20 @@ public class Main { } } - if (hasExpiredCert || hasExpiringCert || notYetValidCert - || badKeyUsage || badExtendedKeyUsage - || badNetscapeCertType || chainNotValidated) { - System.out.println(); + boolean warningAppeared = false; + if (badKeyUsage || badExtendedKeyUsage || badNetscapeCertType || + notYetValidCert || chainNotValidated || hasExpiredCert) { + if (strict) { + System.out.println(rb.getString("jar.signed.with.signer.errors.")); + System.out.println(); + System.out.println(rb.getString("Error.")); + } else { + System.out.println(rb.getString("jar.signed.")); + System.out.println(); + System.out.println(rb.getString("Warning.")); + warningAppeared = true; + } - System.out.println(rb.getString("Warning.")); if (badKeyUsage) { System.out.println( rb.getString("The.signer.certificate.s.KeyUsage.extension.doesn.t.allow.code.signing.")); @@ -1404,9 +1447,6 @@ public class Main { if (hasExpiredCert) { System.out.println( rb.getString("The.signer.certificate.has.expired.")); - } else if (hasExpiringCert) { - System.out.println( - rb.getString("The.signer.certificate.will.expire.within.six.months.")); } else if (notYetValidCert) { System.out.println( rb.getString("The.signer.certificate.is.not.yet.valid.")); @@ -1416,6 +1456,24 @@ public class Main { System.out.println( rb.getString("The.signer.s.certificate.chain.is.not.validated.")); } + } else { + System.out.println(rb.getString("jar.signed.")); + } + if (hasExpiringCert || noTimestamp) { + if (!warningAppeared) { + System.out.println(); + System.out.println(rb.getString("Warning.")); + } + + if (hasExpiringCert) { + System.out.println( + rb.getString("The.signer.certificate.will.expire.within.six.months.")); + } + + if (noTimestamp) { + System.out.println( + String.format(rb.getString("no.timestamp.signing"), expireDate)); + } } // no IOException thrown in the above try clause, so disable @@ -1502,6 +1560,7 @@ public class Main { timestamp = ts.getTimestamp(); } else { timestamp = null; + noTimestamp = true; } // display the certificate(s). The first one is end-entity cert and // its KeyUsage should be checked. diff --git a/jdk/src/share/classes/sun/security/tools/jarsigner/Resources.java b/jdk/src/share/classes/sun/security/tools/jarsigner/Resources.java index 9ccc070e003..fec18903ea1 100644 --- a/jdk/src/share/classes/sun/security/tools/jarsigner/Resources.java +++ b/jdk/src/share/classes/sun/security/tools/jarsigner/Resources.java @@ -112,9 +112,9 @@ public class Resources extends java.util.ListResourceBundle { {"Please.specify.alias.name", "Please specify alias name"}, {"Only.one.alias.can.be.specified", "Only one alias can be specified"}, {"This.jar.contains.signed.entries.which.is.not.signed.by.the.specified.alias.es.", - "This jar contains signed entries which is not signed by the specified alias(es)."}, + "This jar contains signed entries which are not signed by the specified alias(es)."}, {"This.jar.contains.signed.entries.that.s.not.signed.by.alias.in.this.keystore.", - "This jar contains signed entries that's not signed by alias in this keystore."}, + "This jar contains signed entries that are not signed by alias in this keystore."}, {"s", "s"}, {"m", "m"}, {"k", "k"}, @@ -135,7 +135,10 @@ public class Resources extends java.util.ListResourceBundle { {".Unsigned.entries.", "(Unsigned entries)"}, {"jar.is.unsigned.signatures.missing.or.not.parsable.", "jar is unsigned. (signatures missing or not parsable)"}, + {"jar.signed.", "jar signed."}, + {"jar.signed.with.signer.errors.", "jar signed, with signer errors."}, {"jar.verified.", "jar verified."}, + {"jar.verified.with.signer.errors.", "jar verified, with signer errors."}, {"jarsigner.", "jarsigner: "}, {"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.", "signature filename must consist of the following characters: A-Z, 0-9, _ or -"}, @@ -193,6 +196,7 @@ public class Resources extends java.util.ListResourceBundle { "using an alternative signing mechanism"}, {"entry.was.signed.on", "entry was signed on {0}"}, {"Warning.", "Warning: "}, + {"Error.", "Error: "}, {"This.jar.contains.unsigned.entries.which.have.not.been.integrity.checked.", "This jar contains unsigned entries which have not been integrity-checked. "}, {"This.jar.contains.entries.whose.signer.certificate.has.expired.", @@ -229,6 +233,10 @@ public class Resources extends java.util.ListResourceBundle { "The signer's certificate chain is not validated."}, {"This.jar.contains.entries.whose.certificate.chain.is.not.validated.", "This jar contains entries whose certificate chain is not validated."}, + {"no.timestamp.signing", + "No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (%1$tY-%1$tm-%1$td) or after any future revocation date."}, + {"no.timestamp.verifying", + "This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (%1$tY-%1$tm-%1$td) or after any future revocation date."}, {"Unknown.password.type.", "Unknown password type: "}, {"Cannot.find.environment.variable.", "Cannot find environment variable: "}, diff --git a/jdk/src/share/classes/sun/security/util/SecurityConstants.java b/jdk/src/share/classes/sun/security/util/SecurityConstants.java index 62eb5cf3c21..ecc074aeaa1 100644 --- a/jdk/src/share/classes/sun/security/util/SecurityConstants.java +++ b/jdk/src/share/classes/sun/security/util/SecurityConstants.java @@ -144,5 +144,5 @@ public final class SecurityConstants { // java.lang.SecurityManager public static final SocketPermission LOCAL_LISTEN_PERMISSION = - new SocketPermission("localhost:1024-", SOCKET_LISTEN_ACTION); + new SocketPermission("localhost:0", SOCKET_LISTEN_ACTION); } diff --git a/jdk/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java b/jdk/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java index e49f2335961..ef7dec8570f 100644 --- a/jdk/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java +++ b/jdk/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Acre Normalzeit", "ACT", - "Acre Sommerzeit", "ACST"}; + "Acre Sommerzeit", "ACST", + "Acre Normalzeit", "ACT"}; String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien)", "CST", - "Zentrale Sommerzeit (S\u00FCdaustralien)", "CST"}; + "Zentrale Sommerzeit (S\u00FCdaustralien)", "CST", + "Zentrale Zeitzone (S\u00FCdaustralien)", "CT"}; String AGT[] = new String[] {"Argentinische Zeit", "ART", - "Argentinische Sommerzeit", "ARST"}; + "Argentinische Sommerzeit", "ARST", + "Argentinische Zeit", "ART"}; String AKST[] = new String[] {"Alaska Normalzeit", "AKST", - "Alaska Sommerzeit", "AKDT"}; + "Alaska Sommerzeit", "AKDT", + "Zeitzone f\u00FCr Alaska", "AKT"}; String AMT[] = new String[] {"Amazonas Normalzeit", "AMT", - "Amazonas Sommerzeit", "AMST"}; + "Amazonas Sommerzeit", "AMST", + "Amazonas Normalzeit", "AMT"}; String ARAST[] = new String[] {"Arabische Normalzeit", "AST", - "Arabische Sommerzeit", "ADT"}; + "Arabische Sommerzeit", "ADT", + "Zeitzone f\u00FCr Arabische Halbinsel", "AT"}; String ARMT[] = new String[] {"Armenische Zeit", "AMT", - "Armenische Sommerzeit", "AMST"}; + "Armenische Sommerzeit", "AMST", + "Armenische Zeit", "AMT"}; String AST[] = new String[] {"Atlantik Normalzeit", "AST", - "Atlantik Sommerzeit", "ADT"}; + "Atlantik Sommerzeit", "ADT", + "Zeitzone Atlantik", "AT"}; String BDT[] = new String[] {"Bangladesch Zeit", "BDT", - "Bangladesch Sommerzeit", "BDST"}; + "Bangladesch Sommerzeit", "BDST", + "Bangladesch Zeit", "BDT"}; String BRISBANE[] = new String[] {"\u00D6stliche Normalzeit (Queensland)", "EST", - "\u00D6stliche Sommerzeit (Queensland)", "EST"}; + "\u00D6stliche Sommerzeit (Queensland)", "EST", + "\u00D6stliche Zeitzone (Queensland)", "ET"}; String BROKEN_HILL[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien/New South Wales)", "CST", - "Zentrale Sommerzeit (S\u00FCdaustralien/New South Wales)", "CST"}; + "Zentrale Sommerzeit (S\u00FCdaustralien/New South Wales)", "CST", + "Zentrale Zeitzone (S\u00FCdaustralien/New South Wales)", "CT"}; String BRT[] = new String[] {"Brasilianische Zeit", "BRT", - "Brasilianische Sommerzeit", "BRST"}; + "Brasilianische Sommerzeit", "BRST", + "Brasilianische Zeit", "BRT"}; String BTT[] = new String[] {"Bhutanische Zeit", "BTT", - "Bhutanische Sommerzeit", "BTST"}; + "Bhutanische Sommerzeit", "BTST", + "Bhutanische Zeit", "BTT"}; String CAT[] = new String[] {"Zentralafrikanische Zeit", "CAT", - "Zentralafrikanische Sommerzeit", "CAST"}; + "Zentralafrikanische Sommerzeit", "CAST", + "Zentralafrikanische Zeit", "CAT"}; String CET[] = new String[] {"Mitteleurop\u00e4ische Zeit", "MEZ", - "Mitteleurop\u00e4ische Sommerzeit", "MESZ"}; + "Mitteleurop\u00e4ische Sommerzeit", "MESZ", + "Mitteleurop\u00E4ische Zeit", "MEZ"}; String CHAST[] = new String[] {"Chatham Normalzeit", "CHAST", - "Chatham Sommerzeit", "CHADT"}; + "Chatham Sommerzeit", "CHADT", + "Zeitzone f\u00FCr Chatham-Inseln", "CHAT"}; String CHUT[] = new String[] {"Chuuk Zeit", "CHUT", - "Chuuk Sommerzeit", "CHUST"}; + "Chuuk Sommerzeit", "CHUST", + "Chuuk Zeit", "CHUT"}; String CIT[] = new String[] {"Zentralindonesische Zeit", "WITA", - "Zentralindonesische Sommerzeit", "CIST"}; + "Zentralindonesische Sommerzeit", "CIST", + "Zentralindonesische Zeit", "WITA"}; String CLT[] = new String[] {"Chilenische Zeit", "CLT", - "Chilenische Sommerzeit", "CLST"}; + "Chilenische Sommerzeit", "CLST", + "Chilenische Zeit", "CLT"}; String CST[] = new String[] {"Zentrale Normalzeit", "CST", - "Zentrale Sommerzeit", "CDT"}; + "Zentrale Sommerzeit", "CDT", + "Zentrale Zeitzone", "CT"}; String CTT[] = new String[] {"Chinesische Normalzeit", "CST", - "Chinesische Sommerzeit", "CDT"}; + "Chinesische Sommerzeit", "CDT", + "Zeitzone f\u00FCr China", "CT"}; String CUBA[] = new String[] {"Kubanische Normalzeit", "CST", - "Kubanische Sommerzeit", "CDT"}; - String DARWIN[] = new String[] {"Central Normalzeit (Northern Territory)", "CST", - "Zentrale Sommerzeit (Northern Territory)", "CST"}; + "Kubanische Sommerzeit", "CDT", + "Kubanische Normalzeit", "CT"}; + String DARWIN[] = new String[] {"Zentrale Normalzeit (Northern Territory)", "CST", + "Zentrale Sommerzeit (Northern Territory)", "CST", + "Zentrale Zeitzone (Northern Territory)", "CT"}; String DUBLIN[] = new String[] {"Greenwich Zeit", "GMT", - "Irische Sommerzeit", "IST"}; + "Irische Sommerzeit", "IST", + "Irische Zeit", "IT"}; String EAT[] = new String[] {"Ostafrikanische Zeit", "EAT", - "Ostafrikanische Sommerzeit", "EAST"}; + "Ostafrikanische Sommerzeit", "EAST", + "Ostafrikanische Zeit", "EAT"}; String EASTER[] = new String[] {"Osterinseln Zeit", "EAST", - "Osterinseln Sommerzeit", "EASST"}; + "Osterinseln Sommerzeit", "EASST", + "Osterinseln Zeit", "EAST"}; String EET[] = new String[] {"Osteurop\u00e4ische Zeit", "OEZ", - "Osteurop\u00e4ische Sommerzeit", "OESZ"}; + "Osteurop\u00e4ische Sommerzeit", "OESZ", + "Osteurop\u00e4ische Zeit", "OEZ"}; String EGT[] = new String[] {"Ostgr\u00f6nl\u00e4ndische Zeit", "EGT", - "Ostgr\u00f6nl\u00e4ndische Sommerzeit", "EGST"}; + "Ostgr\u00f6nl\u00e4ndische Sommerzeit", "EGST", + "Ostgr\u00F6nl\u00E4ndische Zeit", "EGT"}; String EST[] = new String[] {"\u00d6stliche Normalzeit", "EST", - "\u00d6stliche Sommerzeit", "EDT"}; - String EST_NSW[] = new String[] {"Eastern Normalzeit (Neus\u00FCdwales)", "EST", - "\u00D6stliche Sommerzeit (New South Wales)", "EST"}; + "\u00d6stliche Sommerzeit", "EDT", + "\u00D6stliche Zeitzone", "ET"}; + String EST_NSW[] = new String[] {"\u00D6stliche Normalzeit (New South Wales)", "EST", + "\u00D6stliche Sommerzeit (New South Wales)", "EST", + "\u00D6stliche Zeitzone (New South Wales)", "ET"}; String FET[] = new String[] {"Kaliningrader Zeit", "FET", - "Kaliningrader Sommerzeit", "FEST"}; + "Kaliningrader Sommerzeit", "FEST", + "Kaliningrader Zeit", "FET"}; String GHMT[] = new String[] {"Ghanaische Normalzeit", "GMT", - "Ghanaische Sommerzeit", "GHST"}; + "Ghanaische Sommerzeit", "GHST", + "Ghanaische Normalzeit", "GMT"}; String GAMBIER[] = new String[] {"Gambier Zeit", "GAMT", - "Gambier Sommerzeit", "GAMST"}; + "Gambier Sommerzeit", "GAMST", + "Gambier Zeit", "GAMT"}; String GMT[] = new String[] {"Greenwich Zeit", "GMT", + "Greenwich Zeit", "GMT", "Greenwich Zeit", "GMT"}; String GMTBST[] = new String[] {"Greenwich Zeit", "GMT", - "Britische Sommerzeit", "BST"}; + "Britische Sommerzeit", "BST", + "Britische Zeit", "BT"}; String GST[] = new String[] {"Golf Normalzeit", "GST", - "Golf Sommerzeit", "GDT"}; + "Golf Sommerzeit", "GDT", + "Zeitzone f\u00FCr Persischen Golf", "GT"}; String HAST[] = new String[] {"Hawaii-Aleutische Normalzeit", "HAST", - "Hawaii-Aleutische Sommerzeit", "HADT"}; + "Hawaii-Aleutische Sommerzeit", "HADT", + "Zeitzone f\u00FCr Hawaii und Al\u00EButen", "HAT"}; String HKT[] = new String[] {"Hongkong Zeit", "HKT", - "Hongkong Sommerzeit", "HKST"}; + "Hongkong Sommerzeit", "HKST", + "Hongkong Zeit", "HKT"}; String HST[] = new String[] {"Hawaii Normalzeit", "HST", - "Hawaii Sommerzeit", "HDT"}; + "Hawaii Sommerzeit", "HDT", + "Zeitzone f\u00FCr Hawaii", "HT"}; String ICT[] = new String[] {"Indochina Zeit", "ICT", - "Indochina Sommerzeit", "ICST"}; + "Indochina Sommerzeit", "ICST", + "Indochina Zeit", "ICT"}; String IRT[] = new String[] {"Iranische Normalzeit", "IRST", - "Iranische Sommerzeit", "IRDT"}; + "Iranische Sommerzeit", "IRDT", + "Iranische Zeit", "IRT"}; String ISRAEL[] = new String[] {"Israelische Normalzeit", "IST", - "Israelische Sommerzeit", "IDT"}; + "Israelische Sommerzeit", "IDT", + "Zeitzone f\u00FCr Israel", "IT"}; String IST[] = new String[] {"Indische Normalzeit", "IST", - "Indische Sommerzeit", "IDT"}; + "Indische Sommerzeit", "IDT", + "Zeitzone f\u00FCr Indien", "IT"}; String JST[] = new String[] {"Japanische Normalzeit", "JST", - "Japanische Sommerzeit", "JDT"}; + "Japanische Sommerzeit", "JDT", + "Zeitzone f\u00FCr Japan", "JT"}; String KST[] = new String[] {"Koreanische Normalzeit", "KST", - "Koreanische Sommerzeit", "KDT"}; + "Koreanische Sommerzeit", "KDT", + "Zeitzone f\u00FCr Korea", "KT"}; String LORD_HOWE[] = new String[] {"Lord Howe Normalzeit", "LHST", - "Lord Howe Sommerzeit", "LHST"}; + "Lord Howe Sommerzeit", "LHST", + "Lord-Howe Normalzeit", "LHT"}; String MHT[] = new String[] {"Marshallinseln Zeit", "MHT", - "Marshallinseln Sommerzeit", "MHST"}; + "Marshallinseln Sommerzeit", "MHST", + "Marshallinseln Zeit", "MHT"}; String MSK[] = new String[] {"Moskauer Normalzeit", "MSK", - "Moskauer Sommerzeit", "MSD"}; + "Moskauer Sommerzeit", "MSD", + "Zeitzone f\u00FCr Moskau", "MT"}; String MST[] = new String[] {"Rocky Mountains Normalzeit", "MST", - "Rocky Mountains Sommerzeit", "MDT"}; + "Rocky Mountains Sommerzeit", "MDT", + "Zeitzone Mountain", "MT"}; String MYT[] = new String[] {"Malaysische Zeit", "MYT", - "Malaysische Sommerzeit", "MYST"}; + "Malaysische Sommerzeit", "MYST", + "Malaysische Zeit", "MYT"}; String NORONHA[] = new String[] {"Fernando de Noronha Zeit", "FNT", - "Fernando de Noronha Sommerzeit", "FNST"}; + "Fernando de Noronha Sommerzeit", "FNST", + "Fernando de Noronha Zeit", "FNT"}; String NOVT[] = new String[] {"Nowosibirsker Zeit", "NOVT", - "Nowosibirsker Sommerzeit", "NOVST"}; + "Nowosibirsker Sommerzeit", "NOVST", + "Nowosibirsker Zeit", "NOVT"}; String NPT[] = new String[] {"Nepalesische Zeit", "NPT", - "Nepalesische Sommerzeit", "NPST"}; + "Nepalesische Sommerzeit", "NPST", + "Nepalesische Zeit", "NPT"}; String NST[] = new String[] {"Neufundland Normalzeit", "NST", - "Neufundland Sommerzeit", "NDT"}; + "Neufundland Sommerzeit", "NDT", + "Zeitzone f\u00FCr Neufundland", "NT"}; String NZST[] = new String[] {"Neuseeland Normalzeit", "NZST", - "Neuseeland Sommerzeit", "NZDT"}; + "Neuseeland Sommerzeit", "NZDT", + "Zeitzone f\u00FCr Neuseeland", "NZT"}; String PITCAIRN[] = new String[] {"Pitcairn Normalzeit", "PST", - "Pitcairn Sommerzeit", "PDT"}; + "Pitcairn Sommerzeit", "PDT", + "Zeitzone f\u00FCr Pitcairn", "PT"}; String PKT[] = new String[] {"Pakistanische Zeit", "PKT", - "Pakistanische Sommerzeit", "PKST"}; + "Pakistanische Sommerzeit", "PKST", + "Pakistanische Zeit", "PKT"}; String PONT[] = new String[] {"Pohnpei Zeit", "PONT", - "Pohnpei Sommerzeit", "PONST"}; + "Pohnpei Sommerzeit", "PONST", + "Pohnpei-Inseln Zeit", "PONT"}; String PST[] = new String[] {"Pazifische Normalzeit", "PST", - "Pazifische Sommerzeit", "PDT"}; + "Pazifische Sommerzeit", "PDT", + "Zeitzone Pazifik", "PT"}; String SAST[] = new String[] {"S\u00fcdafrikanische Normalzeit", "SAST", - "S\u00fcdafrikanische Sommerzeit", "SAST"}; + "S\u00fcdafrikanische Sommerzeit", "SAST", + "Zeitzone f\u00FCr S\u00FCdafrika", "SAT"}; String SBT[] = new String[] {"Salomoninseln Zeit", "SBT", - "Salomoninseln Sommerzeit", "SBST"}; + "Salomoninseln Sommerzeit", "SBST", + "Salomoninseln Zeit", "SBT"}; String SGT[] = new String[] {"Singapur Zeit", "SGT", - "Singapur Sommerzeit", "SGST"}; + "Singapur Sommerzeit", "SGST", + "Singapur Zeit", "SGT"}; String SLST[] = new String[] {"Greenwich Normalzeit", "GMT", - "Sierra Leone Sommerzeit", "SLST"}; + "Sierra Leone Sommerzeit", "SLST", + "Sierra Leone Zeit", "SLT"}; String TASMANIA[] = new String[] {"\u00D6stliche Normalzeit (Tasmanien)", "EST", - "\u00D6stliche Sommerzeit (Tasmanien)", "EST"}; + "\u00D6stliche Sommerzeit (Tasmanien)", "EST", + "\u00D6stliche Zeitzone (Tasmanien)", "ET"}; String TMT[] = new String[] {"Turkmenische Zeit", "TMT", - "Turkmenische Sommerzeit", "TMST"}; + "Turkmenische Sommerzeit", "TMST", + "Turkmenische Zeit", "TMT"}; String ULAT[]= new String[] {"Ulaanbaatar Zeit", "ULAT", - "Ulaanbaatar Sommerzeit", "ULAST"}; + "Ulaanbaatar Sommerzeit", "ULAST", + "Ulaanbaatar Zeit", "ULAT"}; String WART[] = new String[] {"Westargentinische Zeit", "WART", "Westargentinische Sommerzeit", "WARST"}; String WAT[] = new String[] {"Westafrikanische Zeit", "WAT", - "Westafrikanische Sommerzeit", "WAST"}; + "Westafrikanische Sommerzeit", "WAST", + "Westafrikanische Zeit", "WAT"}; String WET[] = new String[] {"Westeurop\u00e4ische Zeit", "WEZ", - "Westeurop\u00e4ische Sommerzeit", "WESZ"}; + "Westeurop\u00e4ische Sommerzeit", "WESZ", + "Westeurop\u00E4ische Zeit", "WEZ"}; String WIT[] = new String[] {"Westindonesische Zeit", "WIB", - "Westindonesische Sommerzeit", "WIST"}; + "Westindonesische Sommerzeit", "WIST", + "Westindonesische Zeit", "WIB"}; String WST_AUS[] = new String[] {"Westliche Normalzeit (Australien)", "WST", - "Westliche Sommerzeit (Australien)", "WST"}; + "Westliche Sommerzeit (Australien)", "WST", + "Westliche Zeitzone (Australien)", "WT"}; String SAMOA[] = new String[] {"Samoa Normalzeit", "SST", - "Samoa Sommerzeit", "SDT"}; + "Samoa Sommerzeit", "SDT", + "Zeitzone f\u00FCr Samoa", "ST"}; String WST_SAMOA[] = new String[] {"West Samoa Zeit", "WST", - "West Samoa Sommerzeit", "WSDT"}; + "West Samoa Sommerzeit", "WSDT", + "West Samoa Zeit", "WST"}; String ChST[] = new String[] {"Chamorro Normalzeit", "ChST", - "Chamorro Sommerzeit", "ChDT"}; + "Chamorro Sommerzeit", "ChDT", + "Zeitzone f\u00FCr die Marianen", "ChT"}; String VICTORIA[] = new String[] {"\u00D6stliche Normalzeit (Victoria)", "EST", - "\u00D6stliche Sommerzeit (Victoria)", "EST"}; + "\u00D6stliche Sommerzeit (Victoria)", "EST", + "\u00D6stliche Zeitzone (Victoria)", "ET"}; String UTC[] = new String[] {"Koordinierte Universalzeit", "UTC", + "Koordinierte Universalzeit", "UTC", "Koordinierte Universalzeit", "UTC"}; String UZT[] = new String[] {"Usbekistan Zeit", "UZT", - "Usbekistan Sommerzeit", "UZST"}; + "Usbekistan Sommerzeit", "UZST", + "Usbekistan Zeit", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"Paraguay Zeit", "PYT", - "Paraguay Sommerzeit", "PYST"}}, + "Paraguay Sommerzeit", "PYST", + "Paraguay Zeit", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"Kolumbianische Zeit", "COT", - "Kolumbianische Sommerzeit", "COST"}}, + "Kolumbianische Sommerzeit", "COST", + "Kolumbianische Zeit", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"Venezuelanische Zeit", "VET", - "Venezuelanische Sommerzeit", "VEST"}}, + "Venezuelanische Sommerzeit", "VEST", + "Venezuelanische Zeit", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"Franz\u00f6sisch-Guiana Zeit", "GFT", - "Franz\u00f6sisch-Guiana Sommerzeit", "GFST"}}, + "Franz\u00f6sisch-Guiana Sommerzeit", "GFST", + "Franz\u00F6sisch-Guiana Zeit", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"Westgr\u00f6nl\u00e4ndische Zeit", "WGT", - "Westgr\u00f6nl\u00e4ndische Sommerzeit", "WGST"}}, + "Westgr\u00f6nl\u00e4ndische Sommerzeit", "WGST", + "Westgr\u00F6nl\u00E4ndische Zeit", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"Ecuadorianische Zeit", "ECT", - "Ecuadorianische Sommerzeit", "ECST"}}, + "Ecuadorianische Sommerzeit", "ECST", + "Ecuadorianische Zeit", "ECT"}}, {"America/Guyana", new String[] {"Guyanische Zeit", "GYT", - "Guyanische Sommerzeit", "GYST"}}, + "Guyanische Sommerzeit", "GYST", + "Guyanische Zeit", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"Bolivianische Zeit", "BOT", - "Bolivianische Sommerzeit", "BOST"}}, + "Bolivianische Sommerzeit", "BOST", + "Bolivianische Zeit", "BOT"}}, {"America/Lima", new String[] {"Peruanische Zeit", "PET", - "Peruanische Sommerzeit", "PEST"}}, + "Peruanische Sommerzeit", "PEST", + "Peruanische Zeit", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"Metlakatla Normalzeit", "MeST", - "Metlakatla Sommerzeit", "MeDT"}}, + "Metlakatla Sommerzeit", "MeDT", + "Metlakatla Normalzeit", "MeT"}}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Pierre & Miquelon Normalzeit", "PMST", - "Pierre & Miquelon Sommerzeit", "PMDT"}}, + "Pierre & Miquelon Sommerzeit", "PMDT", + "Zeitzone f\u00FCr St. Pierre und Miquelon", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"Uruguayische Zeit", "UYT", - "Uruguayische Sommerzeit", "UYST"}}, + "Uruguayische Sommerzeit", "UYST", + "Uruguayanische Zeit", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"Suriname Zeit", "SRT", - "Suriname Sommerzeit", "SRST"}}, + "Suriname Sommerzeit", "SRST", + "Suriname Zeit", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"Davis Zeit", "DAVT", - "Davis Sommerzeit", "DAVST"}}, + "Davis Sommerzeit", "DAVST", + "Davis Zeit", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville Zeit", "DDUT", - "Dumont-d'Urville Sommerzeit", "DDUST"}}, + "Dumont-d'Urville Sommerzeit", "DDUST", + "Dumont-d'Urville Zeit", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"Macquarieinsel Zeit", "MIST", - "Macquarieinsel Sommerzeit", "MIST"}}, + "Macquarieinsel Sommerzeit", "MIST", + "Macquarieinsel Zeit", "MIST"}}, {"Antarctica/Mawson", new String[] {"Mawson Zeit", "MAWT", - "Mawson Sommerzeit", "MAWST"}}, + "Mawson Sommerzeit", "MAWST", + "Mawson Zeit", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"Rothera Zeit", "ROTT", - "Rothera Sommerzeit", "ROTST"}}, + "Rothera Sommerzeit", "ROTST", + "Rothera Zeit", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Syowa Zeit", "SYOT", - "Syowa Sommerzeit", "SYOST"}}, + "Syowa Sommerzeit", "SYOST", + "Syowa Zeit", "SYOT"}}, {"Antarctica/Vostok", new String[] {"Vostok Zeit", "VOST", - "Vostok Sommerzeit", "VOSST"}}, + "Vostok Sommerzeit", "VOSST", + "Vostok Zeit", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Alma Ata Zeit", "ALMT", - "Alma-Ata Sommerzeit", "ALMST"}}, + "Alma-Ata Sommerzeit", "ALMST", + "Alma Ata Zeit", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"Anadyr Zeit", "ANAT", - "Anadyr Sommerzeit", "ANAST"}}, + "Anadyr Sommerzeit", "ANAST", + "Anadyr Zeit", "ANAT"}}, {"Asia/Aqtau", new String[] {"Aqtau Zeit", "AQTT", - "Aqtau Sommerzeit", "AQTST"}}, + "Aqtau Sommerzeit", "AQTST", + "Aqtau Zeit", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Aqtobe Zeit", "AQTT", - "Aqtobe Sommerzeit", "AQTST"}}, + "Aqtobe Sommerzeit", "AQTST", + "Aqtobe Zeit", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"Aserbaidschanische Zeit", "AZT", - "Aserbaidschanische Sommerzeit", "AZST"}}, + "Aserbaidschanische Sommerzeit", "AZST", + "Aserbaidschanische Zeit", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"Kirgisische Zeit", "KGT", - "Kirgisische Sommerzeit", "KGST"}}, + "Kirgisische Sommerzeit", "KGST", + "Kirgisische Zeit", "KGT"}}, {"Asia/Brunei", new String[] {"Brunei Zeit", "BNT", - "Brunei Sommerzeit", "BNST"}}, + "Brunei Sommerzeit", "BNST", + "Brunei Zeit", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Choibalsan Zeit", "CHOT", - "Choibalsan Sommerzeit", "CHOST"}}, + "Choibalsan Sommerzeit", "CHOST", + "Choibalsan Zeit", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"Timor-Leste Normalzeit", "TLT", - "Timor-Leste Sommerzeit", "TLST"}}, + "Timor-Leste Sommerzeit", "TLST", + "Timor-Leste Normalzeit", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"Tadschikische Zeit", "TJT", - "Tadschikische Sommerzeit", "TJST"}}, + "Tadschikische Sommerzeit", "TJST", + "Tadschikische Zeit", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"Hovd Zeit", "HOVT", - "Hovd Sommerzeit", "HOVST"}}, + "Hovd Sommerzeit", "HOVST", + "Hovd Zeit", "HOVT"}}, {"Asia/Irkutsk", new String[] {"Irkutsk Zeit", "IRKT", - "Irkutsk Sommerzeit", "IRKST"}}, + "Irkutsk Sommerzeit", "IRKST", + "Irkutsk Zeit", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"Ostindonesische Zeit", "WIT", - "Ostindonesische Sommerzeit", "EIST"}}, + "Ostindonesische Sommerzeit", "EIST", + "Ostindonesische Zeit", "WIT"}}, {"Asia/Kabul", new String[] {"Afghanistanische Zeit", "AFT", - "Afghanistanische Sommerzeit", "AFST"}}, + "Afghanistanische Sommerzeit", "AFST", + "Afghanistanische Zeit", "AFT"}}, {"Asia/Kamchatka", new String[] {"Petropawlowsk-Kamtschatkische Zeit", "PETT", - "Petropawlowsk-Kamtschatkische Sommerzeit", "PETST"}}, + "Petropawlowsk-Kamtschatkische Sommerzeit", "PETST", + "Petropawlowsk-Kamtschatkische Zeit", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, {"Asia/Khandyga", new String[] {"Chandyga Zeit", "YAKT", - "Chandyga Sommerzeit", "YAKST"}}, + "Chandyga Sommerzeit", "YAKST", + "Chandyga Zeit", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"Krasnojarsker Zeit", "KRAT", - "Krasnojarsker Sommerzeit", "KRAST"}}, + "Krasnojarsker Sommerzeit", "KRAST", + "Krasnojarsker Zeit", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Magadanische Zeit", "MAGT", - "Magadanische Sommerzeit", "MAGST"}}, + "Magadanische Sommerzeit", "MAGST", + "Magadanische Zeit", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"Philippinische Zeit", "PHT", - "Philippinische Sommerzeit", "PHST"}}, + "Philippinische Sommerzeit", "PHST", + "Philippinische Zeit", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Oral Zeit", "ORAT", - "Oral Sommerzeit", "ORAST"}}, + "Oral Sommerzeit", "ORAST", + "Oral Zeit", "ORAT"}}, {"Asia/Omsk", new String[] {"Omsk Zeit", "OMST", - "Omsk Sommerzeit", "OMSST"}}, + "Omsk Sommerzeit", "OMSST", + "Omsk Zeit", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Qyzylorda Zeit", "QYZT", - "Qyzylorda Sommerzeit", "QYZST"}}, + "Qyzylorda Sommerzeit", "QYZST", + "Qyzylorda Zeit", "QYZT"}}, {"Asia/Rangoon", new String[] {"Myanmar Zeit", "MMT", - "Myanmar Sommerzeit", "MMST"}}, + "Myanmar Sommerzeit", "MMST", + "Myanmar Zeit", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"Sakhalin Zeit", "SAKT", - "Sakhalin Sommerzeit", "SAKST"}}, + "Sakhalin Sommerzeit", "SAKST", + "Sakhalin Zeit", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"Georgische Zeit", "GET", - "Georgische Sommerzeit", "GEST"}}, + "Georgische Sommerzeit", "GEST", + "Georgische Zeit", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"Ust-Nera Zeit", "VLAT", - "Ust-Nera Sommerzeit", "VLAST"}}, + "Ust-Nera Sommerzeit", "VLAST", + "Ust-Nera Zeit", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"Wladiwostok Zeit", "VLAT", - "Wladiwostok Sommerzeit", "VLAST"}}, + "Wladiwostok Sommerzeit", "VLAST", + "Wladiwostok Zeit", "VLAT"}}, {"Asia/Yakutsk", new String[] {"Jakutsk Zeit", "YAKT", - "Jakutsk Sommerzeit", "YAKST"}}, + "Jakutsk Sommerzeit", "YAKST", + "Jakutsk Zeit", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Jekaterinburger Zeit", "YEKT", - "Jekaterinburger Sommerzeit", "YEKST"}}, + "Jekaterinburger Sommerzeit", "YEKST", + "Jekaterinburger Zeit", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"Azoren Zeit", "AZOT", - "Azoren Sommerzeit", "AZOST"}}, + "Azoren Sommerzeit", "AZOST", + "Azoren Zeit", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"Kap Verde Zeit", "CVT", - "Kap Verde Sommerzeit", "CVST"}}, + "Kap Verde Sommerzeit", "CVST", + "Kap Verde Zeit", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"South Georgia Normalzeit", "GST", - "South Georgia Sommerzeit", "GDT"}}, + "South Georgia Sommerzeit", "GDT", + "Zeitzone f\u00FCr S\u00FCdgeorgien", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"Falkland Inseln Zeit", "FKT", - "Falkland Inseln Sommerzeit", "FKST"}}, + "Falkland Inseln Sommerzeit", "FKST", + "Falkland Inseln Zeit", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"Zentral-Westliche Normalzeit (Australien)", "CWST", - "Zentral-Westliche Sommerzeit (Australien)", "CWST"}}, + "Zentral-Westliche Sommerzeit (Australien)", "CWST", + "Zentral-Westliche Normalzeit (Australien)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"Samarische Zeit", "SAMT", - "Samarische Sommerzeit", "SAMST"}}, + "Samarische Sommerzeit", "SAMST", + "Samarische Zeit", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"Wolgograder Zeit", "VOLT", - "Wolgograder Sommerzeit", "VOLST"}}, + "Wolgograder Sommerzeit", "VOLST", + "Wolgograder Zeit", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"Indischer Ozean Territorium Zeit", "IOT", - "Indischer Ozean Territorium Sommerzeit", "IOST"}}, + "Indischer Ozean Territorium Sommerzeit", "IOST", + "Indischer Ozean Territorium Zeit", "IOT"}}, {"Indian/Christmas", new String[] {"Christmas Island Zeit", "CXT", - "Christmas Island Sommerzeit", "CXST"}}, + "Christmas Island Sommerzeit", "CXST", + "Weihnachtsinseln Zeit", "CIT"}}, {"Indian/Cocos", new String[] {"Cocos Islands Zeit", "CCT", - "Cocos Islands Sommerzeit", "CCST"}}, + "Cocos Islands Sommerzeit", "CCST", + "Kokos-Inseln Zeit", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"Franz\u00f6sisch S\u00fcd- u. Antarktische Landzeit", "TFT", - "Franz\u00f6sisch S\u00fcd- u. Antarktische Landsommerzeit", "TFST"}}, + "Franz\u00f6sisch S\u00fcd- u. Antarktische Landsommerzeit", "TFST", + "Franz\u00F6sisch S\u00FCd- u. Antarktische Landzeit", "TFT"}}, {"Indian/Mahe", new String[] {"Seychellen Zeit", "SCT", - "Seychellen Sommerzeit", "SCST"}}, + "Seychellen Sommerzeit", "SCST", + "Seychellen Zeit", "SCT"}}, {"Indian/Maldives", new String[] {"Maledivische Zeit", "MVT", - "Maledivische Sommerzeit", "MVST"}}, + "Maledivische Sommerzeit", "MVST", + "Maledivische Zeit", "MVT"}}, {"Indian/Mauritius", new String[] {"Mauritius Zeit", "MUT", - "Mauritius Sommerzeit", "MUST"}}, + "Mauritius Sommerzeit", "MUST", + "Mauritius Zeit", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"Reunion Zeit", "RET", - "Reunion Sommerzeit", "REST"}}, + "Reunion Sommerzeit", "REST", + "R\u00E9union Zeit", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"Zentraleurop\u00e4ische Zeit", "MET", - "Zentraleurop\u00e4ische Sommerzeit", "MEST"}}, + "Zentraleurop\u00e4ische Sommerzeit", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"Vanuatu Zeit", "VUT", - "Vanuatu Sommerzeit", "VUST"}}, + "Vanuatu Sommerzeit", "VUST", + "Vanuatu Zeit", "VUT"}}, {"Pacific/Enderbury", new String[] {"Phoenix Inseln Zeit", "PHOT", - "Phoenix Inseln Sommerzeit", "PHOST"}}, + "Phoenix Inseln Sommerzeit", "PHOST", + "Phoenix Inseln Zeit", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"Tokelau Zeit", "TKT", - "Tokelau Sommerzeit", "TKST"}}, + "Tokelau Sommerzeit", "TKST", + "Tokelau Zeit", "TKT"}}, {"Pacific/Fiji", new String[] {"Fidschi Zeit", "FJT", - "Fidschi Sommerzeit", "FJST"}}, + "Fidschi Sommerzeit", "FJST", + "Fidschi Zeit", "FJT"}}, {"Pacific/Funafuti", new String[] {"Tuvalu Zeit", "TVT", - "Tuvalu Sommerzeit", "TVST"}}, + "Tuvalu Sommerzeit", "TVST", + "Tuvalu Zeit", "TVT"}}, {"Pacific/Galapagos", new String[] {"Galapagos Zeit", "GALT", - "Galapagos Sommerzeit", "GALST"}}, + "Galapagos Sommerzeit", "GALST", + "Galapagos Zeit", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Line Inseln Zeit", "LINT", - "Line Inseln Sommerzeit", "LINST"}}, + "Line Inseln Sommerzeit", "LINST", + "Line Inseln Zeit", "LINT"}}, {"Pacific/Kosrae", new String[] {"Kosrae Zeit", "KOST", - "Kosrae Sommerzeit", "KOSST"}}, + "Kosrae Sommerzeit", "KOSST", + "Kosrae Zeit", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"Marquesas Zeit", "MART", - "Marquesas Sommerzeit", "MARST"}}, + "Marquesas Sommerzeit", "MARST", + "Marquesas Zeit", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"Nauru Zeit", "NRT", - "Nauru Sommerzeit", "NRST"}}, + "Nauru Sommerzeit", "NRST", + "Nauru Zeit", "NRT"}}, {"Pacific/Niue", new String[] {"Niue Zeit", "NUT", - "Niue Sommerzeit", "NUST"}}, + "Niue Sommerzeit", "NUST", + "Niue Zeit", "NUT"}}, {"Pacific/Norfolk", new String[] {"Norfolk Zeit", "NFT", - "Norfolk Sommerzeit", "NFST"}}, + "Norfolk Sommerzeit", "NFST", + "Norfolk Zeit", "NFT"}}, {"Pacific/Noumea", new String[] {"Neukaledonische Zeit", "NCT", - "Neukaledonische Sommerzeit", "NCST"}}, + "Neukaledonische Sommerzeit", "NCST", + "Neukaledonische Zeit", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"Palau Zeit", "PWT", - "Palau Sommerzeit", "PWST"}}, + "Palau Sommerzeit", "PWST", + "Palau Zeit", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"Papua-Neuguinea Zeit", "PGT", - "Papua-Neuguinea Sommerzeit", "PGST"}}, + "Papua-Neuguinea Sommerzeit", "PGST", + "Papua-Neuguinea Zeit", "PGT"}}, {"Pacific/Rarotonga", new String[] {"Cook-Inseln Zeit", "CKT", - "Cook-Inseln Sommerzeit", "CKHST"}}, + "Cook-Inseln Sommerzeit", "CKHST", + "Cook-Inseln Zeit", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"Tahiti Zeit", "TAHT", - "Tahiti Sommerzeit", "TAHST"}}, + "Tahiti Sommerzeit", "TAHST", + "Tahiti Zeit", "TAHT"}}, {"Pacific/Tarawa", new String[] {"Gilbert-Inseln Zeit", "GILT", - "Gilbert-Inseln Sommerzeit", "GILST"}}, + "Gilbert-Inseln Sommerzeit", "GILST", + "Gilbert-Inseln Zeit", "GILT"}}, {"Pacific/Tongatapu", new String[] {"Tonga Zeit", "TOT", - "Tonga Sommerzeit", "TOST"}}, + "Tonga Sommerzeit", "TOST", + "Tonga Zeit", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"Wake Zeit", "WAKT", - "Wake Sommerzeit", "WAKST"}}, + "Wake Sommerzeit", "WAKST", + "Wake Zeit", "WAKT"}}, {"Pacific/Wallis", new String[] {"Wallis u. Futuna Zeit", "WFT", - "Wallis u. Futuna Sommerzeit", "WFST"}}, + "Wallis u. Futuna Sommerzeit", "WFST", + "Wallis u. Futuna Zeit", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java b/jdk/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java index 55a4040b665..aa1a8903817 100644 --- a/jdk/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java +++ b/jdk/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Hora de Acre", "ACT", - "Hora de verano de Acre", "ACST"}; + "Hora de verano de Acre", "ACST", + "Hora de Acre", "ACT"}; String ADELAIDE[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia)", "CST", - "Hora de verano Central (Sur de Australia)", "CST"}; + "Hora de verano Central (Sur de Australia)", "CST", + "Hora Central (Australia del Sur)", "CT"}; String AGT[] = new String[] {"Hora de Argentina", "ART", - "Hora de verano de Argentina", "ARST"}; + "Hora de verano de Argentina", "ARST", + "Hora de Argentina", "ART"}; String AKST[] = new String[] {"Hora est\u00e1ndar de Alaska", "AKST", - "Hora de verano de Alaska", "AKDT"}; + "Hora de verano de Alaska", "AKDT", + "Hora de Alaska", "AKT"}; String AMT[] = new String[] {"Hora est\u00e1ndar de Amazonia", "AMT", - "Hora de verano de Amazonia", "AMST"}; + "Hora de verano de Amazonia", "AMST", + "Hora est\u00E1ndar de Amazonia", "AMT"}; String ARAST[] = new String[] {"Hora est\u00e1ndar de Arabia", "AST", - "Hora de verano de Arabia", "ADT"}; + "Hora de verano de Arabia", "ADT", + "Hora de Arabia", "AT"}; String ARMT[] = new String[] {"Hora de Armenia", "AMT", - "Hora de verano de Armenia", "AMST"}; + "Hora de verano de Armenia", "AMST", + "Hora de Armenia", "AMT"}; String AST[] = new String[] {"Hora est\u00e1ndar Atl\u00e1ntico", "AST", - "Hora de verano Atl\u00e1ntico", "ADT"}; + "Hora de verano Atl\u00e1ntico", "ADT", + "Hora del Atl\u00E1ntico", "AT"}; String BDT[] = new String[] {"Hora de Bangladesh", "BDT", - "Hora de verano de Bangladesh", "BDST"}; + "Hora de verano de Bangladesh", "BDST", + "Hora de Bangladesh", "BDT"}; String BRISBANE[] = new String[] {"Hora est\u00E1ndar del Este (Queensland)", "EST", - "Hora est\u00E1ndar de verano del Este (Queensland)", "EST"}; + "Hora est\u00E1ndar de verano del Este (Queensland)", "EST", + "Hora Oriental (Queensland)", "ET"}; String BROKEN_HILL[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia/Nueva Gales del Sur)", "CST", - "Hora de verano Central (Sur de Australia/Nueva Gales del Sur)", "CST"}; + "Hora de verano Central (Sur de Australia/Nueva Gales del Sur)", "CST", + "Hora Central (Australia del Sur/Nueva Gales del Sur)", "CT"}; String BRT[] = new String[] {"Hora de Brasil", "BRT", - "Hora de verano de Brasil", "BRST"}; + "Hora de verano de Brasil", "BRST", + "Hora de Brasil", "BRT"}; String BTT[] = new String[] {"Hora de But\u00e1n", "BTT", - "Hora de verano de But\u00e1n", "BTST"}; + "Hora de verano de But\u00e1n", "BTST", + "Hora de But\u00E1n", "BTT"}; String CAT[] = new String[] {"Hora de \u00c1frica Central", "CAT", - "Hora de verano de \u00c1frica Central", "CAST"}; + "Hora de verano de \u00c1frica Central", "CAST", + "Hora de \u00C1frica Central", "CAT"}; String CET[] = new String[] {"Hora de Europa Central", "CET", - "Hora de verano de Europa Central", "CEST"}; + "Hora de verano de Europa Central", "CEST", + "Hora de Europa Central", "CET"}; String CHAST[] = new String[] {"Hora est\u00e1ndar de Chatham", "CHAST", - "Hora de verano de Chatham", "CHADT"}; - String CHUT[] = new String[] {"Chuuk Time", "CHUT", - "Chuuk Summer Time", "CHUST"}; + "Hora de verano de Chatham", "CHADT", + "Hora de Chatam", "CHAT"}; + String CHUT[] = new String[] {"Hora de Chuuk", "CHUT", + "Hora de verano de Chuuk", "CHUST", + "Hora de Chuuk", "CHUT"}; String CIT[] = new String[] {"Hora de Indonesia Central", "WITA", - "Hora de verano de Indonesia Central", "CIST"}; + "Hora de verano de Indonesia Central", "CIST", + "Hora de Indonesia Central", "WITA"}; String CLT[] = new String[] {"Hora de Chile", "CLT", - "Hora de verano de Chile", "CLST"}; + "Hora de verano de Chile", "CLST", + "Hora de Chile", "CLT"}; String CST[] = new String[] {"Hora est\u00e1ndar Central", "CST", - "Hora de verano Central", "CDT"}; + "Hora de verano Central", "CDT", + "Hora Central", "CT"}; String CTT[] = new String[] {"Hora est\u00e1ndar de China", "CST", - "Hora de verano de China", "CDT"}; + "Hora de verano de China", "CDT", + "Hora de China", "CT"}; String CUBA[] = new String[] {"Hora est\u00e1ndar de Cuba", "CST", - "Hora de verano de Cuba", "CDT"}; + "Hora de verano de Cuba", "CDT", + "Hora de Cuba", "CT"}; String DARWIN[] = new String[] {"Hora est\u00E1ndar Central (territorio del Norte)", "CST", - "Hora de verano Central (territorio del Norte)", "CST"}; + "Hora de verano Central (territorio del Norte)", "CST", + "Hora Central (Territorio Septentrional)", "CT"}; String DUBLIN[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", - "Hora de verano de Irlanda", "IST"}; + "Hora de verano de Irlanda", "IST", + "Hora de Irlanda", "IT"}; String EAT[] = new String[] {"Hora de \u00c1frica Oriental", "EAT", - "Hora de verano de \u00c1frica Oriental", "EAST"}; + "Hora de verano de \u00c1frica Oriental", "EAST", + "Hora de \u00C1frica Oriental", "EAT"}; String EASTER[] = new String[] {"Hora de la Isla de Pascua", "EAST", - "Hora de verano de la Isla de Pascua", "EASST"}; + "Hora de verano de la Isla de Pascua", "EASST", + "Hora de la Isla de Pascua", "EAST"}; String EET[] = new String[] {"Hora de Europa Oriental", "EET", - "Hora de verano de Europa Oriental", "EEST"}; + "Hora de verano de Europa Oriental", "EEST", + "Hora de Europa Oriental", "EET"}; String EGT[] = new String[] {"Hora de Groenlandia Oriental", "EGT", - "Hora de verano de Groenlandia Oriental", "EGST"}; + "Hora de verano de Groenlandia Oriental", "EGST", + "Hora de Groenlandia Oriental", "EGT"}; String EST[] = new String[] {"Hora est\u00e1ndar Oriental", "EST", - "Hora de verano Oriental", "EDT"}; + "Hora de verano Oriental", "EDT", + "Hora Oriental", "ET"}; String EST_NSW[] = new String[] {"Hora est\u00E1ndar Oriental (Nueva Gales del Sur)", "EST", - "Hora de verano Oriental (Nueva Gales del Sur)", "EST"}; + "Hora de verano Oriental (Nueva Gales del Sur)", "EST", + "Hora Oriental (Nueva Gales del Sur)", "ET"}; String FET[] = new String[] {"Hora de Europa m\u00E1s Oriental", "FET", - "Hora de verano de Europa m\u00E1s Oriental", "FEST"}; + "Hora de verano de Europa m\u00E1s Oriental", "FEST", + "Hora de Europa m\u00E1s Oriental", "FET"}; String GHMT[] = new String[] {"Hora central de Ghana", "GMT", - "Hora de verano de Ghana", "GHST"}; + "Hora de verano de Ghana", "GHST", + "Hora central de Ghana", "GMT"}; String GAMBIER[] = new String[] {"Hora de Gambier", "GAMT", - "Hora de verano de Gambier", "GAMST"}; + "Hora de verano de Gambier", "GAMST", + "Hora de Gambier", "GAMT"}; String GMT[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", + "Hora del Meridiano de Greenwich", "GMT", "Hora del Meridiano de Greenwich", "GMT"}; String GMTBST[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", - "Hora de verano de Gran Breta\u00f1a", "BST"}; + "Hora de verano de Gran Breta\u00f1a", "BST", + "Hora de Gran Breta\u00F1a", "BT"}; String GST[] = new String[] {"Hora est\u00e1ndar del Golfo", "GST", - "Hora de verano del Golfo", "GDT"}; + "Hora de verano del Golfo", "GDT", + "Hora del Golfo", "GT"}; String HAST[] = new String[] {"Hora est\u00e1ndar de Hawaii-Aleutianas", "HAST", - "Hora de verano de Hawaii-Aleutianas", "HADT"}; + "Hora de verano de Hawaii-Aleutianas", "HADT", + "Hora de Hawaii-Aleutian", "HAT"}; String HKT[] = new String[] {"Hora de Hong Kong", "HKT", - "Hora de verano de Hong Kong", "HKST"}; + "Hora de verano de Hong Kong", "HKST", + "Hora de Hong Kong", "HKT"}; String HST[] = new String[] {"Hora est\u00e1ndar de Hawaii", "HST", - "Hora de verano de Hawaii", "HDT"}; + "Hora de verano de Hawaii", "HDT", + "Hora de Hawaii", "HT"}; String ICT[] = new String[] {"Hora de Indochina", "ICT", - "Hora de verano de Indochina", "ICST"}; + "Hora de verano de Indochina", "ICST", + "Hora de Indochina", "ICT"}; String IRT[] = new String[] {"Hora est\u00e1ndar de Ir\u00e1n", "IRST", - "Hora de verano de Ir\u00e1n", "IRDT"}; + "Hora de verano de Ir\u00e1n", "IRDT", + "Hora de Ir\u00E1n", "IRT"}; String ISRAEL[] = new String[] {"Hora est\u00e1ndar de Israel", "IST", - "Hora de verano de Israel", "IDT"}; + "Hora de verano de Israel", "IDT", + "Hora de Israel", "IT"}; String IST[] = new String[] {"Hora est\u00e1ndar de India", "IST", - "Hora de verano de India", "IDT"}; + "Hora de verano de India", "IDT", + "Hora de India", "IT"}; String JST[] = new String[] {"Hora est\u00e1ndar de Jap\u00f3n", "JST", - "Hora de verano de Jap\u00f3n", "JDT"}; + "Hora de verano de Jap\u00f3n", "JDT", + "Hora de Jap\u00F3n", "JT"}; String KST[] = new String[] {"Hora est\u00e1ndar de Corea", "KST", - "Hora de verano de Corea", "KDT"}; + "Hora de verano de Corea", "KDT", + "Hora de Corea", "KT"}; String LORD_HOWE[] = new String[] {"Hora est\u00e1ndar de Lord Howe", "LHST", - "Hora de verano de Lord Howe", "LHST"}; + "Hora de verano de Lord Howe", "LHST", + "Hora de Lord Howe", "LHT"}; String MHT[] = new String[] {"Hora de las Islas Marshall", "MHT", - "Hora de verano de las Islas Marshall", "MHST"}; + "Hora de verano de las Islas Marshall", "MHST", + "Hora de Islas Marshall", "MHT"}; String MSK[] = new String[] {"Hora est\u00e1ndar de Mosc\u00fa", "MSK", - "Hora de verano de Mosc\u00fa", "MSD"}; + "Hora de verano de Mosc\u00fa", "MSD", + "Hora de Mosc\u00FA", "MT"}; String MST[] = new String[] {"Hora est\u00e1ndar de las Rocosas", "MST", - "Hora de verano de las Rocosas", "MDT"}; + "Hora de verano de las Rocosas", "MDT", + "Hora de las Monta\u00F1as Rocosas", "MT"}; String MYT[] = new String[] {"Hora de Malasia", "MYT", - "Hora de verano de Malasia", "MYST"}; + "Hora de verano de Malasia", "MYST", + "Hora de Malasia", "MYT"}; String NORONHA[] = new String[] {"Hora de Fernando de Noronha", "FNT", - "Hora de verano de Fernando de Noronha", "FNST"}; + "Hora de verano de Fernando de Noronha", "FNST", + "Hora de Fernando de Noronha", "FNT"}; String NOVT[] = new String[] {"Hora de Novosibirsk", "NOVT", - "Hora de verano de Novosibirsk", "NOVST"}; + "Hora de verano de Novosibirsk", "NOVST", + "Hora de Novosibirsk", "NOVT"}; String NPT[] = new String[] {"Hora de Nepal", "NPT", - "Hora de verano de Nepal", "NPST"}; + "Hora de verano de Nepal", "NPST", + "Hora de Nepal", "NPT"}; String NST[] = new String[] {"Hora est\u00e1ndar de Terranova", "NST", - "Hora de verano de Terranova", "NDT"}; + "Hora de verano de Terranova", "NDT", + "Hora de Terranova", "NT"}; String NZST[] = new String[] {"Hora est\u00e1ndar de Nueva Zelanda", "NZST", - "Hora de verano de Nueva Zelanda", "NZDT"}; + "Hora de verano de Nueva Zelanda", "NZDT", + "Hora de Nueva Zelanda", "NZT"}; String PITCAIRN[] = new String[] {"Hora est\u00e1ndar de Pitcairn", "PST", - "Hora de verano de Pitcairn", "PDT"}; + "Hora de verano de Pitcairn", "PDT", + "Hora de Islas Pitcairn", "PT"}; String PKT[] = new String[] {"Hora de Pakist\u00e1n", "PKT", - "Hora de verano de Pakist\u00e1n", "PKST"}; - String PONT[] = new String[] {"Pohnpei Time", "PONT", - "Pohnpei Summer Time", "PONST"}; + "Hora de verano de Pakist\u00e1n", "PKST", + "Hora de Pakist\u00E1n", "PKT"}; + String PONT[] = new String[] {"Hora de Pohnpei", "PONT", + "Hora de verano de Pohnpei", "PONST", + "Hora de Pohnpei", "PONT"}; String PST[] = new String[] {"Hora est\u00e1ndar del Pac\u00edfico", "PST", - "Hora de verano del Pac\u00edfico", "PDT"}; + "Hora de verano del Pac\u00edfico", "PDT", + "Hora del Pac\u00EDfico", "PT"}; String SAST[] = new String[] {"Hora est\u00e1ndar de Sud\u00e1frica", "SAST", - "Hora de verano de Sud\u00e1frica", "SAST"}; + "Hora de verano de Sud\u00e1frica", "SAST", + "Hora de Sud\u00E1frica", "SAT"}; String SBT[] = new String[] {"Hora de las Islas Solomon", "SBT", - "Hora de verano de las Islas Solomon", "SBST"}; + "Hora de verano de las Islas Solomon", "SBST", + "Hora de las Islas Solomon", "SBT"}; String SGT[] = new String[] {"Hora de Singapur", "SGT", - "Hora de verano de Singapur", "SGST"}; + "Hora de verano de Singapur", "SGST", + "Hora de Singapur", "SGT"}; String SLST[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", - "Hora de verano de Sierra Leona", "SLST"}; + "Hora de verano de Sierra Leona", "SLST", + "Horario de Sierra Leona", "SLT"}; String TASMANIA[] = new String[] {"Hora est\u00E1ndar del Este (Tasmania)", "EST", - "Hora de verano del Este (Tasmania)", "EST"}; + "Hora de verano del Este (Tasmania)", "EST", + "Hora Oriental (Tasmania)", "ET"}; String TMT[] = new String[] {"Hora de Turkmenist\u00e1n", "TMT", - "Hora de verano de Turkmenist\u00e1n", "TMST"}; + "Hora de verano de Turkmenist\u00e1n", "TMST", + "Hora de Turkmenist\u00E1n", "TMT"}; String ULAT[]= new String[] {"Hora de Ulan Bator", "ULAT", - "Hora de verano de Ulan Bator", "ULAST"}; + "Hora de verano de Ulan Bator", "ULAST", + "Hora de Ulan Bator", "ULAT"}; String WART[] = new String[] {"Hora de Argentina Occidental", "WART", "Hora de verano de Argentina Occidental", "WARST"}; String WAT[] = new String[] {"Hora de \u00c1frica Occidental", "WAT", - "Hora de verano de \u00c1frica Occidental", "WAST"}; + "Hora de verano de \u00c1frica Occidental", "WAST", + "Hora de \u00C1frica Occidental", "WAT"}; String WET[] = new String[] {"Hora de Europa Occidental", "WET", - "Hora de verano de Europa Occidental", "WEST"}; + "Hora de verano de Europa Occidental", "WEST", + "Hora de Europa Occidental", "WET"}; String WIT[] = new String[] {"Hora de Indonesia Occidental", "WIB", - "Indonesia Hora de verano de Indonesia Occidental", "WIST"}; + "Indonesia Hora de verano de Indonesia Occidental", "WIST", + "Hora de Indonesia Occidental", "WIB"}; String WST_AUS[] = new String[] {"Hora est\u00E1ndar Occidental (Australia)", "WST", - "Hora de verano Occidental (Australia)", "WST"}; + "Hora de verano Occidental (Australia)", "WST", + "Hora Occidental (Australia)", "WT"}; String SAMOA[] = new String[] {"Hora est\u00e1ndar de Samoa", "SST", - "Hora de verano de Samoa", "SDT"}; + "Hora de verano de Samoa", "SDT", + "Hora de Samoa", "ST"}; String WST_SAMOA[] = new String[] {"Hora de Samoa Occidental", "WST", - "Hora de verano de Samoa Occidental", "WSDT"}; + "Hora de verano de Samoa Occidental", "WSDT", + "Hora de Samoa Occidental", "WST"}; String ChST[] = new String[] {"Hora est\u00e1ndar de Chamorro", "ChST", - "Hora de verano de Chamorro", "ChDT"}; + "Hora de verano de Chamorro", "ChDT", + "Hora de Chamorro", "ChT"}; String VICTORIA[] = new String[] {"Hora est\u00E1ndar del Este (Victoria)", "EST", - "Hora de verano del Este (Victoria)", "EST"}; + "Hora de verano del Este (Victoria)", "EST", + "Hora Oriental (Victoria)", "ET"}; String UTC[] = new String[] {"Hora Universal Coordinada", "UTC", + "Hora Universal Coordinada", "UTC", "Hora Universal Coordinada", "UTC"}; String UZT[] = new String[] {"Hora de Uzbekist\u00e1n", "UZT", - "Hora de verano de Uzbekist\u00e1n", "UZST"}; + "Hora de verano de Uzbekist\u00e1n", "UZST", + "Hora de Uzbekist\u00E1n", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"Hora de Paraguay", "PYT", - "Hora de verano de Paraguay", "PYST"}}, + "Hora de verano de Paraguay", "PYST", + "Hora de Paraguay", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"Hora de Colombia", "COT", - "Hora de verano de Colombia", "COST"}}, + "Hora de verano de Colombia", "COST", + "Hora de Colombia", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"Hora de Venezuela", "VET", - "Hora de verano de Venezuela", "VEST"}}, + "Hora de verano de Venezuela", "VEST", + "Hora de Venezuela", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"Hora de la Guayana Francesa", "GFT", - "Hora de verano de la Guayana Francesa", "GFST"}}, + "Hora de verano de la Guayana Francesa", "GFST", + "Hora de la Guayana Francesa", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"Hora de Groenlandia Occidental", "WGT", - "Hora de verano de Groenlandia Occidental", "WGST"}}, + "Hora de verano de Groenlandia Occidental", "WGST", + "Hora de Groenlandia Occidental", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"Hora de Ecuador", "ECT", - "Hora de verano de Ecuador", "ECST"}}, + "Hora de verano de Ecuador", "ECST", + "Hora de Ecuador", "ECT"}}, {"America/Guyana", new String[] {"Hora de Guyana", "GYT", - "Hora de verano de Guyana", "GYST"}}, + "Hora de verano de Guyana", "GYST", + "Hora de Guyana", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"Hora de Bolivia", "BOT", - "Hora de verano de Bolivia", "BOST"}}, + "Hora de verano de Bolivia", "BOST", + "Hora de Bolivia", "BOT"}}, {"America/Lima", new String[] {"Hora de Per\u00fa", "PET", - "Hora de verano de Per\u00fa", "PEST"}}, + "Hora de verano de Per\u00fa", "PEST", + "Hora de Per\u00FA", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -399,14 +484,17 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Mendoza", AGT}, {"America/Menominee", CST}, {"America/Merida", CST}, - {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", - "Metlakatla Daylight Time", "MeDT"}}, + {"America/Metlakatla", new String[] {"Hora de Metlakatla", "MeST", + "Hora de verano de Metlakatla", "MeDT", + "Metlakatla Time", "MeT"}}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Hora est\u00e1ndar de Pierre & Miquelon", "PMST", - "Hora de verano de Pierre & Miquelon", "PMDT"}}, + "Hora de verano de Pierre & Miquelon", "PMDT", + "Hora de San Pedro y Miquel\u00F3n", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"Hora de Uruguay", "UYT", - "Hora de verano de Uruguay", "UYST"}}, + "Hora de verano de Uruguay", "UYST", + "Hora de Uruguay", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"Hora de Surinam", "SRT", - "Hora de verano de Surinam", "SRST"}}, + "Hora de verano de Surinam", "SRST", + "Hora de Surinam", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"Hora de Davis", "DAVT", - "Hora de verano de Davis", "DAVST"}}, + "Hora de verano de Davis", "DAVST", + "Hora de Davis", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Hora de Dumont-d'Urville", "DDUT", - "Hora de verano de Dumont-d'Urville", "DDUST"}}, - {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", - "Macquarie Island Summer Time", "MIST"}}, + "Hora de verano de Dumont-d'Urville", "DDUST", + "Hora de Dumont-d'Urville", "DDUT"}}, + {"Antarctica/Macquarie", new String[] {"Hora de Isla Macquarie", "MIST", + "Hora de verano de Isla Macquarie", "MIST", + "Hora de Isla Macquarie", "MIST"}}, {"Antarctica/Mawson", new String[] {"Hora de Mawson", "MAWT", - "Hora de verano de Mawson", "MAWST"}}, + "Hora de verano de Mawson", "MAWST", + "Hora de Mawson", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"Hora de Rothera", "ROTT", - "Hora de verano de Rothera", "ROTST"}}, + "Hora de verano de Rothera", "ROTST", + "Hora de Rothera", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Hora de Syowa", "SYOT", - "Hora de verano de Syowa", "SYOST"}}, + "Hora de verano de Syowa", "SYOST", + "Hora de Syowa", "SYOT"}}, {"Antarctica/Vostok", new String[] {"Hora de Vostok", "VOST", - "Hora de verano de Vostok", "VOSST"}}, + "Hora de verano de Vostok", "VOSST", + "Hora de Vostok", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Hora de Alma-Ata", "ALMT", - "Hora de verano de Alma-Ata", "ALMST"}}, + "Hora de verano de Alma-Ata", "ALMST", + "Hora de Alma-Ata", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"Hora de Anadyr", "ANAT", - "Hora de verano de Anadyr", "ANAST"}}, + "Hora de verano de Anadyr", "ANAST", + "Hora de Anadyr", "ANAT"}}, {"Asia/Aqtau", new String[] {"Hora de Aqtau", "AQTT", - "Hora de verano de Aqtau", "AQTST"}}, + "Hora de verano de Aqtau", "AQTST", + "Hora de Aqtau", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Hora de Aqtobe", "AQTT", - "Hora de verano de Aqtobe", "AQTST"}}, + "Hora de verano de Aqtobe", "AQTST", + "Hora de Aqtobe", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"Hora de Azerbaiy\u00e1n", "AZT", - "Hora de verano de Azerbaiy\u00e1n", "AZST"}}, + "Hora de verano de Azerbaiy\u00e1n", "AZST", + "Hora de Azerbaiy\u00E1n", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"Hora de Kirguizist\u00e1n", "KGT", - "Hora de verano de Kirguizist\u00e1n", "KGST"}}, + "Hora de verano de Kirguizist\u00e1n", "KGST", + "Hora de Kirguizist\u00E1n", "KGT"}}, {"Asia/Brunei", new String[] {"Hora de Brunei", "BNT", - "Hora de verano de Brunei", "BNST"}}, + "Hora de verano de Brunei", "BNST", + "Hora de Brunei", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Hora de Choibalsan", "CHOT", - "Hora de verano de Choibalsan", "CHOST"}}, + "Hora de verano de Choibalsan", "CHOST", + "Hora de Choibalsan", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"Hora de Timor Leste", "TLT", - "Hora de verano de Timor Leste", "TLST"}}, + "Hora de verano de Timor Leste", "TLST", + "Hora de Timor Leste", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"Hora de Tajikist\u00e1n", "TJT", - "Hora de verano de Tajikist\u00e1n", "TJST"}}, + "Hora de verano de Tajikist\u00e1n", "TJST", + "Hora de Tajikist\u00E1n", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"Hora de Hovd", "HOVT", - "Hora de verano de Hovd", "HOVST"}}, + "Hora de verano de Hovd", "HOVST", + "Hora de Hovd", "HOVT"}}, {"Asia/Irkutsk", new String[] {"Hora de Irkutsk", "IRKT", - "Hora de verano de Irkutsk", "IRKST"}}, + "Hora de verano de Irkutsk", "IRKST", + "Hora de Irkutsk", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"Hora de Indonesia Oriental", "WIT", - "Hora de verano de Indonesia Oriental", "EIST"}}, + "Hora de verano de Indonesia Oriental", "EIST", + "Hora de Indonesia Oriental", "WIT"}}, {"Asia/Kabul", new String[] {"Hora de Afganist\u00e1n", "AFT", - "Hora de verano de Afganist\u00e1n", "AFST"}}, + "Hora de verano de Afganist\u00e1n", "AFST", + "Hora de Afganist\u00E1n", "AFT"}}, {"Asia/Kamchatka", new String[] {"Hora de Petropavlovsk-Kamchatski", "PETT", - "Hora de verano de Petropavlovsk-Kamchatski", "PETST"}}, + "Hora de verano de Petropavlovsk-Kamchatski", "PETST", + "Hora de Petropavlovsk-Kamchatski", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, {"Asia/Khandyga", new String[] {"Hora de Khandyga", "YAKT", - "Hora de verano de Khandyga", "YAKST"}}, + "Hora de verano de Khandyga", "YAKST", + "Hora de Khandyga", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"Hora de Krasnoyarsk", "KRAT", - "Hora de verano de Krasnoyarsk", "KRAST"}}, + "Hora de verano de Krasnoyarsk", "KRAST", + "Hora de Krasnoyarsk", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Hora de Magad\u00e1n", "MAGT", - "Hora de verano de Magad\u00e1n", "MAGST"}}, + "Hora de verano de Magad\u00e1n", "MAGST", + "Hora de Magad\u00E1n", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"Hora de Filipinas", "PHT", - "Hora de verano de Filipinas", "PHST"}}, + "Hora de verano de Filipinas", "PHST", + "Hora de Filipinas", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Hora de Uralsk", "ORAT", - "Hora de verano de Uralsk", "ORAST"}}, + "Hora de verano de Uralsk", "ORAST", + "Hora de Uralsk", "ORAT"}}, {"Asia/Omsk", new String[] {"Hora de Omsk", "OMST", - "Hora de verano de Omsk", "OMSST"}}, + "Hora de verano de Omsk", "OMSST", + "Hora de Omsk", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Hora de Qyzylorda", "QYZT", - "Hora de verano de Qyzylorda", "QYZST"}}, + "Hora de verano de Qyzylorda", "QYZST", + "Hora de Qyzylorda", "QYZT"}}, {"Asia/Rangoon", new String[] {"Hora de Myanmar", "MMT", - "Hora de verano de Myanmar", "MMST"}}, + "Hora de verano de Myanmar", "MMST", + "Hora de Myanmar", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"Hora de Sajalin", "SAKT", - "Hora de verano de Sajalin", "SAKST"}}, + "Hora de verano de Sajalin", "SAKST", + "Hora de Sajalin", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"Hora de Georgia", "GET", - "Hora de verano de Georgia", "GEST"}}, + "Hora de verano de Georgia", "GEST", + "Hora de Georgia", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"Hora de Ust-Nera", "VLAT", - "Hora de verano de Ust-Nera", "VLAST"}}, + "Hora de verano de Ust-Nera", "VLAST", + "Hora de Ust-Nera", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"Hora de Vladivostok", "VLAT", - "Hora de verano de Vladivostok", "VLAST"}}, + "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 verano de Yakutsk", "YAKST", + "Hora de Yakutsk", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Hora de Ekaterinburgo", "YEKT", - "Hora de verano de Ekaterinburgo", "YEKST"}}, + "Hora de verano de Ekaterinburgo", "YEKST", + "Hora de Ekaterinburgo", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"Hora de Azores", "AZOT", - "Hora de verano de Azores", "AZOST"}}, + "Hora de verano de Azores", "AZOST", + "Hora de Azores", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"Hora de Cabo Verde", "CVT", - "Hora de verano de Cabo Verde", "CVST"}}, + "Hora de verano de Cabo Verde", "CVST", + "Hora de Cabo Verde", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"Hora est\u00e1ndar de Georgia del Sur", "GST", - "Hora de verano de Georgia del Sur", "GDT"}}, + "Hora de verano de Georgia del Sur", "GDT", + "Hora de Georgia del Sur", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"Hora de las islas Malvinas", "FKT", - "Hora de verano de las islas Malvinas", "FKST"}}, + "Hora de verano de las islas Malvinas", "FKST", + "Hora de las islas Malvinas", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"Hora est\u00E1ndar de Australia Central y Occidental", "CWST", - "Hora est\u00E1ndar de verano de Australia Central y Occidental", "CWST"}}, + "Hora est\u00E1ndar de verano de Australia Central y Occidental", "CWST", + "Hora de Australia Central y Occidental", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"Hora de Samara", "SAMT", - "Hora de verano de Samara", "SAMST"}}, + "Hora de verano de Samara", "SAMST", + "Hora de Samara", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"Hora de Volgogrado", "VOLT", - "Hora de verano de Volgogrado", "VOLST"}}, + "Hora de verano de Volgogrado", "VOLST", + "Hora de Volgogrado", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"Hora del Territorio del Oc\u00e9ano \u00cdndico", "IOT", - "Hora de verano del Territorio del Oc\u00e9ano \u00cdndico", "IOST"}}, + "Hora de verano del Territorio del Oc\u00e9ano \u00cdndico", "IOST", + "Hora del Territorio del Oc\u00E9ano \u00CDndico", "IOT"}}, {"Indian/Christmas", new String[] {"Hora de la isla de Christmas", "CXT", - "Hora de verano de la isla de Christmas", "CXST"}}, + "Hora de verano de la isla de Christmas", "CXST", + "Hora de la isla de Christmas", "CIT"}}, {"Indian/Cocos", new String[] {"Hora de las islas Cocos", "CCT", - "Hora de verano de las islas Cocos", "CCST"}}, + "Hora de verano de las islas Cocos", "CCST", + "Hora de las islas Cocos", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"Hora de los Territorios Franceses del Sur y de la Ant\u00e1rtida", "TFT", - "Hora de verano de los Territorios Franceses del Sur y de la Ant\u00e1rtida", "TFST"}}, + "Hora de verano de los Territorios Franceses del Sur y de la Ant\u00e1rtida", "TFST", + "Hora de los Territorios Franceses del Sur y de la Ant\u00E1rtida", "TFT"}}, {"Indian/Mahe", new String[] {"Hora de Seychelles", "SCT", - "Hora de verano de Seychelles", "SCST"}}, + "Hora de verano de Seychelles", "SCST", + "Hora de Seychelles", "SCT"}}, {"Indian/Maldives", new String[] {"Hora de Maldivas", "MVT", - "Hora de verano de Maldivas", "MVST"}}, + "Hora de verano de Maldivas", "MVST", + "Hora de Maldivas", "MVT"}}, {"Indian/Mauritius", new String[] {"Hora de Mauricio", "MUT", - "Hora de verano de Mauricio", "MUST"}}, + "Hora de verano de Mauricio", "MUST", + "Hora de Mauricio", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"Hora de Reuni\u00f3n", "RET", - "Hora de verano de Reuni\u00f3n", "REST"}}, + "Hora de verano de Reuni\u00f3n", "REST", + "Hora de Reuni\u00F3n", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"Hora de Europa Central", "MET", - "Hora de verano de Europa Central", "MEST"}}, + "Hora de verano de Europa Central", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"Hora de Vanuatu", "VUT", - "Hora de verano de Vanuatu", "VUST"}}, + "Hora de verano de Vanuatu", "VUST", + "Hora de Vanuatu", "VUT"}}, {"Pacific/Enderbury", new String[] {"Hora de la isla Phoenix", "PHOT", - "Hora de verano de la isla Phoenix", "PHOST"}}, + "Hora de verano de la isla Phoenix", "PHOST", + "Hora de la isla Phoenix", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"Hora de Tokelau", "TKT", - "Hora de verano de Tokelau", "TKST"}}, + "Hora de verano de Tokelau", "TKST", + "Hora de Tokelau", "TKT"}}, {"Pacific/Fiji", new String[] {"Hora de Fiji", "FJT", - "Hora de verano de Fiji", "FJST"}}, + "Hora de verano de Fiji", "FJST", + "Hora de Fiji", "FJT"}}, {"Pacific/Funafuti", new String[] {"Hora de Tuvalu", "TVT", - "Hora de verano de Tuvalu", "TVST"}}, + "Hora de verano de Tuvalu", "TVST", + "Hora de Tuvalu", "TVT"}}, {"Pacific/Galapagos", new String[] {"Hora de Gal\u00e1pagos", "GALT", - "Hora de verano de Gal\u00e1pagos", "GALST"}}, + "Hora de verano de Gal\u00e1pagos", "GALST", + "Hora de Gal\u00E1pagos", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Hora de las islas Line", "LINT", - "Hora de verano de las islas Line", "LINST"}}, + "Hora de verano de las islas Line", "LINST", + "Hora de las islas Line", "LINT"}}, {"Pacific/Kosrae", new String[] {"Hora de Kosrae", "KOST", - "Hora de verano de Kosrae", "KOSST"}}, + "Hora de verano de Kosrae", "KOSST", + "Hora de Kosrae", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"Hora de Marquesas", "MART", - "Hora de verano de Marquesas", "MARST"}}, + "Hora de verano de Marquesas", "MARST", + "Hora de Marquesas", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"Hora de Nauru", "NRT", - "Hora de verano de Nauru", "NRST"}}, + "Hora de verano de Nauru", "NRST", + "Hora de Nauru", "NRT"}}, {"Pacific/Niue", new String[] {"Hora de Niue", "NUT", - "Hora de verano de Niue", "NUST"}}, + "Hora de verano de Niue", "NUST", + "Hora de Niue", "NUT"}}, {"Pacific/Norfolk", new String[] {"Hora de Norfolk", "NFT", - "Hora de verano de Norfolk", "NFST"}}, + "Hora de verano de Norfolk", "NFST", + "Hora de Norfolk", "NFT"}}, {"Pacific/Noumea", new String[] {"Hora de Nueva Caledonia", "NCT", - "Hora de verano de Nueva Caledonia", "NCST"}}, + "Hora de verano de Nueva Caledonia", "NCST", + "Hora de Nueva Caledonia", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"Hora de Palau", "PWT", - "Hora de verano de Palau", "PWST"}}, + "Hora de verano de Palau", "PWST", + "Hora de Palau", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"Hora de Pap\u00faa-Nueva Guinea", "PGT", - "Hora de verano de Pap\u00faa-Nueva Guinea", "PGST"}}, + "Hora de verano de Pap\u00faa-Nueva Guinea", "PGST", + "Hora de Pap\u00FAa-Nueva Guinea", "PGT"}}, {"Pacific/Rarotonga", new String[] {"Hora de las islas Cook", "CKT", - "Hora de verano de las islas Cook", "CKHST"}}, + "Hora de verano de las islas Cook", "CKHST", + "Hora de las islas Cook", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"Hora de Tahit\u00ed", "TAHT", - "Hora de verano de Tahit\u00ed", "TAHST"}}, + "Hora de verano de Tahit\u00ed", "TAHST", + "Hora de Tahit\u00ED", "TAHT"}}, {"Pacific/Tarawa", new String[] {"Hora de las islas Gilbert", "GILT", - "Hora de verano de las islas Gilbert", "GILST"}}, + "Hora de verano de las islas Gilbert", "GILST", + "Hora de las islas Gilbert", "GILT"}}, {"Pacific/Tongatapu", new String[] {"Hora de Tonga", "TOT", - "Hora de verano de Tonga", "TOST"}}, + "Hora de verano de Tonga", "TOST", + "Hora de Tonga", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"Hora de Wake", "WAKT", - "Hora de verano de Wake", "WAKST"}}, + "Hora de verano de Wake", "WAKST", + "Hora de Wake", "WAKT"}}, {"Pacific/Wallis", new String[] {"Hora de Wallis y Futuna", "WFT", - "Hora de verano de Wallis y Futuna", "WFST"}}, + "Hora de verano de Wallis y Futuna", "WFST", + "Hora de Wallis y Futuna", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java b/jdk/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java index 3f9565ef48c..a28983b85db 100644 --- a/jdk/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java +++ b/jdk/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Heure de l'Acre", "ACT", - "Heure d'\u00e9t\u00e9 de l'Acre", "ACST"}; + "Heure d'\u00e9t\u00e9 de l'Acre", "ACST", + "Heure de l'Acre", "ACT"}; String ADELAIDE[] = new String[] {"Heure standard d'Australie centrale (Australie du sud)", "CST", - "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud)", "CST"}; + "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud)", "CST", + "Centre (Australie-M\u00E9ridionale)", "CT"}; String AGT[] = new String[] {"Heure D'Argentine", "ART", - "Heure d'\u00e9t\u00e9 D'Argentine", "ARST"} ; + "Heure d'\u00e9t\u00e9 D'Argentine", "ARST", + "Heure d'Argentine", "ART"} ; String AKST[] = new String[] {"Heure normale d'Alaska", "AKST", - "Heure avanc\u00e9e d'Alaska", "AKDT"} ; + "Heure avanc\u00e9e d'Alaska", "AKDT", + "Alaska", "AKT"} ; String AMT[] = new String[] {"Heure normale d'Amazonie", "AMT", - "Heure d'\u00e9t\u00e9 d'Amazonie", "AMST"} ; + "Heure d'\u00e9t\u00e9 d'Amazonie", "AMST", + "Heure d'Amazonie", "AMT"} ; String ARAST[] = new String[] {"Heure normale d'Arabie", "AST", - "Heure avanc\u00e9e d'Arabie", "ADT"} ; + "Heure avanc\u00e9e d'Arabie", "ADT", + "Arabie", "AT"} ; String ARMT[] = new String[] {"Heure d'Arm\u00e9nie", "AMT", - "Heure d'\u00e9t\u00e9 d'Arm\u00e9nie", "AMST"} ; + "Heure d'\u00e9t\u00e9 d'Arm\u00e9nie", "AMST", + "Heure d'Arm\u00E9nie", "AMT"} ; String AST[] = new String[] {"Heure normale de l'Atlantique", "AST", - "Heure avanc\u00e9e de l'Atlantique", "ADT"} ; + "Heure avanc\u00e9e de l'Atlantique", "ADT", + "Atlantique", "AT"} ; String BDT[] = new String[] {"Heure du Bangladesh", "BDT", - "Heure d'\u00e9t\u00e9 du Bangladesh", "BDST"} ; + "Heure d'\u00e9t\u00e9 du Bangladesh", "BDST", + "Heure du Bangladesh", "BDT"} ; String BRISBANE[] = new String[] {"Heure standard d'Australie orientale (Queensland)", "EST", - "Heure d'\u00E9t\u00E9 d'Australie orientale (Queensland)", "EST"}; + "Heure d'\u00E9t\u00E9 d'Australie orientale (Queensland)", "EST", + "C\u00F4te Est (Queensland)", "ET"}; String BROKEN_HILL[] = new String[] {"Heure standard d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST", - "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST"}; + "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST", + "Centre (Australie-M\u00E9ridionale/Nouvelle-Galles du Sud)", "CT"}; String BRT[] = new String[] {"Heure du Br\u00e9sil", "BRT", - "Heure d'\u00e9t\u00e9 du Br\u00e9sil", "BRST"} ; + "Heure d'\u00e9t\u00e9 du Br\u00e9sil", "BRST", + "Heure du Br\u00E9sil", "BRT"} ; String BTT[] = new String[] {"Heure du Bhoutan", "BTT", - "Heure d'\u00e9t\u00e9 du Bhoutan", "BTST"} ; + "Heure d'\u00e9t\u00e9 du Bhoutan", "BTST", + "Heure du Bhoutan", "BTT"} ; String CAT[] = new String[] {"Heure d'Afrique centrale", "CAT", - "Heure d'\u00e9t\u00e9 d'Afrique centrale", "CAST"} ; + "Heure d'\u00e9t\u00e9 d'Afrique centrale", "CAST", + "Heure d'Afrique centrale", "CAT"} ; String CET[] = new String[] {"Heure d'Europe centrale", "CET", - "Heure d'\u00e9t\u00e9 d'Europe centrale", "CEST"} ; + "Heure d'\u00e9t\u00e9 d'Europe centrale", "CEST", + "Heure d'Europe centrale", "CET"} ; String CHAST[] = new String[] {"Heure standard de Chatham", "CHAST", - "Heure avanc\u00e9e de Chatham", "CHADT"}; + "Heure avanc\u00e9e de Chatham", "CHADT", + "Chatham", "CHAT"}; String CHUT[] = new String[] {"Heure de Chuuk", "CHUT", - "Heure d'\u00E9t\u00E9 de Chuuk", "CHUST"}; + "Heure d'\u00E9t\u00E9 de Chuuk", "CHUST", + "Heure de Chuuk", "CHUT"}; String CIT[] = new String[] {"Heure d'Indon\u00e9sie centrale", "WITA", - "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie centrale", "CIST"}; + "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie centrale", "CIST", + "Heure d'Indon\u00E9sie centrale", "WITA"}; String CLT[] = new String[] {"Heure du Chili", "CLT", - "Heure d'\u00e9t\u00e9 du Chili", "CLST"} ; + "Heure d'\u00e9t\u00e9 du Chili", "CLST", + "Heure du Chili", "CLT"} ; String CST[] = new String[] {"Heure normale du Centre", "CST", - "Heure avanc\u00e9e du Centre", "CDT"} ; + "Heure avanc\u00e9e du Centre", "CDT", + "Centre", "CT"} ; String CTT[] = new String[] {"Heure normale de Chine", "CST", - "Heure avanc\u00e9e de Chine", "CDT"} ; + "Heure avanc\u00e9e de Chine", "CDT", + "Chine", "CT"} ; String CUBA[] = new String[] {"Heure standard de Cuba", "CST", - "Heure d'\u00e9t\u00e9 de Cuba", "CDT"}; + "Heure d'\u00e9t\u00e9 de Cuba", "CDT", + "Heure de Cuba", "CT"}; String DARWIN[] = new String[] {"Heure standard d'Australie centrale (Territoire du Nord)", "CST", - "Heure d'\u00E9t\u00E9 d'Australie centrale (Territoire du Nord)", "CST"}; + "Heure d'\u00E9t\u00E9 d'Australie centrale (Territoire du Nord)", "CST", + "Centre (Territoire du Nord)", "CT"}; String DUBLIN[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT", - "Heure d'\u00e9t\u00e9 irlandaise", "IST"}; + "Heure d'\u00e9t\u00e9 irlandaise", "IST", + "Heure irlandaise", "IT"}; String EAT[] = new String[] {"Heure d'Afrique de l'Est", "EAT", - "Heure d'\u00e9t\u00e9 d'Afrique de l'Est", "EAST"} ; + "Heure d'\u00e9t\u00e9 d'Afrique de l'Est", "EAST", + "Heure d'Afrique de l'Est", "EAT"} ; String EASTER[] = new String[] {"Heure de l'Ile de P\u00e2ques", "EAST", - "Heure d'\u00e9t\u00e9 de l'Ile de P\u00e2ques", "EASST"}; + "Heure d'\u00e9t\u00e9 de l'Ile de P\u00e2ques", "EASST", + "Heure de l'Ile de P\u00E2ques", "EAST"}; String EET[] = new String[] {"Heure d'Europe de l'Est", "EET", - "Heure d'\u00e9t\u00e9 d'Europe de l'Est", "EEST"} ; + "Heure d'\u00e9t\u00e9 d'Europe de l'Est", "EEST", + "Heure d'Europe de l'Est", "EET"} ; String EGT[] = new String[] {"Heure du Groenland de l'Est", "EGT", - "Heure d'\u00e9t\u00e9 du Groenland de l'Est", "EGST"} ; + "Heure d'\u00e9t\u00e9 du Groenland de l'Est", "EGST", + "Heure du Groenland de l'Est", "EGT"} ; String EST[] = new String[] {"Heure normale de l'Est", "EST", - "Heure avanc\u00e9e de l'Est", "EDT"} ; + "Heure avanc\u00e9e de l'Est", "EDT", + "C\u00F4te Est", "ET"} ; String EST_NSW[] = new String[] {"Heure normale de l'Est (Nouvelle-Galles du Sud)", "EST", - "Heure d'\u00E9t\u00E9 de l'Est (Nouvelle-Galles du Sud)", "EST"} ; + "Heure d'\u00E9t\u00E9 de l'Est (Nouvelle-Galles du Sud)", "EST", + "C\u00F4te Est (Nouvelle-Galles du Sud)", "ET"} ; String FET[] = new String[] {"Heure d'Europe de l'Est UTC+3", "FET", - "Heure d'\u00E9t\u00E9 d'Europe de l'Est UTC+3", "FEST"}; + "Heure d'\u00E9t\u00E9 d'Europe de l'Est UTC+3", "FEST", + "Heure d'Europe de l'Est UTC+3", "FET"}; String GHMT[] = new String[] {"Heure du Ghana", "GMT", - "Heure d'\u00e9t\u00e9 du Ghana", "GHST"}; + "Heure d'\u00e9t\u00e9 du Ghana", "GHST", + "Heure du Ghana", "GMT"}; String GAMBIER[] = new String[] {"Heure de Gambi", "GAMT", - "Heure d'\u00e9t\u00e9 de Gambi", "GAMST"}; + "Heure d'\u00e9t\u00e9 de Gambi", "GAMST", + "Heure de Gambi", "GAMT"}; String GMT[] = new String[] {"Heure de Greenwich", "GMT", + "Heure de Greenwich", "GMT", "Heure de Greenwich", "GMT"} ; String GMTBST[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT", - "Heure d'\u00e9t\u00e9 britannique", "BST"}; + "Heure d'\u00e9t\u00e9 britannique", "BST", + "Heure britannique", "BT"}; String GST[] = new String[] {"Heure normale du Golfe", "GST", - "Heure avanc\u00e9e du Golfe", "GDT"} ; + "Heure avanc\u00e9e du Golfe", "GDT", + "Golfe", "GT"} ; String HAST[] = new String[] {"Heure normale d'Hawa\u00ef-Al\u00e9outiennes", "HAST", - "Heure avanc\u00e9e d'Hawa\u00ef-Al\u00e9outiennes", "HADT"} ; + "Heure avanc\u00e9e d'Hawa\u00ef-Al\u00e9outiennes", "HADT", + "Hawa\u00EF-Iles Al\u00E9outiennes", "HAT"} ; String HKT[] = new String[] {"Heure de Hong Kong", "HKT", - "Heure d'\u00e9t\u00e9 de Hong Kong", "HKST"}; + "Heure d'\u00e9t\u00e9 de Hong Kong", "HKST", + "Heure de Hong-Kong", "HKT"}; String HST[] = new String[] {"Heure normale d'Hawa\u00ef", "HST", - "Heure avanc\u00e9e d'Hawa\u00ef", "HDT"} ; + "Heure avanc\u00e9e d'Hawa\u00ef", "HDT", + "Hawa\u00EF", "HT"} ; String ICT[] = new String[] {"Heure d'Indochine", "ICT", - "Heure d'\u00e9t\u00e9 d'Indochine", "ICST"} ; + "Heure d'\u00e9t\u00e9 d'Indochine", "ICST", + "Heure d'Indochine", "ICT"} ; String IRT[] = new String[] {"Heure normale d'Iran", "IRST", - "Heure avanc\u00e9e d'Iran", "IRDT"} ; + "Heure avanc\u00e9e d'Iran", "IRDT", + "Heure d'Iran", "IRT"} ; String ISRAEL[] = new String[] {"Heure standard d'Isra\u00ebl", "IST", - "Heure avanc\u00e9e d'Isra\u00ebl", "IDT"}; + "Heure avanc\u00e9e d'Isra\u00ebl", "IDT", + "Isra\u00EBl", "IT"}; String IST[] = new String[] {"Heure normale d'Inde", "IST", - "Heure avanc\u00e9e d'Inde", "IDT"} ; + "Heure avanc\u00e9e d'Inde", "IDT", + "Inde", "IT"} ; String JST[] = new String[] {"Heure normale du Japon", "JST", - "Heure avanc\u00e9e du Japon", "JDT"} ; + "Heure avanc\u00e9e du Japon", "JDT", + "Japon", "JT"} ; String KST[] = new String[] {"Heure normale de Cor\u00e9e", "KST", - "Heure avanc\u00e9e de Cor\u00e9e", "KDT"} ; + "Heure avanc\u00e9e de Cor\u00e9e", "KDT", + "Cor\u00E9e", "KT"} ; String LORD_HOWE[] = new String[] {"Heure standard de Lord Howe", "LHST", - "Heure d'\u00e9t\u00e9 de Lord Howe", "LHST"}; + "Heure d'\u00e9t\u00e9 de Lord Howe", "LHST", + "Heure de Lord Howe", "LHT"}; String MHT[] = new String[] {"Heure des Iles Marshall", "MHT", - "Heure d'\u00e9t\u00e9 des Iles Marshall", "MHST"}; + "Heure d'\u00e9t\u00e9 des Iles Marshall", "MHST", + "Heure des Iles Marshall", "MHT"}; String MSK[] = new String[] {"Heure standard de Moscou", "MSK", - "Heure avanc\u00e9e de Moscou", "MSD"}; + "Heure avanc\u00e9e de Moscou", "MSD", + "Moscou", "MT"}; String MST[] = new String[] {"Heure normale des Rocheuses", "MST", - "Heure avanc\u00e9e des Rocheuses", "MDT"} ; + "Heure avanc\u00e9e des Rocheuses", "MDT", + "Rocheuses", "MT"} ; String MYT[] = new String[] {"Heure de Malaisie", "MYT", - "Heure d'\u00e9t\u00e9 de Malaisie", "MYST"}; + "Heure d'\u00e9t\u00e9 de Malaisie", "MYST", + "Heure de Malaisie", "MYT"}; String NORONHA[] = new String[] {"Heure de Fernando de Noronha", "FNT", - "Heure d'\u00e9t\u00e9 de Fernando de Noronha", "FNST"}; + "Heure d'\u00e9t\u00e9 de Fernando de Noronha", "FNST", + "Heure de Fernando de Noronha", "FNT"}; String NOVT[] = new String[] {"Heure de Novossibirsk", "NOVT", - "Heure d'\u00e9t\u00e9 de Novossibirsk", "NOVST"}; + "Heure d'\u00e9t\u00e9 de Novossibirsk", "NOVST", + "Heure de Novossibirsk", "NOVT"}; String NPT[] = new String[] {"Heure du N\u00e9pal", "NPT", - "Heure d'\u00e9t\u00e9 du N\u00e9pal", "NPST"}; + "Heure d'\u00e9t\u00e9 du N\u00e9pal", "NPST", + "Heure du N\u00E9pal", "NPT"}; String NST[] = new String[] {"Heure normale de Terre-Neuve", "NST", - "Heure avanc\u00e9e de Terre-Neuve", "NDT"} ; + "Heure avanc\u00e9e de Terre-Neuve", "NDT", + "Terre-Neuve", "NT"} ; String NZST[] = new String[] {"Heure normale de Nouvelle-Z\u00e9lande", "NZST", - "Heure avanc\u00e9e de Nouvelle-Z\u00e9lande", "NZDT"} ; + "Heure avanc\u00e9e de Nouvelle-Z\u00e9lande", "NZDT", + "Nouvelle-Z\u00E9lande", "NZT"} ; String PITCAIRN[] = new String[] {"Heure standard des Pitcairn", "PST", - "heure avanc\u00e9e des Pitcairn", "PDT"}; + "heure avanc\u00e9e des Pitcairn", "PDT", + "Pitcairn", "PT"}; String PKT[] = new String[] {"Heure du Pakistan", "PKT", - "Heure d'\u00e9t\u00e9 du Pakistan", "PKST"} ; + "Heure d'\u00e9t\u00e9 du Pakistan", "PKST", + "Heure du Pakistan", "PKT"} ; String PONT[] = new String[] {"Heure de Pohnpei", "PONT", - "Heure d'\u00E9t\u00E9 de Pohnpei", "PONST"}; + "Heure d'\u00E9t\u00E9 de Pohnpei", "PONST", + "Ponape", "PONT"}; String PST[] = new String[] {"Heure normale du Pacifique", "PST", - "Heure avanc\u00e9e du Pacifique", "PDT"} ; + "Heure avanc\u00e9e du Pacifique", "PDT", + "Pacifique", "PT"} ; String SAST[] = new String[] {"Heure normale d'Afrique du Sud", "SAST", - "Heure d'\u00e9t\u00e9 d'Afrique du Sud", "SAST"} ; + "Heure d'\u00e9t\u00e9 d'Afrique du Sud", "SAST", + "Afrique du Sud", "SAT"} ; String SBT[] = new String[] {"Heure des \u00celes Salomon", "SBT", - "Heure d'\u00e9t\u00e9 des \u00celes Salomon", "SBST"} ; + "Heure d'\u00e9t\u00e9 des \u00celes Salomon", "SBST", + "Heure des Iles Salomon", "SBT"} ; String SGT[] = new String[] {"Heure de Singapour", "SGT", - "Heure d'\u00e9t\u00e9 de Singapour", "SGST"}; + "Heure d'\u00e9t\u00e9 de Singapour", "SGST", + "Heure de Singapour", "SGT"}; String SLST[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT", - "Heure d'\u00e9t\u00e9 de Sierra Leone", "SLST"}; + "Heure d'\u00e9t\u00e9 de Sierra Leone", "SLST", + "Heure de Sierra Leone", "SLT"}; String TASMANIA[] = new String[] {"Heure standard d'Australie orientale (Tasmanie)", "EST", - "Heure d'\u00E9t\u00E9 d'Australie orientale (Tasmanie)", "EST"}; + "Heure d'\u00E9t\u00E9 d'Australie orientale (Tasmanie)", "EST", + "C\u00F4te Est (Tasmanie)", "ET"}; String TMT[] = new String[] {"Heure du Turkm\u00e9nistan", "TMT", - "Heure d'\u00e9t\u00e9 du Turkm\u00e9nistan", "TMST"} ; + "Heure d'\u00e9t\u00e9 du Turkm\u00e9nistan", "TMST", + "Heure du Turkm\u00E9nistan", "TMT"} ; String ULAT[]= new String[] {"Heure de l'Ulaanbaatar", "ULAT", - "Heure d'\u00e9t\u00e9 de l'Ulaanbaatar", "ULAST"} ; + "Heure d'\u00e9t\u00e9 de l'Ulaanbaatar", "ULAST", + "Heure de l'Ulaanbaatar", "ULAT"} ; String WART[] = new String[] {"Heure D'Argentine de l'Ouest", "WART", "Heure d'\u00e9t\u00e9 D'Argentine de l'Ouest", "WARST"} ; String WAT[] = new String[] {"Heure d'Afrique de l'Ouest", "WAT", - "Heure d'\u00e9t\u00e9 d'Afrique de l'Ouest", "WAST"} ; + "Heure d'\u00e9t\u00e9 d'Afrique de l'Ouest", "WAST", + "Heure d'Afrique de l'Ouest", "WAT"} ; String WET[] = new String[] {"Heure d'Europe de l'Ouest", "WET", - "Heure d'\u00e9t\u00e9 d'Europe de l'Ouest", "WEST"} ; + "Heure d'\u00e9t\u00e9 d'Europe de l'Ouest", "WEST", + "Heure d'Europe de l'Ouest", "WET"} ; String WIT[] = new String[] {"Heure de l'Indon\u00e9sie occidentale", "WIB", - "Heure d'\u00e9t\u00e9 de l'Indon\u00e9sie occidentale", "WIST"}; + "Heure d'\u00e9t\u00e9 de l'Indon\u00e9sie occidentale", "WIST", + "Heure de l'Indon\u00E9sie occidentale", "WIB"}; String WST_AUS[] = new String[] {"Heure normale de l'Ouest (Australie)", "WST", - "Heure d'\u00E9t\u00E9 de l'Ouest (Australie)", "WST"} ; + "Heure d'\u00E9t\u00E9 de l'Ouest (Australie)", "WST", + "Ouest (Australie)", "WT"} ; String SAMOA[] = new String[] {"Heure standard de Samoa", "SST", - "Heure avanc\u00e9e de Samoa", "SDT"}; + "Heure avanc\u00e9e de Samoa", "SDT", + "Samoa", "ST"}; String WST_SAMOA[] = new String[] {"Heure des Samoas occidentales", "WST", - "Heure d'\u00e9t\u00e9 des Samoas occidentales", "WSDT"} ; + "Heure d'\u00e9t\u00e9 des Samoas occidentales", "WSDT", + "Heure des Samoas occidentales", "WST"} ; String ChST[] = new String[] {"Heure normale des \u00eeles Mariannes", "ChST", - "Heure d'\u00e9t\u00e9 des \u00eeles Mariannes", "ChDT"}; + "Heure d'\u00e9t\u00e9 des \u00eeles Mariannes", "ChDT", + "Chamorro", "ChT"}; String VICTORIA[] = new String[] {"Heure standard d'Australie orientale (Victoria)", "EST", - "Heure d'\u00E9t\u00E9 d'Australie orientale (Victoria)", "EST"}; + "Heure d'\u00E9t\u00E9 d'Australie orientale (Victoria)", "EST", + "C\u00F4te Est (Victoria)", "ET"}; String UTC[] = new String[] {"Temps universel coordonn\u00e9", "UTC", - "Temps universel coordonn\u00e9", "UTC"}; + "Temps universel coordonn\u00e9", "UTC", + "Temps universel coordonn\u00E9", "UTC"}; String UZT[] = new String[] {"Heure de l'Ouzb\u00e9kistan", "UZT", - "Heure d'\u00e9t\u00e9 de l'Ouzb\u00e9kistan", "UZST"}; + "Heure d'\u00e9t\u00e9 de l'Ouzb\u00e9kistan", "UZST", + "Heure de l'Ouzb\u00E9kistan", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"Heure du Paraguay", "PYT", - "Heure d'\u00e9t\u00e9 du Paraguay", "PYST"}}, + "Heure d'\u00e9t\u00e9 du Paraguay", "PYST", + "Heure du Paraguay", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"Heure de Colombie", "COT", - "Heure d'\u00e9t\u00e9 de Colombie", "COST"}}, + "Heure d'\u00e9t\u00e9 de Colombie", "COST", + "Heure de Colombie", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"Heure du Venezuela", "VET", - "Heure d'\u00e9t\u00e9 du Venezuela", "VEST"}}, + "Heure d'\u00e9t\u00e9 du Venezuela", "VEST", + "Heure du Venezuela", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"Heure de Guyane fran\u00e7aise", "GFT", - "Heure d'\u00e9t\u00e9 de Guyane fran\u00e7aise", "GFST"}}, + "Heure d'\u00e9t\u00e9 de Guyane fran\u00e7aise", "GFST", + "Heure de Guyane fran\u00E7aise", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"Heure du Groenland de l'Ouest", "WGT", - "Heure d'\u00e9t\u00e9 du Groenland de l'Ouest", "WGST"}}, + "Heure d'\u00e9t\u00e9 du Groenland de l'Ouest", "WGST", + "Heure du Groenland de l'Ouest", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"Heure de l'\u00c9quateur", "ECT", - "Heure d'\u00e9t\u00e9 de l'\u00c9quateur", "ECST"}}, + "Heure d'\u00e9t\u00e9 de l'\u00c9quateur", "ECST", + "Heure de l'Equateur", "ECT"}}, {"America/Guyana", new String[] {"Heure de Guyana", "GYT", - "Heure d'\u00e9t\u00e9 de Guyana", "GYST"}}, + "Heure d'\u00e9t\u00e9 de Guyana", "GYST", + "Heure de Guyana", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"Heure de Bolivie", "BOT", - "Heure d'\u00e9t\u00e9 de Bolivie", "BOST"}}, + "Heure d'\u00e9t\u00e9 de Bolivie", "BOST", + "Heure de Bolivie", "BOT"}}, {"America/Lima", new String[] {"Heure du P\u00e9rou", "PET", - "Heure d'\u00e9t\u00e9 du P\u00e9rou", "PEST"}}, + "Heure d'\u00e9t\u00e9 du P\u00e9rou", "PEST", + "Heure du P\u00E9rou", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"Heure normale de Metlakatla", "MeST", - "Heure avanc\u00E9e de Metlakatla", "MeDT"}}, + "Heure avanc\u00E9e de Metlakatla", "MeDT", + "Heure de Metlakatla", "MeT"}}, {"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"}}, + "Heure avanc\u00e9e de Saint-Pierre et Miquelon", "PMDT", + "Saint-Pierre-et-Miquelon", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"Heure de l'Uruguay", "UYT", - "Heure d'\u00e9t\u00e9 de l'Uruguay", "UYST"}}, + "Heure d'\u00e9t\u00e9 de l'Uruguay", "UYST", + "Heure de l'Uruguay", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"Heure du Surinam", "SRT", - "Heure d'\u00e9t\u00e9 du Surinam", "SRST"}}, + "Heure d'\u00e9t\u00e9 du Surinam", "SRST", + "Heure du Surinam", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"Heure de Davis", "DAVT", - "Heure d'\u00e9t\u00e9 de Davis", "DAVST"}}, + "Heure d'\u00e9t\u00e9 de Davis", "DAVST", + "Heure de Davis", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Heure de Dumont-d'Urville", "DDUT", - "Heure d'\u00e9t\u00e9 de Dumont-d'Urville", "DDUST"}}, + "Heure d'\u00e9t\u00e9 de Dumont-d'Urville", "DDUST", + "Heure de Dumont-d'Urville", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"Heure de l'Ile Macquarie", "MIST", - "Heure d'\u00E9t\u00E9 de l'Ile Macquarie", "MIST"}}, + "Heure d'\u00E9t\u00E9 de l'Ile Macquarie", "MIST", + "Heure de l'Ile Macquarie", "MIST"}}, {"Antarctica/Mawson", new String[] {"Heure de Mawson", "MAWT", - "Heure d'\u00e9t\u00e9 de Mawson", "MAWST"}}, + "Heure d'\u00e9t\u00e9 de Mawson", "MAWST", + "Heure de Mawson", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"Heure de Rothera", "ROTT", - "Heure d'\u00e9t\u00e9 de Rothera", "ROTST"}}, + "Heure d'\u00e9t\u00e9 de Rothera", "ROTST", + "Heure de Rothera", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Heure de Syowa", "SYOT", - "Heure d'\u00e9t\u00e9 de Syowa", "SYOST"}}, + "Heure d'\u00e9t\u00e9 de Syowa", "SYOST", + "Heure de Syowa", "SYOT"}}, {"Antarctica/Vostok", new String[] {"Heure de Vostok", "VOST", - "Heure d'\u00e9t\u00e9 de Vostok", "VOSST"}}, + "Heure d'\u00e9t\u00e9 de Vostok", "VOSST", + "Heure de Vostok", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Heure d'Alma-Ata", "ALMT", - "Heure d'\u00e9t\u00e9 d'Alma-Ata", "ALMST"}}, + "Heure d'\u00e9t\u00e9 d'Alma-Ata", "ALMST", + "Heure d'Alma-Ata", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"Heure d'Anadyr", "ANAT", - "Heure d'\u00e9t\u00e9 d'Anadyr", "ANAST"}}, + "Heure d'\u00e9t\u00e9 d'Anadyr", "ANAST", + "Heure d'Anadyr", "ANAT"}}, {"Asia/Aqtau", new String[] {"Heure d'Aqtau", "AQTT", - "Heure d'\u00e9t\u00e9 d'Aqtau", "AQTST"}}, + "Heure d'\u00e9t\u00e9 d'Aqtau", "AQTST", + "Heure d'Aqtau", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Heure d'Aqtobe", "AQTT", - "Heure d'\u00e9t\u00e9 d'Aqtobe", "AQTST"}}, + "Heure d'\u00e9t\u00e9 d'Aqtobe", "AQTST", + "Heure d'Aqtobe", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"Heure d'Azerba\u00efdjan", "AZT", - "Heure d'\u00e9t\u00e9 d'Azerba\u00efdjan", "AZST"}}, + "Heure d'\u00e9t\u00e9 d'Azerba\u00efdjan", "AZST", + "Heure d'Azerba\u00EFdjan", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"Heure du Kirghizistan", "KGT", - "Heure d'\u00e9t\u00e9 du Kirghizistan", "KGST"}}, + "Heure d'\u00e9t\u00e9 du Kirghizistan", "KGST", + "Heure du Kirghizistan", "KGT"}}, {"Asia/Brunei", new String[] {"Heure du Brunei", "BNT", - "Heure d'\u00e9t\u00e9 du Brunei", "BNST"}}, + "Heure d'\u00e9t\u00e9 du Brunei", "BNST", + "Heure du Brunei", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Heure de Choibalsan", "CHOT", - "Heure d'\u00e9t\u00e9 de Choibalsan", "CHOST"}}, + "Heure d'\u00e9t\u00e9 de Choibalsan", "CHOST", + "Heure de Choibalsan", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"Heure de Timor-Leste", "TLT", - "Heure d'\u00e9t\u00e9 de Timor-Leste", "TLST"}}, + "Heure d'\u00e9t\u00e9 de Timor-Leste", "TLST", + "Heure de Timor-Leste", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"Heure du Tadjikistan", "TJT", - "Heure d'\u00e9t\u00e9 du Tadjikistan", "TJST"}}, + "Heure d'\u00e9t\u00e9 du Tadjikistan", "TJST", + "Heure du Tadjikistan", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"Heure de Hovd", "HOVT", - "Heure d'\u00e9t\u00e9 de Hovd", "HOVST"}}, + "Heure d'\u00e9t\u00e9 de Hovd", "HOVST", + "Heure de Hovd", "HOVT"}}, {"Asia/Irkutsk", new String[] {"Heure d'Irkutsk", "IRKT", - "Heure d'\u00e9t\u00e9 d'Irkutsk", "IRKST"}}, + "Heure d'\u00e9t\u00e9 d'Irkutsk", "IRKST", + "Heure d'Irkutsk", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"Heure d'Indon\u00e9sie orientale", "WIT", - "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie orientale", "EIST"}}, + "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie orientale", "EIST", + "Heure d'Indon\u00E9sie orientale", "WIT"}}, {"Asia/Kabul", new String[] {"Heure d'Afghanistan", "AFT", - "Heure d'\u00e9t\u00e9 d'Afghanistan", "AFST"}}, + "Heure d'\u00e9t\u00e9 d'Afghanistan", "AFST", + "Heure d'Afghanistan", "AFT"}}, {"Asia/Kamchatka", new String[] {"Heure de Petropavlovsk-Kamchatski", "PETT", - "Heure d'\u00e9t\u00e9 de Petropavlovsk-Kamchatski", "PETST"}}, + "Heure d'\u00e9t\u00e9 de Petropavlovsk-Kamchatski", "PETST", + "Heure de Petropavlovsk-Kamchatski", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, {"Asia/Khandyga", new String[] {"Heure de Khandyga", "YAKT", - "Heure d'\u00E9t\u00E9 de Khandyga", "YAKST"}}, + "Heure d'\u00E9t\u00E9 de Khandyga", "YAKST", + "Heure de Khandyga", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"Heure de Krasno\u00efarsk", "KRAT", - "Heure d'\u00e9t\u00e9 de Krasno\u00efarsk", "KRAST"}}, + "Heure d'\u00e9t\u00e9 de Krasno\u00efarsk", "KRAST", + "Heure de Krasno\u00EFarsk", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Heure de Magadan", "MAGT", - "Heure d'\u00e9t\u00e9 de Magadan", "MAGST"}}, + "Heure d'\u00e9t\u00e9 de Magadan", "MAGST", + "Heure de Magadan", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"Heure des Philippines", "PHT", - "Heure d'\u00e9t\u00e9 des Philippines", "PHST"}}, + "Heure d'\u00e9t\u00e9 des Philippines", "PHST", + "Heure des Philippines", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Heure d'Oral", "ORAT", - "Heure d'\u00e9t\u00e9 d'Oral", "ORAST"}}, + "Heure d'\u00e9t\u00e9 d'Oral", "ORAST", + "Heure d'Oral", "ORAT"}}, {"Asia/Omsk", new String[] {"Heure d'Omsk", "OMST", - "Heure d'\u00e9t\u00e9 d'Omsk", "OMSST"}}, + "Heure d'\u00e9t\u00e9 d'Omsk", "OMSST", + "Heure d'Omsk", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Heure de Kyzylorda", "QYZT", - "Heure d'\u00e9t\u00e9 de Kyzylorda", "QYZST"}}, + "Heure d'\u00e9t\u00e9 de Kyzylorda", "QYZST", + "Heure de Kyzylorda", "QYZT"}}, {"Asia/Rangoon", new String[] {"Heure de Myanmar", "MMT", - "Heure d'\u00e9t\u00e9 de Myanmar", "MMST"}}, + "Heure d'\u00e9t\u00e9 de Myanmar", "MMST", + "Heure de Myanmar", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"Heure de Sakhalin", "SAKT", - "Heure d'\u00e9t\u00e9 de Sakhalin", "SAKST"}}, + "Heure d'\u00e9t\u00e9 de Sakhalin", "SAKST", + "Heure de Sakhalin", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"Heure de G\u00e9orgie", "GET", - "Heure d'\u00e9t\u00e9 de G\u00e9orgie", "GEST"}}, + "Heure d'\u00e9t\u00e9 de G\u00e9orgie", "GEST", + "Heure de G\u00E9orgie", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"Heure d'Ust-Nera", "VLAT", - "Heure d'\u00E9t\u00E9 d'Ust-Nera", "VLAST"}}, + "Heure d'\u00E9t\u00E9 d'Ust-Nera", "VLAST", + "Heure d'Ust-Nera", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"Heure de Vladivostok", "VLAT", - "Heure d'\u00e9t\u00e9 de Vladivostok", "VLAST"}}, + "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 d'\u00e9t\u00e9 du Iakoutsk", "YAKST", + "Heure du Iakoutsk", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Heure de Yekaterinburg", "YEKT", - "Heure d'\u00e9t\u00e9 de Yekaterinburg", "YEKST"}}, + "Heure d'\u00e9t\u00e9 de Yekaterinburg", "YEKST", + "Heure de Yekaterinburg", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"Heure des A\u00e7ores", "AZOT", - "Heure d'\u00e9t\u00e9 des A\u00e7ores", "AZOST"}}, + "Heure d'\u00e9t\u00e9 des A\u00e7ores", "AZOST", + "Heure des A\u00E7ores", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"Heure de Cap-Vert", "CVT", - "Heure d'\u00e9t\u00e9 de Cap-Vert", "CVST"}}, + "Heure d'\u00e9t\u00e9 de Cap-Vert", "CVST", + "Heure de Cap-Vert", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"Heure normale de G\u00e9orgie du Sud", "GST", - "Heure avanc\u00e9e de G\u00e9orgie du Sud", "GDT"}}, + "Heure avanc\u00e9e de G\u00e9orgie du Sud", "GDT", + "G\u00E9orgie du Sud", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"Heure des \u00eeles Falkland", "FKT", - "Heure d'\u00e9t\u00e9 des \u00eeles Falkland", "FKST"}}, + "Heure d'\u00e9t\u00e9 des \u00eeles Falkland", "FKST", + "Heure des \u00EEles Falkland", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"Heure standard de l'Australie occidentale (centre)", "CWST", - "Heure d'\u00E9t\u00E9 de l'Australie occidentale (centre)", "CWST"}}, + "Heure d'\u00E9t\u00E9 de l'Australie occidentale (centre)", "CWST", + "Heure de l'Australie occidentale (centre)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"Heure normale de Samara", "SAMT", - "Heure d'\u00e9t\u00e9 de Samara", "SAMST"}}, + "Heure d'\u00e9t\u00e9 de Samara", "SAMST", + "Heure de Samara", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"Heure de Volgograd", "VOLT", - "Heure d'\u00e9t\u00e9 de Volgograd", "VOLST"}}, + "Heure d'\u00e9t\u00e9 de Volgograd", "VOLST", + "Heure de Volgograd", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"Heure de l'oc\u00e9an Indien", "IOT", - "Heure d'\u00e9t\u00e9 de l'oc\u00e9an Indien", "IOST"}}, + "Heure d'\u00e9t\u00e9 de l'oc\u00e9an Indien", "IOST", + "Heure de l'oc\u00E9an Indien", "IOT"}}, {"Indian/Christmas", new String[] {"Heure de l'\u00cele Christmas", "CXT", - "Heure d'\u00e9t\u00e9 de l'\u00cele Christmas", "CXST"}}, + "Heure d'\u00e9t\u00e9 de l'\u00cele Christmas", "CXST", + "Heure de l'Ile Christmas", "CIT"}}, {"Indian/Cocos", new String[] {"Heure des \u00celes Cocos", "CCT", - "Heure d'\u00e9t\u00e9 des \u00celes Cocos", "CCST"}}, + "Heure d'\u00e9t\u00e9 des \u00celes Cocos", "CCST", + "Heure des Iles Cocos", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"Heure des Terres australes antartiques fran\u00e7aises", "TFT", - "Heure d'\u00e9t\u00e9 des Terres australes antartiques fran\u00e7aises", "TFST"}}, + "Heure d'\u00e9t\u00e9 des Terres australes antartiques fran\u00e7aises", "TFST", + "Heure des Terres australes antarctiques fran\u00E7aises", "TFT"}}, {"Indian/Mahe", new String[] {"Heure des Seychelles", "SCT", - "Heure d'\u00e9t\u00e9 des Seychelles", "SCST"}}, + "Heure d'\u00e9t\u00e9 des Seychelles", "SCST", + "Heure des Seychelles", "SCT"}}, {"Indian/Maldives", new String[] {"Heure des Maldives", "MVT", - "Heure d'\u00e9t\u00e9 des Maldives", "MVST"}}, + "Heure d'\u00e9t\u00e9 des Maldives", "MVST", + "Heure des Maldives", "MVT"}}, {"Indian/Mauritius", new String[] {"Heure de Maurice", "MUT", - "Heure d'\u00e9t\u00e9 de Maurice", "MUST"}}, + "Heure d'\u00e9t\u00e9 de Maurice", "MUST", + "Heure de Maurice", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"Heure de la R\u00e9union", "RET", - "Heure d'\u00e9t\u00e9 de la R\u00e9union", "REST"}}, + "Heure d'\u00e9t\u00e9 de la R\u00e9union", "REST", + "Heure de la R\u00E9union", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"Heure de l'Europe centrale", "MET", - "Heure d'\u00e9t\u00e9 de l'Europe centrale", "MEST"}}, + "Heure d'\u00e9t\u00e9 de l'Europe centrale", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"Heure du Vanuatu", "VUT", - "Heure d'\u00e9t\u00e9 du Vanuatu", "VUST"}}, + "Heure d'\u00e9t\u00e9 du Vanuatu", "VUST", + "Heure du Vanuatu", "VUT"}}, {"Pacific/Enderbury", new String[] {"Heure de l'\u00cele de Phoenix", "PHOT", - "Heure d'\u00e9t\u00e9 de l'\u00cele de Phoenix", "PHOST"}}, + "Heure d'\u00e9t\u00e9 de l'\u00cele de Phoenix", "PHOST", + "Heure de l'Ile de Phoenix", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"Heure de Tokelau", "TKT", - "Heure d'\u00e9t\u00e9 de Tokelau", "TKST"}}, + "Heure d'\u00e9t\u00e9 de Tokelau", "TKST", + "Heure de Tokelau", "TKT"}}, {"Pacific/Fiji", new String[] {"Heure de Fidji", "FJT", - "Heure d'\u00e9t\u00e9 de Fidji", "FJST"}}, + "Heure d'\u00e9t\u00e9 de Fidji", "FJST", + "Heure de Fidji", "FJT"}}, {"Pacific/Funafuti", new String[] {"Heure de Tuvalu", "TVT", - "Heure d'\u00e9t\u00e9 de Tuvalu", "TVST"}}, + "Heure d'\u00e9t\u00e9 de Tuvalu", "TVST", + "Heure de Tuvalu", "TVT"}}, {"Pacific/Galapagos", new String[] {"Heure des Galapagos", "GALT", - "Heure d'\u00e9t\u00e9 des Galapagos", "GALST"}}, + "Heure d'\u00e9t\u00e9 des Galapagos", "GALST", + "Heure des Galapagos", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Heure de l'\u00cele de Line", "LINT", - "Heure d'\u00e9t\u00e9 de l'\u00cele de Line", "LINST"}}, + "Heure d'\u00e9t\u00e9 de l'\u00cele de Line", "LINST", + "Heure de l'Ile de Line", "LINT"}}, {"Pacific/Kosrae", new String[] {"Heure de Kusaie", "KOST", - "Heure d'\u00e9t\u00e9 de Kusaie", "KOSST"}}, + "Heure d'\u00e9t\u00e9 de Kusaie", "KOSST", + "Heure de Kusaie", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"Heure des Marquises", "MART", - "Heure d'\u00e9t\u00e9 des Marquises", "MARST"}}, + "Heure d'\u00e9t\u00e9 des Marquises", "MARST", + "Heure des Marquises", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"Heure de Nauru", "NRT", - "Heure d'\u00e9t\u00e9 de Nauru", "NRST"}}, + "Heure d'\u00e9t\u00e9 de Nauru", "NRST", + "Heure de Nauru", "NRT"}}, {"Pacific/Niue", new String[] {"Heure de Niue", "NUT", - "Heure d'\u00e9t\u00e9 de Niue", "NUST"}}, + "Heure d'\u00e9t\u00e9 de Niue", "NUST", + "Heure de Niue", "NUT"}}, {"Pacific/Norfolk", new String[] {"Heure de Norfolk", "NFT", - "Heure d'\u00e9t\u00e9 de Norfolk", "NFST"}}, + "Heure d'\u00e9t\u00e9 de Norfolk", "NFST", + "Heure de Norfolk", "NFT"}}, {"Pacific/Noumea", new String[] {"Heure de Nouvelle-Cal\u00e9donie", "NCT", - "Heure d'\u00e9t\u00e9 de Nouvelle-Cal\u00e9donie", "NCST"}}, + "Heure d'\u00e9t\u00e9 de Nouvelle-Cal\u00e9donie", "NCST", + "Heure de Nouvelle-Cal\u00E9donie", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"Heure de Palaos", "PWT", - "Heure d'\u00e9t\u00e9 de Palaos", "PWST"}}, + "Heure d'\u00e9t\u00e9 de Palaos", "PWST", + "Heure de Palaos", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"Heure de Papouasie-Nouvelle-Guin\u00e9e", "PGT", - "Heure d'\u00e9t\u00e9 de de Papouasie-Nouvelle-Guin\u00e9e", "PGST"}}, + "Heure d'\u00e9t\u00e9 de de Papouasie-Nouvelle-Guin\u00e9e", "PGST", + "Heure de Papouasie-Nouvelle-Guin\u00E9e", "PGT"}}, {"Pacific/Rarotonga", new String[] {"Heure des \u00celes Cook", "CKT", - "Heure d'\u00e9t\u00e9 des \u00celes Cook", "CKHST"}}, + "Heure d'\u00e9t\u00e9 des \u00celes Cook", "CKHST", + "Heure des Iles Cook", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"Heure de Tahiti", "TAHT", - "Heure d'\u00e9t\u00e9 de Tahiti", "TAHST"}}, + "Heure d'\u00e9t\u00e9 de Tahiti", "TAHST", + "Heure de Tahiti", "TAHT"}}, {"Pacific/Tarawa", new String[] {"Heure de Kiribati", "GILT", - "Heure d'\u00e9t\u00e9 de Kiribati", "GILST"}}, + "Heure d'\u00e9t\u00e9 de Kiribati", "GILST", + "Heure de Kiribati", "GILT"}}, {"Pacific/Tongatapu", new String[] {"Heure de Tonga", "TOT", - "Heure d'\u00e9t\u00e9 de Tonga", "TOST"}}, + "Heure d'\u00e9t\u00e9 de Tonga", "TOST", + "Heure de Tonga", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"Heure de Wake", "WAKT", - "Heure d'\u00e9t\u00e9 de Wake", "WAKST"}}, + "Heure d'\u00e9t\u00e9 de Wake", "WAKST", + "Heure de Wake", "WAKT"}}, {"Pacific/Wallis", new String[] {"Heure de Wallis et Futuna", "WFT", - "Heure d'\u00e9t\u00e9 de Wallis et Futuna", "WFST"}}, + "Heure d'\u00e9t\u00e9 de Wallis et Futuna", "WFST", + "Heure de Wallis-et-Futuna", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java b/jdk/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java index 8217ce5af29..4b2209d8e27 100644 --- a/jdk/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java +++ b/jdk/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Ora di Acre", "ACT", - "Ora estiva di Acre", "ACST"}; + "Ora estiva di Acre", "ACST", + "Ora di Acre", "ACT"}; String ADELAIDE[] = new String[] {"Ora standard centrale (Australia del Sud)", "CST", - "Ora estiva centrale (Australia del Sud)", "CST"}; + "Ora estiva centrale (Australia del Sud)", "CST", + "Ora fuso centrale (Australia del Sud)", "CT"}; String AGT[] = new String[] {"Ora dell'Argentina", "ART", - "Ora estiva dell'Argentina", "ARST"}; + "Ora estiva dell'Argentina", "ARST", + "Ora dell'Argentina", "ART"}; String AKST[] = new String[] {"Ora solare dell'Alaska", "AKST", - "Ora legale dell'Alaska", "AKDT"}; + "Ora legale dell'Alaska", "AKDT", + "Ora Alaska", "AKT"}; String AMT[] = new String[] {"Ora solare dell'Amazzonia", "AMT", - "Ora estiva dell'Amazzonia", "AMST"}; + "Ora estiva dell'Amazzonia", "AMST", + "Ora dell'Amazzonia", "AMT"}; String ARAST[] = new String[] {"Ora solare dell'Arabia", "AST", - "Ora legale dell'Arabia", "ADT"}; + "Ora legale dell'Arabia", "ADT", + "Ora Arabia Saudita", "AT"}; String ARMT[] = new String[] {"Ora dell'Armenia", "AMT", - "Ora estiva dell'Armenia", "AMST"}; + "Ora estiva dell'Armenia", "AMST", + "Ora dell'Armenia", "AMT"}; String AST[] = new String[] {"Ora solare dell'Atlantico occidentale", "AST", - "Ora legale dell'Atlantico occidentale", "ADT"}; + "Ora legale dell'Atlantico occidentale", "ADT", + "Fuso dell'Atlantico", "AT"}; String BDT[] = new String[] {"Ora del Bangladesh", "BDT", - "Ora estiva del Bangladesh", "BDST"}; + "Ora estiva del Bangladesh", "BDST", + "Ora del Bangladesh", "BDT"}; String BRISBANE[] = new String[] {"Ora standard orientale (Queensland)", "EST", - "Ora estiva orientale (Queensland)", "EST"}; + "Ora estiva orientale (Queensland)", "EST", + "Ora fuso orientale (Queensland)", "ET"}; String BROKEN_HILL[] = new String[] {"Ora standard centrale (Australia del Sud/Nuovo Galles del Sud)", "CST", - "Ora estiva centrale (Australia del Sud/Nuovo Galles del Sud)", "CST"}; + "Ora estiva centrale (Australia del Sud/Nuovo Galles del Sud)", "CST", + "Ora fuso centrale (Australia del Sud/Nuovo Galles del Sud)", "CT"}; String BRT[] = new String[] {"Ora del Brasile", "BRT", - "Ora estiva del Brasile", "BRST"}; + "Ora estiva del Brasile", "BRST", + "Ora di Brasilia", "BRT"}; String BTT[] = new String[] {"Ora del Bhutan", "BTT", - "Ora estiva del Bhutan", "BTST"}; + "Ora estiva del Bhutan", "BTST", + "Ora del Bhutan", "BTT"}; String CAT[] = new String[] {"Ora dell'Africa centrale", "CAT", - "Ora estiva dell'Africa centrale", "CAST"}; + "Ora estiva dell'Africa centrale", "CAST", + "Ora dell'Africa centrale", "CAT"}; String CET[] = new String[] {"Ora dell'Europa centrale", "CET", - "Ora estiva dell'Europa centrale", "CEST"}; + "Ora estiva dell'Europa centrale", "CEST", + "Ora dell'Europa centrale", "CET"}; String CHAST[] = new String[] {"Ora di Chatham standard", "CHAST", - "Ora legale di Chatham", "CHADT"}; + "Ora legale di Chatham", "CHADT", + "Ora Chatham", "CHAT"}; String CHUT[] = new String[] {"Ora di Chuuk", "CHUT", - "Ora estiva di Chuuk", "CHUST"}; + "Ora estiva di Chuuk", "CHUST", + "Ora di Chuuk", "CHUT"}; String CIT[] = new String[] {"Ora dell'Indonesia centrale", "WITA", - "Ora estiva dell'Indonesia centrale", "CIST"}; + "Ora estiva dell'Indonesia centrale", "CIST", + "Ora dell'Indonesia centrale", "WITA"}; String CLT[] = new String[] {"Ora del Cile", "CLT", - "Ora estiva del Cile", "CLST"}; + "Ora estiva del Cile", "CLST", + "Ora del Cile", "CLT"}; String CST[] = new String[] {"Ora solare USA centrale", "CST", - "Ora legale USA centrale", "CDT"}; + "Ora legale USA centrale", "CDT", + "Ora fuso centrale", "CT"}; String CTT[] = new String[] {"Ora solare della Cina", "CST", - "Ora legale della Cina", "CDT"}; + "Ora legale della Cina", "CDT", + "Ora Cina", "CT"}; String CUBA[] = new String[] {"Ora solare Cuba", "CST", - "Ora legale Cuba", "CDT"}; + "Ora legale Cuba", "CDT", + "Ora di Cuba", "CT"}; String DARWIN[] = new String[] {"Ora standard centrale (Territori del Nord)", "CST", - "Ora estiva centrale (Territori del Nord)", "CST"}; + "Ora estiva centrale (Territori del Nord)", "CST", + "Ora fuso centrale (Territori del Nord)", "CT"}; String DUBLIN[] = new String[] {"Ora media di Greenwich", "GMT", - "Ora estiva irlandese", "IST"}; + "Ora estiva irlandese", "IST", + "Ora irlandese", "IT"}; String EAT[] = new String[] {"Ora dell'Africa orientale", "EAT", - "Ora estiva dell'Africa orientale", "EAST"}; + "Ora estiva dell'Africa orientale", "EAST", + "Ora dell'Africa orientale", "EAT"}; String EASTER[] = new String[] {"Ora dell'Isola di Pasqua", "EAST", - "Ora estiva dell'Isola di Pasqua", "EASST"}; + "Ora estiva dell'Isola di Pasqua", "EASST", + "Ora dell'Isola di Pasqua", "EAST"}; String EET[] = new String[] {"Ora dell'Europa orientale", "EET", - "Ora estiva dell'Europa orientale", "EEST"}; + "Ora estiva dell'Europa orientale", "EEST", + "Ora dell'Europa orientale", "EET"}; String EGT[] = new String[] {"Ora della Groenlandia orientale", "EGT", - "Ora estiva della Groenlandia orientale", "EGST"}; + "Ora estiva della Groenlandia orientale", "EGST", + "Ora della Groenlandia orientale", "EGT"}; String EST[] = new String[] {"Ora solare USA orientale", "EST", - "Ora legale USA orientale", "EDT"}; + "Ora legale USA orientale", "EDT", + "Fuso orientale", "ET"}; String EST_NSW[] = new String[] {"Ora standard dell'Australia orientale (Nuovo Galles del Sud)", "EST", - "Ora estiva dell'Australia orientale (Nuovo Galles del Sud)", "EST"}; + "Ora estiva dell'Australia orientale (Nuovo Galles del Sud)", "EST", + "Ora fuso orientale (Nuovo Galles del Sud)", "ET"}; String FET[] = new String[] {"Ora dei paesi europei pi\u00F9 orientali", "FET", - "Ora estiva dei paesi europei pi\u00F9 orientali", "FEST"}; + "Ora estiva dei paesi europei pi\u00F9 orientali", "FEST", + "Ora dei paesi europei pi\u00F9 orientali", "FET"}; String GHMT[] = new String[] {"Ora media del Ghana", "GMT", - "Ora legale del Ghana", "GHST"}; + "Ora legale del Ghana", "GHST", + "Ora media del Ghana", "GMT"}; String GAMBIER[] = new String[] {"Ora di Gambier", "GAMT", - "Ora estiva di Gambier", "GAMST"}; + "Ora estiva di Gambier", "GAMST", + "Ora di Gambier", "GAMT"}; String GMT[] = new String[] {"Ora media di Greenwich", "GMT", + "Ora media di Greenwich", "GMT", "Ora media di Greenwich", "GMT"}; String GMTBST[] = new String[] {"Ora media di Greenwich", "GMT", - "Ora estiva britannica", "BST"}; + "Ora estiva britannica", "BST", + "Ora britannica", "BT"}; String GST[] = new String[] {"Ora solare del golfo", "GST", - "Ora legale del golfo", "GDT"}; + "Ora legale del golfo", "GDT", + "Ora del golfo", "GT"}; String HAST[] = new String[] {"Ora solare delle Isole Hawaii-Aleutine", "HAST", - "Ora solare delle Isole Hawaii-Aleutine", "HADT"}; + "Ora solare delle Isole Hawaii-Aleutine", "HADT", + "Ora Hawaii-Aleutine", "HAT"}; String HKT[] = new String[] {"Ora di Hong Kong", "HKT", - "Ora estiva di Hong Kong", "HKST"}; + "Ora estiva di Hong Kong", "HKST", + "Ora di Hong Kong", "HKT"}; String HST[] = new String[] {"Ora solare delle Isole Hawaii", "HST", - "Ora legale delle Isole Hawaii", "HDT"}; + "Ora legale delle Isole Hawaii", "HDT", + "Ora Hawaii", "HT"}; String ICT[] = new String[] {"Ora dell'Indocina", "ICT", - "Ora estiva dell'Indocina", "ICST"}; + "Ora estiva dell'Indocina", "ICST", + "Ora dell'Indocina", "ICT"}; String IRT[] = new String[] {"Ora solare Iran", "IRST", - "Ora legale Iran", "IRDT"}; + "Ora legale Iran", "IRDT", + "Ora Iran", "IRT"}; String ISRAEL[] = new String[] {"Ora standard di Israele", "IST", - "Ora legale di Israele", "IDT"}; + "Ora legale di Israele", "IDT", + "Ora Israele", "IT"}; String IST[] = new String[] {"Ora solare dell'India", "IST", - "Ora legale dell'India", "IDT"}; + "Ora legale dell'India", "IDT", + "Ora India", "IT"}; String JST[] = new String[] {"Ora solare del Giappone", "JST", - "Ora legale del Giappone", "JDT"}; + "Ora legale del Giappone", "JDT", + "Ora Giappone", "JT"}; String KST[] = new String[] {"Ora solare della Corea", "KST", - "Ora legale della Corea", "KDT"}; + "Ora legale della Corea", "KDT", + "Ora Corea", "KT"}; String LORD_HOWE[] = new String[] {"Ora standard di Lord Howe", "LHST", - "Ora estiva di Lord Howe", "LHST"}; + "Ora estiva di Lord Howe", "LHST", + "Ora di Lord Howe", "LHT"}; String MHT[] = new String[] {"Ora delle Isole Marshall", "MHT", - "Ora estiva delle Isole Marshall", "MHST"}; + "Ora estiva delle Isole Marshall", "MHST", + "Ora delle Isole Marshall", "MHT"}; String MSK[] = new String[] {"Ora standard di Mosca", "MSK", - "Ora legale di Mosca", "MSD"}; + "Ora legale di Mosca", "MSD", + "Ora Mosca", "MT"}; String MST[] = new String[] {"Ora solare USA occidentale", "MST", - "Ora legale USA occidentale", "MDT"}; + "Ora legale USA occidentale", "MDT", + "Ora fuso occidentale", "MT"}; String MYT[] = new String[] {"Ora della Malaysia", "MYT", - "Ora estiva della Malaysia", "MYST"}; + "Ora estiva della Malaysia", "MYST", + "Ora della Malaysia", "MYT"}; String NORONHA[] = new String[] {"Ora di Fernando de Noronha", "FNT", - "Ora estiva di Fernando de Noronha", "FNST"}; + "Ora estiva di Fernando de Noronha", "FNST", + "Ora di Fernando de Noronha", "FNT"}; String NOVT[] = new String[] {"Ora di Novosibirsk", "NOVT", - "Ora estiva di Novosibirsk", "NOVST"}; + "Ora estiva di Novosibirsk", "NOVST", + "Ora di Novosibirsk", "NOVT"}; String NPT[] = new String[] {"Ora del Nepal", "NPT", - "Ora estiva del Nepal", "NPST"}; + "Ora estiva del Nepal", "NPST", + "Ora del Nepal", "NPT"}; String NST[] = new String[] {"Ora solare di Terranova", "NST", - "Ora legale di Terranova", "NDT"}; + "Ora legale di Terranova", "NDT", + "Ora Terranova", "NT"}; String NZST[] = new String[] {"Ora solare della Nuova Zelanda", "NZST", - "Ora legale della Nuova Zelanda", "NZDT"}; + "Ora legale della Nuova Zelanda", "NZDT", + "Ora Nuova Zelanda", "NZT"}; String PITCAIRN[] = new String[] {"Ora standard di Pitcairn", "PST", - "Ora legale di Pitcairn", "PDT"}; + "Ora legale di Pitcairn", "PDT", + "Ora Pitcairn", "PT"}; String PKT[] = new String[] {"Ora del Pakistan", "PKT", - "Ora estiva del Pakistan", "PKST"}; + "Ora estiva del Pakistan", "PKST", + "Ora del Pakistan", "PKT"}; String PONT[] = new String[] {"Ora di Pohnpei", "PONT", - "Ora estiva di Pohnpei", "PONST"}; + "Ora estiva di Pohnpei", "PONST", + "Ora Ponape", "PONT"}; String PST[] = new String[] {"Ora solare della costa occidentale USA", "PST", - "Ora legale della costa occidentale USA", "PDT"}; + "Ora legale della costa occidentale USA", "PDT", + "Fuso del Pacifico", "PT"}; String SAST[] = new String[] {"Ora solare del Sudafrica", "SAST", - "Ora estiva del Sudafrica", "SAST"}; + "Ora estiva del Sudafrica", "SAST", + "Ora Sudafrica", "SAT"}; String SBT[] = new String[] {"Ora delle Isole Salomone", "SBT", - "Ora estiva delle Isole Salomone", "SBST"}; + "Ora estiva delle Isole Salomone", "SBST", + "Ora delle Isole Salomone", "SBT"}; String SGT[] = new String[] {"Ora di Singapore", "SGT", - "Ora estiva di Singapore", "SGST"}; + "Ora estiva di Singapore", "SGST", + "Ora di Singapore", "SGT"}; String SLST[] = new String[] {"Ora media di Greenwich", "GMT", - "Ora legale della Sierra Leone", "SLST"}; + "Ora legale della Sierra Leone", "SLST", + "Ora della Sierra Leone", "SLT"}; String TASMANIA[] = new String[] {"Ora standard orientale (Tasmania)", "EST", - "Ora estiva orientale (Tasmania)", "EST"}; + "Ora estiva orientale (Tasmania)", "EST", + "Ora fuso orientale (Tasmania)", "ET"}; String TMT[] = new String[] {"Ora del Turkmenistan", "TMT", - "Ora estiva del Turkmenistan", "TMST"}; + "Ora estiva del Turkmenistan", "TMST", + "Ora del Turkmenistan", "TMT"}; String ULAT[]= new String[] {"Ora di Ulaanbaatar", "ULAT", - "Ora estiva di Ulaanbaatar", "ULAST"}; + "Ora estiva di Ulaanbaatar", "ULAST", + "Ora di Ulaanbaatar", "ULAT"}; String WART[] = new String[] {"Ora dell'Argentina occidentale", "WART", "Ora estiva dell'Argentina occidentale", "WARST"}; String WAT[] = new String[] {"Ora dell'Africa occidentale", "WAT", - "Ora estiva dell'Africa occidentale", "WAST"}; + "Ora estiva dell'Africa occidentale", "WAST", + "Ora dell'Africa occidentale", "WAT"}; String WET[] = new String[] {"Ora dell'Europa occidentale", "WET", - "Ora estiva dell'Europa occidentale", "WEST"}; + "Ora estiva dell'Europa occidentale", "WEST", + "Ora dell'Europa occidentale", "WET"}; String WIT[] = new String[] {"Ora dell'Indonesia occidentale", "WIB", - "Ora estiva dell'Indonesia occidentale", "WIST"}; + "Ora estiva dell'Indonesia occidentale", "WIST", + "Ora dell'Indonesia occidentale", "WIB"}; String WST_AUS[] = new String[] {"Ora standard dell'Australia occidentale", "WST", - "Ora estiva dell'Australia occidentale", "WST"}; + "Ora estiva dell'Australia occidentale", "WST", + "Ora Australia occidentale", "WT"}; String SAMOA[] = new String[] {"Ora standard di Samoa", "SST", - "Ora legale di Samoa", "SDT"}; + "Ora legale di Samoa", "SDT", + "Ora Samoa", "ST"}; String WST_SAMOA[] = new String[] {"Ora di Samoa", "WST", - "Ora estiva di Samoa", "WSDT"}; + "Ora estiva di Samoa", "WSDT", + "Ora di Samoa occidentale", "WST"}; String ChST[] = new String[] {"Ora standard di Chamorro", "ChST", - "Ora legale di Chamorro", "ChDT"}; + "Ora legale di Chamorro", "ChDT", + "Ora Chamorro", "ChT"}; String VICTORIA[] = new String[] {"Ora standard orientale (Victoria)", "EST", - "Ora estiva orientale (Victoria)", "EST"}; + "Ora estiva orientale (Victoria)", "EST", + "Ora fuso orientale (Victoria)", "ET"}; String UTC[] = new String[] {"Tempo universale coordinato", "UTC", + "Tempo universale coordinato", "UTC", "Tempo universale coordinato", "UTC"}; String UZT[] = new String[] {"Ora dell'Uzbekistan", "UZT", - "Ora estiva dell'Uzbekistan", "UZST"}; + "Ora estiva dell'Uzbekistan", "UZST", + "Ora dell'Uzbekistan", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"Ora del Paraguay", "PYT", - "Ora estiva del Paraguay", "PYST"}}, + "Ora estiva del Paraguay", "PYST", + "Ora del Paraguay", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"Ora della Colombia", "COT", - "Ora estiva della Colombia", "COST"}}, + "Ora estiva della Colombia", "COST", + "Ora della Colombia", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"Ora del Venezuela", "VET", - "Ora estiva del Venezuela", "VEST"}}, + "Ora estiva del Venezuela", "VEST", + "Ora del Venezuela", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"Ora della Guyana Francese", "GFT", - "Ora estiva della Guyana Francese", "GFST"}}, + "Ora estiva della Guyana Francese", "GFST", + "Ora della Guyana Francese", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"Ora della Groenlandia occidentale", "WGT", - "Ora estiva della Groenlandia occidentale", "WGST"}}, + "Ora estiva della Groenlandia occidentale", "WGST", + "Ora della Groenlandia occidentale", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"Ora dell'Ecuador", "ECT", - "Ora estiva dell'Ecuador", "ECST"}}, + "Ora estiva dell'Ecuador", "ECST", + "Ora dell'Ecuador", "ECT"}}, {"America/Guyana", new String[] {"Ora della Guyana", "GYT", - "Ora estiva della Guyana", "GYST"}}, + "Ora estiva della Guyana", "GYST", + "Ora della Guyana", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"Ora della Bolivia", "BOT", - "Ora estiva della Bolivia", "BOST"}}, + "Ora estiva della Bolivia", "BOST", + "Ora della Bolivia", "BOT"}}, {"America/Lima", new String[] {"Ora del Per\u00f9", "PET", - "Ora estiva del Per\u00f9", "PEST"}}, + "Ora estiva del Per\u00f9", "PEST", + "Ora del Per\u00F9", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"Ora standard di Metlakatla", "MeST", - "Ora legale di Metlakatla", "MeDT"}}, + "Ora legale di Metlakatla", "MeDT", + "Ora di Metlakatla", "MeT"}}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Ora solare di Saint-Pierre e Miquelon", "PMST", - "Ora legale di Saint-Pierre e Miquelon", "PMDT"}}, + "Ora legale di Saint-Pierre e Miquelon", "PMDT", + "Ora Saint-Pierre e Miquelon", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"Ora dell'Uruguay", "UYT", - "Ora estiva dell'Uruguay", "UYST"}}, + "Ora estiva dell'Uruguay", "UYST", + "Ora dell'Uruguay", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"Ora di Suriname", "SRT", - "Ora estiva di Suriname", "SRST"}}, + "Ora estiva di Suriname", "SRST", + "Ora di Suriname", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"Ora di Davis", "DAVT", - "Ora estiva di Davis", "DAVST"}}, + "Ora estiva di Davis", "DAVST", + "Ora di Davis", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Ora di Dumont-d'Urville", "DDUT", - "Ora estiva di Dumont-d'Urville", "DDUST"}}, + "Ora estiva di Dumont-d'Urville", "DDUST", + "Ora di Dumont-d'Urville", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"Ora dell'Isola Macquarie", "MIST", - "Ora estiva dell'Isola Macquarie", "MIST"}}, + "Ora estiva dell'Isola Macquarie", "MIST", + "Ora dell'Isola Macquarie", "MIST"}}, {"Antarctica/Mawson", new String[] {"Ora di Mawson", "MAWT", - "Ora estiva di Mawson", "MAWST"}}, + "Ora estiva di Mawson", "MAWST", + "Ora di Mawson", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"Ora di Rothera", "ROTT", - "Ora estiva di Rothera", "ROTST"}}, + "Ora estiva di Rothera", "ROTST", + "Ora di Rothera", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Ora di Syowa", "SYOT", - "Ora estiva di Syowa", "SYOST"}}, + "Ora estiva di Syowa", "SYOST", + "Ora di Syowa", "SYOT"}}, {"Antarctica/Vostok", new String[] {"Ora di Vostok", "VOST", - "Ora estiva di Vostok", "VOSST"}}, + "Ora estiva di Vostok", "VOSST", + "Ora di Vostok", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Ora di Alma-Ata", "ALMT", - "Ora estiva di Alma-Ata", "ALMST"}}, + "Ora estiva di Alma-Ata", "ALMST", + "Ora di Alma-Ata", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"Ora di Anadyr", "ANAT", - "Ora estiva di Anadyr", "ANAST"}}, + "Ora estiva di Anadyr", "ANAST", + "Ora di Anadyr", "ANAT"}}, {"Asia/Aqtau", new String[] {"Ora di Aqtau", "AQTT", - "Ora estiva di Aqtau", "AQTST"}}, + "Ora estiva di Aqtau", "AQTST", + "Ora di Aqtau", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Ora di Aqtobe", "AQTT", - "Ora estiva di Aqtobe", "AQTST"}}, + "Ora estiva di Aqtobe", "AQTST", + "Ora di Aqtobe", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"Ora dell'Azerbaigian", "AZT", - "Ora estiva dell'Azerbaigian", "AZST"}}, + "Ora estiva dell'Azerbaigian", "AZST", + "Ora dell'Azerbaigian", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"Ora del Kirghizistan", "KGT", - "Ora estiva del Kirghizistan", "KGST"}}, + "Ora estiva del Kirghizistan", "KGST", + "Ora del Kirghizistan", "KGT"}}, {"Asia/Brunei", new String[] {"Ora del Brunei", "BNT", - "Ora estiva del Brunei", "BNST"}}, + "Ora estiva del Brunei", "BNST", + "Ora del Brunei", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Ora di Choibalsan", "CHOT", - "Ora estiva di Choibalsan", "CHOST"}}, + "Ora estiva di Choibalsan", "CHOST", + "Ora di Choibalsan", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"Ora di Timor Leste", "TLT", - "Ora estiva di Timor Leste", "TLST"}}, + "Ora estiva di Timor Leste", "TLST", + "Ora di Timor Est", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"Ora del Tagikistan", "TJT", - "Ora estiva del Tagikistan", "TJST"}}, + "Ora estiva del Tagikistan", "TJST", + "Ora del Tagikistan", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"Ora di Hovd", "HOVT", - "Ora estiva di Hovd", "HOVST"}}, + "Ora estiva di Hovd", "HOVST", + "Ora di Hovd", "HOVT"}}, {"Asia/Irkutsk", new String[] {"Ora di Irkutsk", "IRKT", - "Ora estiva di Irkutsk", "IRKST"}}, + "Ora estiva di Irkutsk", "IRKST", + "Ora di Irkutsk", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"Ora dell'Indonesia orientale", "WIT", - "Ora estiva dell'Indonesia orientale", "EIST"}}, + "Ora estiva dell'Indonesia orientale", "EIST", + "Ora dell'Indonesia orientale", "WIT"}}, {"Asia/Kabul", new String[] {"Ora dell'Afghanistan", "AFT", - "Ora estiva dell'Afghanistan", "AFST"}}, + "Ora estiva dell'Afghanistan", "AFST", + "Ora dell'Afghanistan", "AFT"}}, {"Asia/Kamchatka", new String[] {"Ora di Petropavlovsk-Kamchatski", "PETT", - "Ora estiva di Petropavlovsk-Kamchatski", "PETST"}}, + "Ora estiva di Petropavlovsk-Kamchatski", "PETST", + "Ora di Petropavlovsk-Kamchatski", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, {"Asia/Kolkata", IST}, {"Asia/Khandyga", new String[] {"Ora di Khandyga", "YAKT", - "Ora estiva di Khandyga", "YAKST"}}, + "Ora estiva di Khandyga", "YAKST", + "Ora di Khandyga", "YAKT"}}, {"Asia/Krasnoyarsk", new String[] {"Ora di Krasnojarsk", "KRAT", - "Ora estiva di Krasnojarsk", "KRAST"}}, + "Ora estiva di Krasnojarsk", "KRAST", + "Ora di Krasnojarsk", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Ora di Magadan", "MAGT", - "Ora estiva di Magadan", "MAGST"}}, + "Ora estiva di Magadan", "MAGST", + "Ora di Magadan", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"Ora delle Filippine", "PHT", - "Ora estiva delle Filippine", "PHST"}}, + "Ora estiva delle Filippine", "PHST", + "Ora delle Filippine", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Ora di Oral", "ORAT", - "Ora estiva di Oral", "ORAST"}}, + "Ora estiva di Oral", "ORAST", + "Ora di Oral", "ORAT"}}, {"Asia/Omsk", new String[] {"Ora di Omsk", "OMST", - "Ora estiva di Omsk", "OMSST"}}, + "Ora estiva di Omsk", "OMSST", + "Ora di Omsk", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Ora di Qyzylorda", "QYZT", - "Ora estiva di Qyzylorda", "QYZST"}}, + "Ora estiva di Qyzylorda", "QYZST", + "Ora di Qyzylorda", "QYZT"}}, {"Asia/Rangoon", new String[] {"Ora della Birmania/Myanmar", "MMT", - "Ora estiva della Birmania/Myanmar", "MMST"}}, + "Ora estiva della Birmania/Myanmar", "MMST", + "Ora della Birmania/Myanmar", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"Ora di Sakhalin", "SAKT", - "Ora estiva di Sakhalin", "SAKST"}}, + "Ora estiva di Sakhalin", "SAKST", + "Ora di Sakhalin", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"Ora della Georgia", "GET", - "Ora estiva della Georgia", "GEST"}}, + "Ora estiva della Georgia", "GEST", + "Ora della Georgia", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"Ora di Ust-Nera", "VLAT", - "Ora estiva di Ust-Nera", "VLAST"}}, + "Ora estiva di Ust-Nera", "VLAST", + "Ora di Ust-Nera", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"Ora di Vladivostok", "VLAT", - "Ora estiva di Vladivostok", "VLAST"}}, + "Ora estiva di Vladivostok", "VLAST", + "Ora di Vladivostok", "VLAT"}}, {"Asia/Yakutsk", new String[] {"Ora di Jakutsk", "YAKT", - "Ora estiva di Jakutsk", "YAKST"}}, + "Ora estiva di Jakutsk", "YAKST", + "Ora di Yakutsk", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Ora di Ekaterinburg", "YEKT", - "Ora estiva di Ekaterinburg", "YEKST"}}, + "Ora estiva di Ekaterinburg", "YEKST", + "Ora di Ekaterinburg", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"Ora delle Azzorre", "AZOT", - "Ora estiva delle Azzorre", "AZOST"}}, + "Ora estiva delle Azzorre", "AZOST", + "Ora delle Azzorre", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"Ora di Capo Verde", "CVT", - "Ora estiva di Capo Verde", "CVST"}}, + "Ora estiva di Capo Verde", "CVST", + "Ora di Capo Verde", "CVT"}}, {"Atlantic/Faroe", WET}, {"Atlantic/Faeroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"Ora solare della Georgia Australe", "GST", - "Ora legale della Georgia Australe", "GDT"}}, + "Ora legale della Georgia Australe", "GDT", + "Ora Georgia del Sud", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"Ora delle Falkland", "FKT", - "Ora estiva delle Falkland", "FKST"}}, + "Ora estiva delle Falkland", "FKST", + "Ora delle Falkland", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"Ora standard Australia centro-occidentale", "CWST", - "Ora estiva Australia centro-occidentale", "CWST"}}, + "Ora estiva Australia centro-occidentale", "CWST", + "Ora Australia centro-occidentale", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"Ora di Samara", "SAMT", - "Ora estiva di Samara", "SAMST"}}, + "Ora estiva di Samara", "SAMST", + "Ora di Samara", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"Ora di Volgograd", "VOLT", - "Ora estiva di Volgograd", "VOLST"}}, + "Ora estiva di Volgograd", "VOLST", + "Ora di Volgograd", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"Ora del Terr. Britannico dell'Oceano Indiano", "IOT", - "Ora estiva del Terr. Britannico dell'Oceano Indiano", "IOST"}}, + "Ora estiva del Terr. Britannico dell'Oceano Indiano", "IOST", + "Ora del Territorio Britannico dell'Oceano Indiano", "IOT"}}, {"Indian/Christmas", new String[] {"Ora dell'Isola Christmas", "CXT", - "Ora estiva dell'Isola Christmas", "CXST"}}, + "Ora estiva dell'Isola Christmas", "CXST", + "Ora dell'Isola Christmas", "CIT"}}, {"Indian/Cocos", new String[] {"Ora delle Isole Cocos", "CCT", - "Ora estiva delle Isole Cocos", "CCST"}}, + "Ora estiva delle Isole Cocos", "CCST", + "Ora delle Isole Cocos", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"Ora delle Terre Australi e Antartiche Francesi", "TFT", - "Ora estiva delle Terre Australi Antartiche Francesi", "TFST"}}, + "Ora estiva delle Terre Australi Antartiche Francesi", "TFST", + "Ora delle Terre Australi e Antartiche Francesi", "TFT"}}, {"Indian/Mahe", new String[] {"Ora delle Seychelles", "SCT", - "Ora estiva delle Seychelles", "SCST"}}, + "Ora estiva delle Seychelles", "SCST", + "Ora delle Seychelles", "SCT"}}, {"Indian/Maldives", new String[] {"Ora delle Maldive", "MVT", - "Ora estiva delle Maldive", "MVST"}}, + "Ora estiva delle Maldive", "MVST", + "Ora delle Maldive", "MVT"}}, {"Indian/Mauritius", new String[] {"Ora di Mauritius", "MUT", - "Ora estiva di Mauritius", "MUST"}}, + "Ora estiva di Mauritius", "MUST", + "Ora di Mauritius", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"Ora di Reunion", "RET", - "Ora estiva di Reunion", "REST"}}, + "Ora estiva di Reunion", "REST", + "Ora di Reunion", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"Ora dell'Europa centrale", "MET", - "Ora estiva dell'Europa centrale", "MEST"}}, + "Ora estiva dell'Europa centrale", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"Ora di Vanuatu", "VUT", - "Ora estiva di Vanuatu", "VUST"}}, + "Ora estiva di Vanuatu", "VUST", + "Ora di Vanuatu", "VUT"}}, {"Pacific/Enderbury", new String[] {"Ora dell'Isola della Fenice", "PHOT", - "Ora estiva dell'Isola della Fenice", "PHOST"}}, + "Ora estiva dell'Isola della Fenice", "PHOST", + "Ora delle Isole Phoenix", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"Ora di Tokelau", "TKT", - "Ora estiva di Tokelau", "TKST"}}, + "Ora estiva di Tokelau", "TKST", + "Ora di Tokelau", "TKT"}}, {"Pacific/Fiji", new String[] {"Ora di Figi", "FJT", - "Ora estiva di Figi", "FJST"}}, + "Ora estiva di Figi", "FJST", + "Ora di Figi", "FJT"}}, {"Pacific/Funafuti", new String[] {"Ora di Tuvalu", "TVT", - "Ora estiva di Tuvalu", "TVST"}}, + "Ora estiva di Tuvalu", "TVST", + "Ora di Tuvalu", "TVT"}}, {"Pacific/Galapagos", new String[] {"Ora delle Galapagos", "GALT", - "Ora estiva delle Galapagos", "GALST"}}, + "Ora estiva delle Galapagos", "GALST", + "Ora delle Galapagos", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Ora delle Line Islands", "LINT", - "Ora estiva delle Line Islands", "LINST"}}, + "Ora estiva delle Line Islands", "LINST", + "Ora delle Line Islands", "LINT"}}, {"Pacific/Kosrae", new String[] {"Ora di Kosrae", "KOST", - "Ora estiva di Kosrae", "KOSST"}}, + "Ora estiva di Kosrae", "KOSST", + "Ora di Kosrae", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"Ora delle Isole Marchesi", "MART", - "Ora estiva delle Isole Marchesi", "MARST"}}, + "Ora estiva delle Isole Marchesi", "MARST", + "Ora delle Isole Marchesi", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"Ora di Nauru", "NRT", - "Ora estiva di Nauru", "NRST"}}, + "Ora estiva di Nauru", "NRST", + "Ora di Nauru", "NRT"}}, {"Pacific/Niue", new String[] {"Ora di Niue", "NUT", - "Ora estiva di Niue", "NUST"}}, + "Ora estiva di Niue", "NUST", + "Ora di Niue", "NUT"}}, {"Pacific/Norfolk", new String[] {"Ora di Norfolk", "NFT", - "Ora estiva di Norfolk", "NFST"}}, + "Ora estiva di Norfolk", "NFST", + "Ora di Norfolk", "NFT"}}, {"Pacific/Noumea", new String[] {"Ora della Nuova Caledonia", "NCT", - "Ora estiva della Nuova Caledonia", "NCST"}}, + "Ora estiva della Nuova Caledonia", "NCST", + "Ora della Nuova Caledonia", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"Ora di Palau", "PWT", - "Ora estiva di Palau", "PWST"}}, + "Ora estiva di Palau", "PWST", + "Ora di Palau", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"Ora di Papua Nuova Guinea", "PGT", - "Ora estiva di Papua Nuova Guinea", "PGST"}}, + "Ora estiva di Papua Nuova Guinea", "PGST", + "Ora di Papua Nuova Guinea", "PGT"}}, {"Pacific/Rarotonga", new String[] {"Ora delle Isole Cook", "CKT", - "Ora estiva delle Isole Cook", "CKHST"}}, + "Ora estiva delle Isole Cook", "CKHST", + "Ora delle Isole Cook", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"Ora di Tahiti", "TAHT", - "Ora estiva di Tahiti", "TAHST"}}, + "Ora estiva di Tahiti", "TAHST", + "Ora di Tahiti", "TAHT"}}, {"Pacific/Tarawa", new String[] {"Ora delle Isole Gilbert", "GILT", - "Ora estiva delle Isole Gilbert", "GILST"}}, + "Ora estiva delle Isole Gilbert", "GILST", + "Ora delle Isole Gilbert", "GILT"}}, {"Pacific/Tongatapu", new String[] {"Ora di Tonga", "TOT", - "Ora estiva di Tonga", "TOST"}}, + "Ora estiva di Tonga", "TOST", + "Ora di Tonga", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"Ora di Wake", "WAKT", - "Ora estiva di Wake", "WAKST"}}, + "Ora estiva di Wake", "WAKST", + "Ora di Wake", "WAKT"}}, {"Pacific/Wallis", new String[] {"Ora di Wallis e Futuna", "WFT", - "Ora estiva di Wallis e Futuna", "WFST"}}, + "Ora estiva di Wallis e Futuna", "WFST", + "Ora di Wallis e Futuna", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java b/jdk/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java index 6a71a9fb605..4b655c0b0d8 100644 --- a/jdk/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java +++ b/jdk/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"\u30a2\u30af\u30ec\u6642\u9593", "ACT", - "\u30a2\u30af\u30ec\u590f\u6642\u9593", "ACST"}; + "\u30a2\u30af\u30ec\u590f\u6642\u9593", "ACST", + "\u30a2\u30af\u30ec\u6642\u9593", "ACT"}; String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST", - "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST"}; + "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST", + "\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CT"}; String AGT[] = new String[] {"\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "ART", - "\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u590f\u6642\u9593", "ARST"}; + "\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u590f\u6642\u9593", "ARST", + "\u30A2\u30EB\u30BC\u30F3\u30C1\u30F3\u6642\u9593", "ART"}; String AKST[] = new String[] {"\u30a2\u30e9\u30b9\u30ab\u6a19\u6e96\u6642", "AKST", - "\u30a2\u30e9\u30b9\u30ab\u590f\u6642\u9593", "AKDT"}; + "\u30a2\u30e9\u30b9\u30ab\u590f\u6642\u9593", "AKDT", + "\u30A2\u30E9\u30B9\u30AB\u6642\u9593", "AKT"}; String AMT[] = new String[] {"\u30a2\u30de\u30be\u30f3\u6642\u9593", "AMT", - "\u30a2\u30de\u30be\u30f3\u590f\u6642\u9593", "AMST"}; + "\u30a2\u30de\u30be\u30f3\u590f\u6642\u9593", "AMST", + "\u30A2\u30DE\u30BE\u30F3\u6642\u9593", "AMT"}; String ARAST[] = new String[] {"\u30a2\u30e9\u30d3\u30a2\u6a19\u6e96\u6642", "AST", - "\u30a2\u30e9\u30d3\u30a2\u590f\u6642\u9593", "ADT"}; + "\u30a2\u30e9\u30d3\u30a2\u590f\u6642\u9593", "ADT", + "\u30A2\u30E9\u30D3\u30A2\u6642\u9593", "AT"}; String ARMT[] = new String[] {"\u30a2\u30eb\u30e1\u30cb\u30a2\u6642\u9593", "AMT", - "\u30a2\u30eb\u30e1\u30cb\u30a2\u590f\u6642\u9593", "AMST"}; + "\u30a2\u30eb\u30e1\u30cb\u30a2\u590f\u6642\u9593", "AMST", + "\u30A2\u30EB\u30E1\u30CB\u30A2\u6642\u9593", "AMT"}; String AST[] = new String[] {"\u5927\u897f\u6d0b\u6a19\u6e96\u6642", "AST", - "\u5927\u897f\u6d0b\u590f\u6642\u9593", "ADT"}; + "\u5927\u897f\u6d0b\u590f\u6642\u9593", "ADT", + "\u5927\u897F\u6D0B\u6A19\u6E96\u6642", "AT"}; String BDT[] = new String[] {"\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u6642\u9593", "BDT", - "\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u590f\u6642\u9593", "BDST"}; + "\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u590f\u6642\u9593", "BDST", + "\u30D0\u30F3\u30B0\u30E9\u30C7\u30B7\u30E5\u6642\u9593", "BDT"}; String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST", - "\u6771\u90E8\u590F\u6642\u9593(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST"}; + "\u6771\u90E8\u590F\u6642\u9593(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST", + "\u6771\u90E8\u6A19\u6E96\u6642(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "ET"}; String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST", - "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST"}; + "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST", + "\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CT"}; String BRT[] = new String[] {"\u30d6\u30e9\u30b8\u30eb\u6642\u9593", "BRT", - "\u30d6\u30e9\u30b8\u30eb\u590f\u6642\u9593", "BRST"}; + "\u30d6\u30e9\u30b8\u30eb\u590f\u6642\u9593", "BRST", + "\u30D6\u30E9\u30B8\u30EA\u30A2\u6642\u9593", "BRT"}; String BTT[] = new String[] {"\u30d6\u30fc\u30bf\u30f3\u6642\u9593", "BTT", - "\u30d6\u30fc\u30bf\u30f3\u590f\u6642\u9593", "BTST"}; + "\u30d6\u30fc\u30bf\u30f3\u590f\u6642\u9593", "BTST", + "\u30D6\u30FC\u30BF\u30F3\u6642\u9593", "BTT"}; String CAT[] = new String[] {"\u4e2d\u90e8\u30a2\u30d5\u30ea\u30ab\u6642\u9593", "CAT", - "\u4e2d\u90e8\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "CAST"}; + "\u4e2d\u90e8\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "CAST", + "\u4E2D\u90E8\u30A2\u30D5\u30EA\u30AB\u6642\u9593", "CAT"}; String CET[] = new String[] {"\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "CET", - "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "CEST"}; + "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "CEST", + "\u4E2D\u90E8\u30E8\u30FC\u30ED\u30C3\u30D1\u6642\u9593", "CET"}; String CHAST[] = new String[] {"\u30c1\u30e3\u30bf\u30e0\u6a19\u6e96\u6642", "CHAST", - "\u30c1\u30e3\u30bf\u30e0\u590f\u6642\u9593", "CHADT"}; + "\u30c1\u30e3\u30bf\u30e0\u590f\u6642\u9593", "CHADT", + "\u30C1\u30E3\u30BF\u30E0\u6642\u9593", "CHAT"}; String CHUT[] = new String[] {"\u30C1\u30E5\u30FC\u30AF\u6642\u9593", "CHUT", - "Chuuk Time", "CHUST"}; + "Chuuk Time", "CHUST", + "\u30C1\u30E5\u30FC\u30AF\u6642\u9593", "CHUT"}; String CIT[] = new String[] {"\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WITA", - "\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "CIST"}; + "\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "CIST", + "\u4E2D\u90E8\u30A4\u30F3\u30C9\u30CD\u30B7\u30A2\u6642\u9593", "WITA"}; String CLT[] = new String[] {"\u30c1\u30ea\u6642\u9593", "CLT", - "\u30c1\u30ea\u590f\u6642\u9593", "CLST"}; + "\u30c1\u30ea\u590f\u6642\u9593", "CLST", + "\u30C1\u30EA\u6642\u9593", "CLT"}; String CST[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642", "CST", - "\u4e2d\u90e8\u590f\u6642\u9593", "CDT"}; + "\u4e2d\u90e8\u590f\u6642\u9593", "CDT", + "\u4E2D\u90E8\u6A19\u6E96\u6642", "CT"}; String CTT[] = new String[] {"\u4e2d\u56fd\u6a19\u6e96\u6642", "CST", - "\u4e2d\u56fd\u590f\u6642\u9593", "CDT"}; + "\u4e2d\u56fd\u590f\u6642\u9593", "CDT", + "\u4E2D\u56FD\u6642\u9593", "CT"}; String CUBA[] = new String[] {"\u30ad\u30e5\u30fc\u30d0\u6a19\u6e96\u6642", "CST", - "\u30ad\u30e5\u30fc\u30d0\u590f\u6642\u9593", "CDT"}; + "\u30ad\u30e5\u30fc\u30d0\u590f\u6642\u9593", "CDT", + "\u30AD\u30E5\u30FC\u30D0\u6642\u9593", "CT"}; String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST", - "\u4E2D\u90E8\u590F\u6642\u9593(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST"}; + "\u4E2D\u90E8\u590F\u6642\u9593(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST", + "\u4E2D\u90E8\u6A19\u6E96\u6642(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CT"}; String DUBLIN[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", - "\u30a2\u30a4\u30eb\u30e9\u30f3\u30c9\u590f\u6642\u9593", "IST"}; + "\u30a2\u30a4\u30eb\u30e9\u30f3\u30c9\u590f\u6642\u9593", "IST", + "\u30A2\u30A4\u30EB\u30E9\u30F3\u30C9\u6642\u9593", "IT"}; String EAT[] = new String[] {"\u6771\u30a2\u30d5\u30ea\u30ab\u6642\u9593", "EAT", - "\u6771\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "EAST"}; + "\u6771\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "EAST", + "\u6771\u90E8\u30A2\u30D5\u30EA\u30AB\u6642\u9593", "EAT"}; String EASTER[] = new String[] {"\u30a4\u30fc\u30b9\u30bf\u30fc\u5cf6\u6642\u9593", "EAST", - "\u30a4\u30fc\u30b9\u30bf\u30fc\u5cf6\u590f\u6642\u9593", "EASST"}; + "\u30a4\u30fc\u30b9\u30bf\u30fc\u5cf6\u590f\u6642\u9593", "EASST", + "\u30A4\u30FC\u30B9\u30BF\u30FC\u5CF6\u6642\u9593", "EAST"}; String EET[] = new String[] {"\u6771\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "EET", - "\u6771\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "EEST"}; + "\u6771\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "EEST", + "\u6771\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "EET"}; String EGT[] = new String[] {"\u6771\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u6642\u9593", "EGT", - "\u6771\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u590f\u6642\u9593", "EGST"}; + "\u6771\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u590f\u6642\u9593", "EGST", + "\u6771\u90E8\u30B0\u30EA\u30FC\u30F3\u30E9\u30F3\u30C9\u6642\u9593", "EGT"}; String EST[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642", "EST", - "\u6771\u90e8\u590f\u6642\u9593", "EDT"}; + "\u6771\u90e8\u590f\u6642\u9593", "EDT", + "\u6771\u90E8\u6A19\u6E96\u6642", "ET"}; String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST", - "\u6771\u90E8\u590F\u6642\u9593(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST"}; + "\u6771\u90E8\u590F\u6642\u9593(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST", + "\u6771\u90E8\u6A19\u6E96\u6642(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "ET"}; String FET[] = new String[] {"\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u6642\u9593", "FET", - "\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u590F\u6642\u9593", "FEST"}; + "\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u590F\u6642\u9593", "FEST", + "\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u6642\u9593", "FET"}; String GHMT[] = new String[] {"\u30ac\u30fc\u30ca\u6a19\u6e96\u6642", "GMT", - "\u30ac\u30fc\u30ca\u590f\u6642\u9593", "GHST"}; + "\u30ac\u30fc\u30ca\u590f\u6642\u9593", "GHST", + "\u30AC\u30FC\u30CA\u6A19\u6E96\u6642", "GMT"}; String GAMBIER[] = new String[] {"\u30ac\u30f3\u30d3\u30a2\u6642\u9593", "GAMT", - "\u30ac\u30f3\u30d3\u30a2\u590f\u6642\u9593", "GAMST"}; + "\u30ac\u30f3\u30d3\u30a2\u590f\u6642\u9593", "GAMST", + "\u30AC\u30F3\u30D3\u30A8\u6642\u9593", "GAMT"}; String GMT[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", - "\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT"}; + "\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", + "\u30B0\u30EA\u30CB\u30C3\u30B8\u6A19\u6E96\u6642", "GMT"}; String GMTBST[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", - "\u82f1\u56fd\u590f\u6642\u9593", "BST"}; + "\u82f1\u56fd\u590f\u6642\u9593", "BST", + "\u30A4\u30AE\u30EA\u30B9\u6642\u9593", "BT"}; String GST[] = new String[] {"\u6e7e\u5cb8\u6a19\u6e96\u6642", "GST", - "\u6e7e\u5cb8\u590f\u6642\u9593", "GDT"}; + "\u6e7e\u5cb8\u590f\u6642\u9593", "GDT", + "\u6E7E\u5CB8\u6642\u9593", "GT"}; String HAST[] = new String[] {"\u30cf\u30ef\u30a4 - \u30a2\u30ea\u30e5\u30fc\u30b7\u30e3\u30f3\u6a19\u6e96\u6642", "HAST", - "\u30cf\u30ef\u30a4 - \u30a2\u30ea\u30e5\u30fc\u30b7\u30e3\u30f3\u590f\u6642\u9593", "HADT"}; + "\u30cf\u30ef\u30a4 - \u30a2\u30ea\u30e5\u30fc\u30b7\u30e3\u30f3\u590f\u6642\u9593", "HADT", + "\u30CF\u30EF\u30A4\u30FB\u30A2\u30EA\u30E5\u30FC\u30B7\u30E3\u30F3\u6642\u9593", "HAT"}; String HKT[] = new String[] {"\u9999\u6e2f\u6642\u9593", "HKT", - "\u9999\u6e2f\u590f\u6642\u9593", "HKST"}; + "\u9999\u6e2f\u590f\u6642\u9593", "HKST", + "\u9999\u6E2F\u6642\u9593", "HKT"}; String HST[] = new String[] {"\u30cf\u30ef\u30a4\u6a19\u6e96\u6642", "HST", - "\u30cf\u30ef\u30a4\u590f\u6642\u9593", "HDT"}; + "\u30cf\u30ef\u30a4\u590f\u6642\u9593", "HDT", + "\u30CF\u30EF\u30A4\u6642\u9593", "HT"}; String ICT[] = new String[] {"\u30a4\u30f3\u30c9\u30b7\u30ca\u6642\u9593", "ICT", - "\u30a4\u30f3\u30c9\u30b7\u30ca\u590f\u6642\u9593", "ICST"}; + "\u30a4\u30f3\u30c9\u30b7\u30ca\u590f\u6642\u9593", "ICST", + "\u30A4\u30F3\u30C9\u30B7\u30CA\u6642\u9593", "ICT"}; String IRT[] = new String[] {"\u30a4\u30e9\u30f3\u6a19\u6e96\u6642", "IRST", - "\u30a4\u30e9\u30f3\u590f\u6642\u9593", "IRDT"}; + "\u30a4\u30e9\u30f3\u590f\u6642\u9593", "IRDT", + "\u30A4\u30E9\u30F3\u6642\u9593", "IRT"}; String ISRAEL[] = new String[] {"\u30a4\u30b9\u30e9\u30a8\u30eb\u6a19\u6e96\u6642", "IST", - "\u30a4\u30b9\u30e9\u30a8\u30eb\u590f\u6642\u9593", "IDT"}; + "\u30a4\u30b9\u30e9\u30a8\u30eb\u590f\u6642\u9593", "IDT", + "\u30A4\u30B9\u30E9\u30A8\u30EB\u6642\u9593", "IT"}; String IST[] = new String[] {"\u30a4\u30f3\u30c9\u6a19\u6e96\u6642", "IST", - "\u30a4\u30f3\u30c9\u590f\u6642\u9593", "IDT"}; + "\u30a4\u30f3\u30c9\u590f\u6642\u9593", "IDT", + "\u30A4\u30F3\u30C9\u6642\u9593", "IT"}; String JST[] = new String[] {"\u65e5\u672c\u6a19\u6e96\u6642", "JST", - "\u65e5\u672c\u590f\u6642\u9593", "JDT"}; + "\u65e5\u672c\u590f\u6642\u9593", "JDT", + "\u65E5\u672C\u6642\u9593", "JT"}; String KST[] = new String[] {"\u97d3\u56fd\u6a19\u6e96\u6642", "KST", - "\u97d3\u56fd\u590f\u6642\u9593", "KDT"}; + "\u97d3\u56fd\u590f\u6642\u9593", "KDT", + "\u97D3\u56FD\u6642\u9593", "KT"}; String LORD_HOWE[] = new String[] {"\u30ed\u30fc\u30c9\u30cf\u30a6\u5cf6\u6a19\u6e96\u6642", "LHST", - "\u30ed\u30fc\u30c9\u30cf\u30a6\u5cf6\u590f\u6642\u9593", "LHST"}; + "\u30ed\u30fc\u30c9\u30cf\u30a6\u5cf6\u590f\u6642\u9593", "LHST", + "\u30ED\u30FC\u30C9\u30CF\u30A6\u6642\u9593", "LHT"}; String MHT[] = new String[] {"\u30de\u30fc\u30b7\u30e3\u30eb\u5cf6\u6642\u9593", "MHT", - "\u30de\u30fc\u30b7\u30e3\u30eb\u5cf6\u590f\u6642\u9593", "MHST"}; + "\u30de\u30fc\u30b7\u30e3\u30eb\u5cf6\u590f\u6642\u9593", "MHST", + "\u30DE\u30FC\u30B7\u30E3\u30EB\u8AF8\u5CF6\u6642\u9593", "MHT"}; String MSK[] = new String[] {"\u30e2\u30b9\u30af\u30ef\u6a19\u6e96\u6642", "MSK", - "\u30e2\u30b9\u30af\u30ef\u590f\u6642\u9593", "MSD"}; + "\u30e2\u30b9\u30af\u30ef\u590f\u6642\u9593", "MSD", + "\u30E2\u30B9\u30AF\u30EF\u6642\u9593", "MT"}; String MST[] = new String[] {"\u5c71\u5730\u6a19\u6e96\u6642", "MST", - "\u5c71\u5730\u590f\u6642\u9593", "MDT"}; + "\u5c71\u5730\u590f\u6642\u9593", "MDT", + "\u5C71\u5730\u6A19\u6E96\u6642", "MT"}; String MYT[] = new String[] {"\u30de\u30ec\u30fc\u30b7\u30a2\u6642\u9593", "MYT", - "\u30de\u30ec\u30fc\u30b7\u30a2\u590f\u6642\u9593", "MYST"}; + "\u30de\u30ec\u30fc\u30b7\u30a2\u590f\u6642\u9593", "MYST", + "\u30DE\u30EC\u30FC\u30B7\u30A2\u6642\u9593", "MYT"}; String NORONHA[] = new String[] {"\u30d5\u30a7\u30eb\u30ca\u30f3\u30c9\u30fb\u30c7\u30fb\u30ce\u30ed\u30fc\u30cb\u30e3\u6642\u9593", "FNT", - "\u30d5\u30a7\u30eb\u30ca\u30f3\u30c9\u30fb\u30c7\u30fb\u30ce\u30ed\u30fc\u30cb\u30e3\u590f\u6642\u9593", "FNST"}; + "\u30d5\u30a7\u30eb\u30ca\u30f3\u30c9\u30fb\u30c7\u30fb\u30ce\u30ed\u30fc\u30cb\u30e3\u590f\u6642\u9593", "FNST", + "\u30D5\u30A7\u30EB\u30CA\u30F3\u30C9\u30FB\u30C7\u30FB\u30CE\u30ED\u30FC\u30CB\u30E3\u6642\u9593", "FNT"}; String NOVT[] = new String[] {"\u30ce\u30dc\u30b7\u30d3\u30eb\u30b9\u30af\u6642\u9593", "NOVT", - "\u30ce\u30dc\u30b7\u30d3\u30eb\u30b9\u30af\u590f\u6642\u9593", "NOVST"}; + "\u30ce\u30dc\u30b7\u30d3\u30eb\u30b9\u30af\u590f\u6642\u9593", "NOVST", + "\u30CE\u30F4\u30A9\u30B7\u30D3\u30EB\u30B9\u30AF\u6642\u9593", "NOVT"}; String NPT[] = new String[] {"\u30cd\u30d1\u30fc\u30eb\u6642\u9593", "NPT", - "\u30cd\u30d1\u30fc\u30eb\u590f\u6642\u9593", "NPST"}; + "\u30cd\u30d1\u30fc\u30eb\u590f\u6642\u9593", "NPST", + "\u30CD\u30D1\u30FC\u30EB\u6642\u9593", "NPT"}; String NST[] = new String[] {"\u30cb\u30e5\u30fc\u30d5\u30a1\u30f3\u30c9\u30e9\u30f3\u30c9\u6a19\u6e96\u6642", "NST", - "\u30cb\u30e5\u30fc\u30d5\u30a1\u30f3\u30c9\u30e9\u30f3\u30c9\u590f\u6642\u9593", "NDT"}; + "\u30cb\u30e5\u30fc\u30d5\u30a1\u30f3\u30c9\u30e9\u30f3\u30c9\u590f\u6642\u9593", "NDT", + "\u30CB\u30E5\u30FC\u30D5\u30A1\u30F3\u30C9\u30E9\u30F3\u30C9\u6642\u9593", "NT"}; String NZST[] = new String[] {"\u30cb\u30e5\u30fc\u30b8\u30fc\u30e9\u30f3\u30c9\u6a19\u6e96\u6642", "NZST", - "\u30cb\u30e5\u30fc\u30b8\u30fc\u30e9\u30f3\u30c9\u590f\u6642\u9593", "NZDT"}; + "\u30cb\u30e5\u30fc\u30b8\u30fc\u30e9\u30f3\u30c9\u590f\u6642\u9593", "NZDT", + "\u30CB\u30E5\u30FC\u30B8\u30FC\u30E9\u30F3\u30C9\u6642\u9593", "NZT"}; String PITCAIRN[] = new String[] {"\u30d4\u30c8\u30b1\u30eb\u30f3\u5cf6\u6a19\u6e96\u6642", "PST", - "\u30d4\u30c8\u30b1\u30eb\u30f3\u5cf6\u590f\u6642\u9593", "PDT"}; + "\u30d4\u30c8\u30b1\u30eb\u30f3\u5cf6\u590f\u6642\u9593", "PDT", + "\u30D4\u30C8\u30B1\u30A2\u30F3\u6642\u9593", "PT"}; String PKT[] = new String[] {"\u30d1\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "PKT", - "\u30d1\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "PKST"}; + "\u30d1\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "PKST", + "\u30D1\u30AD\u30B9\u30BF\u30F3\u6642\u9593", "PKT"}; String PONT[] = new String[] {"\u30DD\u30F3\u30DA\u30A4\u6642\u9593", "PONT", - "\u30DD\u30F3\u30DA\u30A4\u590F\u6642\u9593", "PONST"}; + "\u30DD\u30F3\u30DA\u30A4\u590F\u6642\u9593", "PONST", + "\u30DD\u30CA\u30DA\u6642\u9593", "PONT"}; String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642", "PST", - "\u592a\u5e73\u6d0b\u590f\u6642\u9593", "PDT"}; + "\u592a\u5e73\u6d0b\u590f\u6642\u9593", "PDT", + "\u592A\u5E73\u6D0B\u6A19\u6E96\u6642", "PT"}; String SAST[] = new String[] {"\u5357\u30a2\u30d5\u30ea\u30ab\u6a19\u6e96\u6642", "SAST", - "\u5357\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "SAST"}; + "\u5357\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "SAST", + "\u5357\u30A2\u30D5\u30EA\u30AB\u6642\u9593", "SAT"}; String SBT[] = new String[] {"\u30bd\u30ed\u30e2\u30f3\u8af8\u5cf6\u6642\u9593", "SBT", - "\u30bd\u30ed\u30e2\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "SBST"}; + "\u30bd\u30ed\u30e2\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "SBST", + "\u30BD\u30ED\u30E2\u30F3\u8AF8\u5CF6\u6642\u9593", "SBT"}; String SGT[] = new String[] {"\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u6642\u9593", "SGT", - "\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u590f\u6642\u9593", "SGST"}; + "\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u590f\u6642\u9593", "SGST", + "\u30B7\u30F3\u30AC\u30DD\u30FC\u30EB\u6642\u9593", "SGT"}; String SLST[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", - "\u30b7\u30a8\u30e9\u30ec\u30aa\u30cd\u590f\u6642\u9593", "SLST"}; + "\u30b7\u30a8\u30e9\u30ec\u30aa\u30cd\u590f\u6642\u9593", "SLST", + "\u30B7\u30A8\u30E9\u30EC\u30AA\u30CD\u6642\u9593", "SLT"}; String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST", - "\u6771\u90E8\u590F\u6642\u9593(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST"}; + "\u6771\u90E8\u590F\u6642\u9593(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST", + "\u6771\u90E8\u6A19\u6E96\u6642(\u30BF\u30B9\u30DE\u30CB\u30A2)", "ET"}; String TMT[] = new String[] {"\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "TMT", - "\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TMST"}; + "\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TMST", + "\u30C8\u30EB\u30AF\u30E1\u30CB\u30B9\u30BF\u30F3\u6642\u9593", "TMT"}; String ULAT[]= new String[] {"\u30a6\u30e9\u30fc\u30f3\u30d0\u30fc\u30c8\u30eb\u6642\u9593", "ULAT", - "\u30a6\u30e9\u30fc\u30f3\u30d0\u30fc\u30c8\u30eb\u590f\u6642\u9593", "ULAST"}; + "\u30a6\u30e9\u30fc\u30f3\u30d0\u30fc\u30c8\u30eb\u590f\u6642\u9593", "ULAST", + "\u30A6\u30E9\u30F3\u30D0\u30FC\u30C8\u30EB\u6642\u9593", "ULAT"}; String WART[] = new String[] {"\u897f\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "WART", "\u897f\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u590f\u6642\u9593", "WARST"}; String WAT[] = new String[] {"\u897f\u30a2\u30d5\u30ea\u30ab\u6642\u9593", "WAT", - "\u897f\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "WAST"}; + "\u897f\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "WAST", + "\u897F\u90E8\u30A2\u30D5\u30EA\u30AB\u6642\u9593", "WAT"}; String WET[] = new String[] {"\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "WET", - "\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "WEST"}; + "\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "WEST", + "\u897F\u90E8\u30E8\u30FC\u30ED\u30C3\u30D1\u6642\u9593", "WET"}; String WIT[] = new String[] {"\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIB", - "\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "WIST"}; + "\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "WIST", + "\u897F\u90E8\u30A4\u30F3\u30C9\u30CD\u30B7\u30A2\u6642\u9593", "WIB"}; String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST", - "\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST"}; + "\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST", + "\u897F\u90E8\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WT"}; String SAMOA[] = new String[] {"\u30b5\u30e2\u30a2\u6a19\u6e96\u6642", "SST", - "\u30b5\u30e2\u30a2\u590f\u6642\u9593", "SDT"}; + "\u30b5\u30e2\u30a2\u590f\u6642\u9593", "SDT", + "\u30B5\u30E2\u30A2\u6642\u9593", "ST"}; String WST_SAMOA[] = new String[] {"\u897f\u30b5\u30e2\u30a2\u6642\u9593", "WST", - "\u897f\u30b5\u30e2\u30a2\u590f\u6642\u9593", "WSDT"}; + "\u897f\u30b5\u30e2\u30a2\u590f\u6642\u9593", "WSDT", + "\u897F\u30B5\u30E2\u30A2\u6642\u9593", "WST"}; String ChST[] = new String[] {"\u30b0\u30a2\u30e0\u6a19\u6e96\u6642", "ChST", - "\u30b0\u30a2\u30e0\u590f\u6642\u9593", "ChDT"}; + "\u30b0\u30a2\u30e0\u590f\u6642\u9593", "ChDT", + "\u30C1\u30E3\u30E2\u30ED\u6642\u9593", "ChT"}; String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST", - "\u6771\u90E8\u590F\u6642\u9593(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST"}; + "\u6771\u90E8\u590F\u6642\u9593(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST", + "\u6771\u90E8\u6A19\u6E96\u6642(\u30D3\u30AF\u30C8\u30EA\u30A2)", "ET"}; String UTC[] = new String[] {"\u5354\u5b9a\u4e16\u754c\u6642", "UTC", - "\u5354\u5b9a\u4e16\u754c\u6642", "UTC"}; + "\u5354\u5b9a\u4e16\u754c\u6642", "UTC", + "\u5354\u5B9A\u4E16\u754C\u6642", "UTC"}; String UZT[] = new String[] {"\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "UZT", - "\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "UZST"}; + "\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "UZST", + "\u30A6\u30BA\u30D9\u30AD\u30B9\u30BF\u30F3\u6642\u9593", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"\u30d1\u30e9\u30b0\u30a2\u30a4\u6642\u9593", "PYT", - "\u30d1\u30e9\u30b0\u30a2\u30a4\u590f\u6642\u9593", "PYST"}}, + "\u30d1\u30e9\u30b0\u30a2\u30a4\u590f\u6642\u9593", "PYST", + "\u30D1\u30E9\u30B0\u30A2\u30A4\u6642\u9593", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"\u30b3\u30ed\u30f3\u30d3\u30a2\u6642\u9593", "COT", - "\u30b3\u30ed\u30f3\u30d3\u30a2\u590f\u6642\u9593", "COST"}}, + "\u30b3\u30ed\u30f3\u30d3\u30a2\u590f\u6642\u9593", "COST", + "\u30B3\u30ED\u30F3\u30D3\u30A2\u6642\u9593", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"\u30d9\u30cd\u30ba\u30a8\u30e9\u6642\u9593", "VET", - "\u30d9\u30cd\u30ba\u30a8\u30e9\u590f\u6642\u9593", "VEST"}}, + "\u30d9\u30cd\u30ba\u30a8\u30e9\u590f\u6642\u9593", "VEST", + "\u30D9\u30CD\u30BA\u30A8\u30E9\u6642\u9593", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"\u4ecf\u9818\u30ae\u30a2\u30ca\u6642\u9593", "GFT", - "\u4ecf\u9818\u30ae\u30a2\u30ca\u590f\u6642\u9593", "GFST"}}, + "\u4ecf\u9818\u30ae\u30a2\u30ca\u590f\u6642\u9593", "GFST", + "\u30D5\u30E9\u30F3\u30B9\u9818\u30AE\u30A2\u30CA\u6642\u9593", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"\u897f\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u6642\u9593", "WGT", - "\u897f\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u590f\u6642\u9593", "WGST"}}, + "\u897f\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u590f\u6642\u9593", "WGST", + "\u897F\u90E8\u30B0\u30EA\u30FC\u30F3\u30E9\u30F3\u30C9\u6642\u9593", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"\u30a8\u30af\u30a2\u30c9\u30eb\u6642\u9593", "ECT", - "\u30a8\u30af\u30a2\u30c9\u30eb\u590f\u6642\u9593", "ECST"}}, + "\u30a8\u30af\u30a2\u30c9\u30eb\u590f\u6642\u9593", "ECST", + "\u30A8\u30AF\u30A2\u30C9\u30EB\u6642\u9593", "ECT"}}, {"America/Guyana", new String[] {"\u30ac\u30a4\u30a2\u30ca\u6642\u9593", "GYT", - "\u30ac\u30a4\u30a2\u30ca\u590f\u6642\u9593", "GYST"}}, + "\u30ac\u30a4\u30a2\u30ca\u590f\u6642\u9593", "GYST", + "\u30AC\u30A4\u30A2\u30CA\u6642\u9593", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"\u30dc\u30ea\u30d3\u30a2\u6642\u9593", "BOT", - "\u30dc\u30ea\u30d3\u30a2\u590f\u6642\u9593", "BOST"}}, + "\u30dc\u30ea\u30d3\u30a2\u590f\u6642\u9593", "BOST", + "\u30DC\u30EA\u30D3\u30A2\u6642\u9593", "BOT"}}, {"America/Lima", new String[] {"\u30da\u30eb\u30fc\u6642\u9593", "PET", - "\u30da\u30eb\u30fc\u590f\u6642\u9593", "PEST"}}, + "\u30da\u30eb\u30fc\u590f\u6642\u9593", "PEST", + "\u30DA\u30EB\u30FC\u6642\u9593", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u6A19\u6E96\u6642\u9593", "MeST", - "\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u590F\u6642\u9593", "MeDT"}}, + "\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u590F\u6642\u9593", "MeDT", + "\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u6642\u9593", "MeT"}}, {"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"}}, + "\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "PMDT", + "\u30D4\u30A8\u30FC\u30EB\u30FB\u30DF\u30AF\u30ED\u30F3\u6642\u9593", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"\u30a6\u30eb\u30b0\u30a2\u30a4\u6642\u9593", "UYT", - "\u30a6\u30eb\u30b0\u30a2\u30a4\u590f\u6642\u9593", "UYST"}}, + "\u30a6\u30eb\u30b0\u30a2\u30a4\u590f\u6642\u9593", "UYST", + "\u30A6\u30EB\u30B0\u30A2\u30A4\u6642\u9593", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"\u30b9\u30ea\u30ca\u30e0\u6642\u9593", "SRT", - "\u30b9\u30ea\u30ca\u30e0\u590f\u6642\u9593", "SRST"}}, + "\u30b9\u30ea\u30ca\u30e0\u590f\u6642\u9593", "SRST", + "\u30B9\u30EA\u30CA\u30E0\u6642\u9593", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"\u30c7\u30a4\u30d3\u30b9\u6642\u9593", "DAVT", - "\u30c7\u30a4\u30d3\u30b9\u590f\u6642\u9593", "DAVST"}}, + "\u30c7\u30a4\u30d3\u30b9\u590f\u6642\u9593", "DAVST", + "\u30C7\u30FC\u30D3\u30B9\u6642\u9593", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u6642\u9593", "DDUT", - "\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u590f\u6642\u9593", "DDUST"}}, + "\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u590f\u6642\u9593", "DDUST", + "\u30C7\u30E5\u30E2\u30F3\u30FB\u30C7\u30E5\u30EB\u30D3\u30EB\u6642\u9593", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u6642\u9593", "MIST", - "\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u590F\u6642\u9593", "MIST"}}, + "\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u590F\u6642\u9593", "MIST", + "\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u6642\u9593", "MIST"}}, {"Antarctica/Mawson", new String[] {"\u30e2\u30fc\u30bd\u30f3\u6642\u9593", "MAWT", - "\u30e2\u30fc\u30bd\u30f3\u590f\u6642\u9593", "MAWST"}}, + "\u30e2\u30fc\u30bd\u30f3\u590f\u6642\u9593", "MAWST", + "\u30E2\u30FC\u30BD\u30F3\u6642\u9593", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"\u30ed\u30bc\u30e9\u6642\u9593", "ROTT", - "\u30ed\u30bc\u30e9\u590f\u6642\u9593", "ROTST"}}, + "\u30ed\u30bc\u30e9\u590f\u6642\u9593", "ROTST", + "\u30ED\u30BC\u30E9\u6642\u9593", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"\u662d\u548c\u57fa\u5730\u6642\u9593", "SYOT", - "\u662d\u548c\u57fa\u5730\u590f\u6642\u9593", "SYOST"}}, + "\u662d\u548c\u57fa\u5730\u590f\u6642\u9593", "SYOST", + "\u662D\u548C\u57FA\u5730\u6642\u9593", "SYOT"}}, {"Antarctica/Vostok", new String[] {"\u30dc\u30b9\u30c8\u30fc\u30af\u57fa\u5730\u6642\u9593", "VOST", - "\u30dc\u30b9\u30c8\u30fc\u30af\u57fa\u5730\u590f\u6642\u9593", "VOSST"}}, + "\u30dc\u30b9\u30c8\u30fc\u30af\u57fa\u5730\u590f\u6642\u9593", "VOSST", + "\u30DC\u30B9\u30C8\u30FC\u30AF\u6642\u9593", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"\u30a2\u30eb\u30de\u30a2\u30bf\u6642\u9593", "ALMT", - "\u30a2\u30eb\u30de\u30a2\u30bf\u590f\u6642\u9593", "ALMST"}}, + "\u30a2\u30eb\u30de\u30a2\u30bf\u590f\u6642\u9593", "ALMST", + "\u30A2\u30EB\u30DE\u30A2\u30BF\u6642\u9593", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"\u30a2\u30ca\u30c9\u30a5\u30a4\u30ea\u6642\u9593", "ANAT", - "\u30a2\u30ca\u30c9\u30a5\u30a4\u30ea\u590f\u6642\u9593", "ANAST"}}, + "\u30a2\u30ca\u30c9\u30a5\u30a4\u30ea\u590f\u6642\u9593", "ANAST", + "\u30A2\u30CA\u30C7\u30A3\u30EA\u6642\u9593", "ANAT"}}, {"Asia/Aqtau", new String[] {"\u30a2\u30af\u30bf\u30a6\u6642\u9593", "AQTT", - "\u30a2\u30af\u30bf\u30a6\u590f\u6642\u9593", "AQTST"}}, + "\u30a2\u30af\u30bf\u30a6\u590f\u6642\u9593", "AQTST", + "\u30A2\u30AF\u30BF\u30A6\u6642\u9593", "AQTT"}}, {"Asia/Aqtobe", new String[] {"\u30a2\u30af\u30c8\u30d9\u6642\u9593", "AQTT", - "\u30a2\u30af\u30c8\u30d9\u590f\u6642\u9593", "AQTST"}}, + "\u30a2\u30af\u30c8\u30d9\u590f\u6642\u9593", "AQTST", + "\u30A2\u30AF\u30C8\u30D9\u6642\u9593", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"\u30a2\u30bc\u30eb\u30d0\u30a4\u30b8\u30e3\u30f3\u6642\u9593", "AZT", - "\u30a2\u30bc\u30eb\u30d0\u30a4\u30b8\u30e3\u30f3\u590f\u6642\u9593", "AZST"}}, + "\u30a2\u30bc\u30eb\u30d0\u30a4\u30b8\u30e3\u30f3\u590f\u6642\u9593", "AZST", + "\u30A2\u30BC\u30EB\u30D0\u30A4\u30B8\u30E3\u30F3\u6642\u9593", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"\u30ad\u30eb\u30ae\u30b9\u30bf\u30f3\u6642\u9593", "KGT", - "\u30ad\u30eb\u30ae\u30b9\u30bf\u30f3\u590f\u6642\u9593", "KGST"}}, + "\u30ad\u30eb\u30ae\u30b9\u30bf\u30f3\u590f\u6642\u9593", "KGST", + "\u30AD\u30EB\u30AE\u30B9\u6642\u9593", "KGT"}}, {"Asia/Brunei", new String[] {"\u30d6\u30eb\u30cd\u30a4\u6642\u9593", "BNT", - "\u30d6\u30eb\u30cd\u30a4\u590f\u6642\u9593", "BNST"}}, + "\u30d6\u30eb\u30cd\u30a4\u590f\u6642\u9593", "BNST", + "\u30D6\u30EB\u30CD\u30A4\u6642\u9593", "BNT"}}, {"Asia/Calcutta", IST}, {"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\u590f\u6642\u9593", "CHOST", + "\u30C1\u30E7\u30A4\u30D0\u30EB\u30B5\u30F3\u6642\u9593", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"\u6771\u30c6\u30a3\u30e2\u30fc\u30eb\u6642\u9593", "TLT", - "\u6771\u30c6\u30a3\u30e2\u30fc\u30eb\u590f\u6642\u9593", "TLST"}}, + "\u6771\u30c6\u30a3\u30e2\u30fc\u30eb\u590f\u6642\u9593", "TLST", + "\u6771\u30C6\u30A3\u30E2\u30FC\u30EB\u6642\u9593", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"\u30bf\u30b8\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "TJT", - "\u30bf\u30b8\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TJST"}}, + "\u30bf\u30b8\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TJST", + "\u30BF\u30B8\u30AD\u30B9\u30BF\u30F3\u6642\u9593", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"\u30db\u30d6\u30c9\u6642\u9593", "HOVT", - "\u30db\u30d6\u30c9\u590f\u6642\u9593", "HOVST"}}, + "\u30db\u30d6\u30c9\u590f\u6642\u9593", "HOVST", + "\u30DB\u30D6\u30C9\u6642\u9593", "HOVT"}}, {"Asia/Irkutsk", new String[] {"\u30a4\u30eb\u30af\u30fc\u30c4\u30af\u6642\u9593", "IRKT", - "\u30a4\u30eb\u30af\u30fc\u30c4\u30af\u590f\u6642\u9593", "IRKST"}}, + "\u30a4\u30eb\u30af\u30fc\u30c4\u30af\u590f\u6642\u9593", "IRKST", + "\u30A4\u30EB\u30AF\u30FC\u30C4\u30AF\u6642\u9593", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIT", - "\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "EIST" }}, + "\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "EIST" , + "\u6771\u90E8\u30A4\u30F3\u30C9\u30CD\u30B7\u30A2\u6642\u9593", "WIT"}}, {"Asia/Kabul", new String[] {"\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "AFT", - "\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "AFST"}}, + "\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "AFST", + "\u30A2\u30D5\u30AC\u30CB\u30B9\u30BF\u30F3\u6642\u9593", "AFT"}}, {"Asia/Kamchatka", new String[] {"\u30da\u30c8\u30ed\u30d1\u30d6\u30ed\u30d5\u30b9\u30af\u30ab\u30e0\u30c1\u30e3\u30c4\u30ad\u30fc\u6642\u9593", "PETT", - "\u30da\u30c8\u30ed\u30d1\u30d6\u30ed\u30d5\u30b9\u30af\u30ab\u30e0\u30c1\u30e3\u30c4\u30ad\u30fc\u590f\u6642\u9593", "PETST"}}, + "\u30da\u30c8\u30ed\u30d1\u30d6\u30ed\u30d5\u30b9\u30af\u30ab\u30e0\u30c1\u30e3\u30c4\u30ad\u30fc\u590f\u6642\u9593", "PETST", + "\u30DA\u30C8\u30ED\u30D1\u30D6\u30ED\u30D5\u30B9\u30AF\u30FB\u30AB\u30E0\u30C1\u30E3\u30C4\u30AD\u30FC\u6642\u9593", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"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\u590F\u6642\u9593", "YAKST", + "\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u6642\u9593", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u6642\u9593", "KRAT", - "\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u590f\u6642\u9593", "KRAST"}}, + "\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u590f\u6642\u9593", "KRAST", + "\u30AF\u30E9\u30B9\u30CE\u30E4\u30EB\u30B9\u30AF\u6642\u9593", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"\u30de\u30ac\u30c0\u30f3\u6642\u9593", "MAGT", - "\u30de\u30ac\u30c0\u30f3\u590f\u6642\u9593", "MAGST"}}, + "\u30de\u30ac\u30c0\u30f3\u590f\u6642\u9593", "MAGST", + "\u30DE\u30AC\u30C0\u30F3\u6642\u9593", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"\u30d5\u30a3\u30ea\u30d4\u30f3\u6642\u9593", "PHT", - "\u30d5\u30a3\u30ea\u30d4\u30f3\u590f\u6642\u9593", "PHST"}}, + "\u30d5\u30a3\u30ea\u30d4\u30f3\u590f\u6642\u9593", "PHST", + "\u30D5\u30A3\u30EA\u30D4\u30F3\u6642\u9593", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"\u30aa\u30e9\u30eb\u6642\u9593", "ORAT", - "\u30aa\u30e9\u30eb\u590f\u6642\u9593", "ORAST"}}, + "\u30aa\u30e9\u30eb\u590f\u6642\u9593", "ORAST", + "\u30AA\u30E9\u30EB\u6642\u9593", "ORAT"}}, {"Asia/Omsk", new String[] {"\u30aa\u30e0\u30b9\u30af\u6642\u9593", "OMST", - "\u30aa\u30e0\u30b9\u30af\u590f\u6642\u9593", "OMSST"}}, + "\u30aa\u30e0\u30b9\u30af\u590f\u6642\u9593", "OMSST", + "\u30AA\u30E0\u30B9\u30AF\u6642\u9593", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"\u30ad\u30b8\u30eb\u30aa\u30eb\u30c0\u6642\u9593", "QYZT", - "\u30ad\u30b8\u30eb\u30aa\u30eb\u30c0\u590f\u6642\u9593", "QYZST"}}, + "\u30ad\u30b8\u30eb\u30aa\u30eb\u30c0\u590f\u6642\u9593", "QYZST", + "\u30AF\u30BA\u30ED\u30EB\u30C0\u6642\u9593", "QYZT"}}, {"Asia/Rangoon", new String[] {"\u30df\u30e3\u30f3\u30de\u30fc\u6642\u9593", "MMT", - "\u30df\u30e3\u30f3\u30de\u30fc\u590f\u6642\u9593", "MMST"}}, + "\u30df\u30e3\u30f3\u30de\u30fc\u590f\u6642\u9593", "MMST", + "\u30DF\u30E3\u30F3\u30DE\u30FC\u6642\u9593", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"\u6a3a\u592a\u6642\u9593", "SAKT", - "\u6a3a\u592a\u590f\u6642\u9593", "SAKST"}}, + "\u6a3a\u592a\u590f\u6642\u9593", "SAKST", + "\u30B5\u30CF\u30EA\u30F3\u6642\u9593", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"\u30b0\u30eb\u30b8\u30a2\u6642\u9593", "GET", - "\u30b0\u30eb\u30b8\u30a2\u590f\u6642\u9593", "GEST"}}, + "\u30b0\u30eb\u30b8\u30a2\u590f\u6642\u9593", "GEST", + "\u30B0\u30EB\u30B8\u30A2\u6642\u9593", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"\u30A6\u30B9\u30C1\u30CD\u30E9\u6642\u9593", "VLAT", - "\u30A6\u30B9\u30C1\u30CD\u30E9\u590F\u6642\u9593", "VLAST"}}, + "\u30A6\u30B9\u30C1\u30CD\u30E9\u590F\u6642\u9593", "VLAST", + "\u30A6\u30B9\u30C1\u30CD\u30E9\u6642\u9593", "VLAT"}}, {"Asia/Vientiane", ICT}, {"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\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\u590f\u6642\u9593", "YAKST", + "\u30E4\u30AF\u30FC\u30C4\u30AF\u6642\u9593", "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\u30b0\u590f\u6642\u9593", "YEKST", + "\u30A8\u30AB\u30C6\u30EA\u30F3\u30D6\u30EB\u30AF\u6642\u9593", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"\u30a2\u30be\u30ec\u30b9\u6642\u9593", "AZOT", - "\u30a2\u30be\u30ec\u30b9\u590f\u6642\u9593", "AZOST"}}, + "\u30a2\u30be\u30ec\u30b9\u590f\u6642\u9593", "AZOST", + "\u30A2\u30BE\u30EC\u30B9\u6642\u9593", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"\u30ab\u30fc\u30dc\u30d9\u30eb\u30c7\u6642\u9593", "CVT", - "\u30ab\u30fc\u30dc\u30d9\u30eb\u30c7\u590f\u6642\u9593", "CVST"}}, + "\u30ab\u30fc\u30dc\u30d9\u30eb\u30c7\u590f\u6642\u9593", "CVST", + "\u30AB\u30FC\u30DC\u30D9\u30EB\u30C7\u6642\u9593", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"\u5357\u30b8\u30e7\u30fc\u30b8\u30a2\u5cf6\u6a19\u6e96\u6642", "GST", - "\u5357\u30b8\u30e7\u30fc\u30b8\u30a2\u5cf6\u590f\u6642\u9593", "GDT"}}, + "\u5357\u30b8\u30e7\u30fc\u30b8\u30a2\u5cf6\u590f\u6642\u9593", "GDT", + "\u5357\u30B8\u30E7\u30FC\u30B8\u30A2\u6642\u9593", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"\u30d5\u30a9\u30fc\u30af\u30e9\u30f3\u30c9\u8af8\u5cf6\u6642\u9593", "FKT", - "\u30d5\u30a9\u30fc\u30af\u30e9\u30f3\u30c9\u8af8\u5cf6\u590f\u6642\u9593", "FKST"}}, + "\u30d5\u30a9\u30fc\u30af\u30e9\u30f3\u30c9\u8af8\u5cf6\u590f\u6642\u9593", "FKST", + "\u30D5\u30A9\u30FC\u30AF\u30E9\u30F3\u30C9\u8AF8\u5CF6\u6642\u9593", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST", - "\u4E2D\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST"}}, + "\u4E2D\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST", + "\u4E2D\u897F\u90E8\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"\u30b5\u30de\u30e9\u6642\u9593", "SAMT", - "\u30b5\u30de\u30e9\u590f\u6642\u9593", "SAMST"}}, + "\u30b5\u30de\u30e9\u590f\u6642\u9593", "SAMST", + "\u30B5\u30DE\u30E9\u6642\u9593", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"\u30dc\u30eb\u30b4\u30b0\u30e9\u30fc\u30c9\u6642\u9593", "VOLT", - "\u30dc\u30eb\u30b4\u30b0\u30e9\u30fc\u30c9\u590f\u6642\u9593", "VOLST"}}, + "\u30dc\u30eb\u30b4\u30b0\u30e9\u30fc\u30c9\u590f\u6642\u9593", "VOLST", + "\u30DC\u30EB\u30B4\u30B0\u30E9\u30FC\u30C9\u6642\u9593", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"\u30a4\u30f3\u30c9\u6d0b\u5730\u57df\u6642\u9593", "IOT", - "\u30a4\u30f3\u30c9\u6d0b\u5730\u57df\u590f\u6642\u9593", "IOST"}}, + "\u30a4\u30f3\u30c9\u6d0b\u5730\u57df\u590f\u6642\u9593", "IOST", + "\u30A4\u30F3\u30C9\u6D0B\u5730\u57DF\u6642\u9593", "IOT"}}, {"Indian/Christmas", new String[] {"\u30af\u30ea\u30b9\u30de\u30b9\u8af8\u5cf6\u6642\u9593", "CXT", - "\u30af\u30ea\u30b9\u30de\u30b9\u8af8\u5cf6\u590f\u6642\u9593", "CXST"}}, + "\u30af\u30ea\u30b9\u30de\u30b9\u8af8\u5cf6\u590f\u6642\u9593", "CXST", + "\u30AF\u30EA\u30B9\u30DE\u30B9\u5CF6\u6642\u9593", "CIT"}}, {"Indian/Cocos", new String[] {"\u30b3\u30b3\u30b9\u8af8\u5cf6\u6642\u9593", "CCT", - "\u30b3\u30b3\u30b9\u8af8\u5cf6\u590f\u6642\u9593", "CCST"}}, + "\u30b3\u30b3\u30b9\u8af8\u5cf6\u590f\u6642\u9593", "CCST", + "\u30B3\u30B3\u30B9\u8AF8\u5CF6\u6642\u9593", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"\u4ecf\u5357\u65b9\u9818\u304a\u3088\u3073\u5357\u6975\u6642\u9593", "TFT", - "\u4ecf\u5357\u65b9\u9818\u304a\u3088\u3073\u5357\u6975\u590f\u6642\u9593", "TFST"}}, + "\u4ecf\u5357\u65b9\u9818\u304a\u3088\u3073\u5357\u6975\u590f\u6642\u9593", "TFST", + "\u30D5\u30E9\u30F3\u30B9\u9818\u5357\u65B9\u304A\u3088\u3073\u5357\u6975\u5927\u9678\u6642\u9593", "TFT"}}, {"Indian/Mahe", new String[] {"\u30bb\u30a4\u30b7\u30a7\u30eb\u6642\u9593", "SCT", - "\u30bb\u30a4\u30b7\u30a7\u30eb\u590f\u6642\u9593", "SCST"}}, + "\u30bb\u30a4\u30b7\u30a7\u30eb\u590f\u6642\u9593", "SCST", + "\u30BB\u30FC\u30B7\u30A7\u30EB\u6642\u9593", "SCT"}}, {"Indian/Maldives", new String[] {"\u30e2\u30eb\u30b8\u30d6\u6642\u9593", "MVT", - "\u30e2\u30eb\u30b8\u30d6\u590f\u6642\u9593", "MVST"}}, + "\u30e2\u30eb\u30b8\u30d6\u590f\u6642\u9593", "MVST", + "\u30E2\u30EB\u30B8\u30D6\u6642\u9593", "MVT"}}, {"Indian/Mauritius", new String[] {"\u30e2\u30fc\u30ea\u30b7\u30e3\u30b9\u6642\u9593", "MUT", - "\u30e2\u30fc\u30ea\u30b7\u30e3\u30b9\u590f\u6642\u9593", "MUST"}}, + "\u30e2\u30fc\u30ea\u30b7\u30e3\u30b9\u590f\u6642\u9593", "MUST", + "\u30E2\u30FC\u30EA\u30B7\u30E3\u30B9\u6642\u9593", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"\u30ec\u30e6\u30cb\u30aa\u30f3\u6642\u9593", "RET", - "\u30ec\u30e6\u30cb\u30aa\u30f3\u590f\u6642\u9593", "REST"}}, + "\u30ec\u30e6\u30cb\u30aa\u30f3\u590f\u6642\u9593", "REST", + "\u30EC\u30E6\u30CB\u30AA\u30F3\u6642\u9593", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "MET", - "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "MEST"}}, + "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"\u30d0\u30cc\u30a2\u30c4\u6642\u9593", "VUT", - "\u30d0\u30cc\u30a2\u30c4\u590f\u6642\u9593", "VUST"}}, + "\u30d0\u30cc\u30a2\u30c4\u590f\u6642\u9593", "VUST", + "\u30D0\u30CC\u30A2\u30C4\u6642\u9593", "VUT"}}, {"Pacific/Enderbury", new String[] {"\u30d5\u30a7\u30cb\u30c3\u30af\u30b9\u8af8\u5cf6\u6642\u9593", "PHOT", - "\u30d5\u30a7\u30cb\u30c3\u30af\u30b9\u8af8\u5cf6\u590f\u6642\u9593", "PHOST"}}, + "\u30d5\u30a7\u30cb\u30c3\u30af\u30b9\u8af8\u5cf6\u590f\u6642\u9593", "PHOST", + "\u30D5\u30A7\u30CB\u30C3\u30AF\u30B9\u8AF8\u5CF6\u6642\u9593", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"\u30c8\u30b1\u30e9\u30a6\u8af8\u5cf6\u6642\u9593", "TKT", - "\u30c8\u30b1\u30e9\u30a6\u8af8\u5cf6\u590f\u6642\u9593", "TKST"}}, + "\u30c8\u30b1\u30e9\u30a6\u8af8\u5cf6\u590f\u6642\u9593", "TKST", + "\u30C8\u30B1\u30E9\u30A6\u6642\u9593", "TKT"}}, {"Pacific/Fiji", new String[] {"\u30d5\u30a3\u30b8\u30fc\u6642\u9593", "FJT", - "\u30d5\u30a3\u30b8\u30fc\u590f\u6642\u9593", "FJST"}}, + "\u30d5\u30a3\u30b8\u30fc\u590f\u6642\u9593", "FJST", + "\u30D5\u30A3\u30B8\u30FC\u6642\u9593", "FJT"}}, {"Pacific/Funafuti", new String[] {"\u30c4\u30d0\u30eb\u6642\u9593", "TVT", - "\u30c4\u30d0\u30eb\u590f\u6642\u9593", "TVST"}}, + "\u30c4\u30d0\u30eb\u590f\u6642\u9593", "TVST", + "\u30C4\u30D0\u30EB\u6642\u9593", "TVT"}}, {"Pacific/Galapagos", new String[] {"\u30ac\u30e9\u30d1\u30b4\u30b9\u6642\u9593", "GALT", - "\u30ac\u30e9\u30d1\u30b4\u30b9\u590f\u6642\u9593", "GALST"}}, + "\u30ac\u30e9\u30d1\u30b4\u30b9\u590f\u6642\u9593", "GALST", + "\u30AC\u30E9\u30D1\u30B4\u30B9\u6642\u9593", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"\u30e9\u30a4\u30f3\u8af8\u5cf6\u6642\u9593", "LINT", - "\u30e9\u30a4\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "LINST"}}, + "\u30e9\u30a4\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "LINST", + "\u30E9\u30A4\u30F3\u8AF8\u5CF6\u6642\u9593", "LINT"}}, {"Pacific/Kosrae", new String[] {"\u30b3\u30b9\u30e9\u30a8\u6642\u9593", "KOST", - "\u30b3\u30b9\u30e9\u30a8\u590f\u6642\u9593", "KOSST"}}, + "\u30b3\u30b9\u30e9\u30a8\u590f\u6642\u9593", "KOSST", + "\u30B3\u30B9\u30E9\u30A8\u6642\u9593", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"\u30de\u30eb\u30b1\u30b5\u30b9\u6642\u9593", "MART", - "\u30de\u30eb\u30b1\u30b5\u30b9\u590f\u6642\u9593", "MARST"}}, + "\u30de\u30eb\u30b1\u30b5\u30b9\u590f\u6642\u9593", "MARST", + "\u30DE\u30EB\u30AD\u30FC\u30BA\u6642\u9593", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"\u30ca\u30a6\u30eb\u6642\u9593", "NRT", - "\u30ca\u30a6\u30eb\u590f\u6642\u9593", "NRST"}}, + "\u30ca\u30a6\u30eb\u590f\u6642\u9593", "NRST", + "\u30CA\u30A6\u30EB\u6642\u9593", "NRT"}}, {"Pacific/Niue", new String[] {"\u30cb\u30a6\u30a8\u5cf6\u6642\u9593", "NUT", - "\u30cb\u30a6\u30a8\u5cf6\u590f\u6642\u9593", "NUST"}}, + "\u30cb\u30a6\u30a8\u5cf6\u590f\u6642\u9593", "NUST", + "\u30CB\u30A6\u30A8\u6642\u9593", "NUT"}}, {"Pacific/Norfolk", new String[] {"\u30ce\u30fc\u30d5\u30a9\u30fc\u30af\u6642\u9593", "NFT", - "\u30ce\u30fc\u30d5\u30a9\u30fc\u30af\u590f\u6642\u9593", "NFST"}}, + "\u30ce\u30fc\u30d5\u30a9\u30fc\u30af\u590f\u6642\u9593", "NFST", + "\u30CE\u30FC\u30D5\u30A9\u30FC\u30AF\u6642\u9593", "NFT"}}, {"Pacific/Noumea", new String[] {"\u30cb\u30e5\u30fc\u30ab\u30ec\u30c9\u30cb\u30a2\u6642\u9593", "NCT", - "\u30cb\u30e5\u30fc\u30ab\u30ec\u30c9\u30cb\u30a2\u590f\u6642\u9593", "NCST"}}, + "\u30cb\u30e5\u30fc\u30ab\u30ec\u30c9\u30cb\u30a2\u590f\u6642\u9593", "NCST", + "\u30CB\u30E5\u30FC\u30AB\u30EC\u30C9\u30CB\u30A2\u6642\u9593", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"\u30d1\u30e9\u30aa\u6642\u9593", "PWT", - "\u30d1\u30e9\u30aa\u590f\u6642\u9593", "PWST"}}, + "\u30d1\u30e9\u30aa\u590f\u6642\u9593", "PWST", + "\u30D1\u30E9\u30AA\u6642\u9593", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"\u30d1\u30d7\u30a2\u30cb\u30e5\u30fc\u30ae\u30cb\u30a2\u6642\u9593", "PGT", - "\u30d1\u30d7\u30a2\u30cb\u30e5\u30fc\u30ae\u30cb\u30a2\u590f\u6642\u9593", "PGST"}}, + "\u30d1\u30d7\u30a2\u30cb\u30e5\u30fc\u30ae\u30cb\u30a2\u590f\u6642\u9593", "PGST", + "\u30D1\u30D7\u30A2\u30CB\u30E5\u30FC\u30AE\u30CB\u30A2\u6642\u9593", "PGT"}}, {"Pacific/Rarotonga", new String[] {"\u30af\u30c3\u30af\u8af8\u5cf6\u6642\u9593", "CKT", - "\u30af\u30c3\u30af\u8af8\u5cf6\u590f\u6642\u9593", "CKHST"}}, + "\u30af\u30c3\u30af\u8af8\u5cf6\u590f\u6642\u9593", "CKHST", + "\u30AF\u30C3\u30AF\u8AF8\u5CF6\u6642\u9593", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"\u30bf\u30d2\u30c1\u6642\u9593", "TAHT", - "\u30bf\u30d2\u30c1\u590f\u6642\u9593", "TAHST"}}, + "\u30bf\u30d2\u30c1\u590f\u6642\u9593", "TAHST", + "\u30BF\u30D2\u30C1\u6642\u9593", "TAHT"}}, {"Pacific/Tarawa", new String[] {"\u30ae\u30eb\u30d0\u30fc\u30c8\u8af8\u5cf6\u6642\u9593", "GILT", - "\u30ae\u30eb\u30d0\u30fc\u30c8\u8af8\u5cf6\u590f\u6642\u9593", "GILST"}}, + "\u30ae\u30eb\u30d0\u30fc\u30c8\u8af8\u5cf6\u590f\u6642\u9593", "GILST", + "\u30AE\u30EB\u30D0\u30FC\u30C8\u8AF8\u5CF6\u6642\u9593", "GILT"}}, {"Pacific/Tongatapu", new String[] {"\u30c8\u30f3\u30ac\u6642\u9593", "TOT", - "\u30c8\u30f3\u30ac\u590f\u6642\u9593", "TOST"}}, + "\u30c8\u30f3\u30ac\u590f\u6642\u9593", "TOST", + "\u30C8\u30F3\u30AC\u6642\u9593", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"\u30a6\u30a7\u30fc\u30af\u6642\u9593", "WAKT", - "\u30a6\u30a7\u30fc\u30af\u590f\u6642\u9593", "WAKST"}}, + "\u30a6\u30a7\u30fc\u30af\u590f\u6642\u9593", "WAKST", + "\u30A6\u30A7\u30FC\u30AF\u6642\u9593", "WAKT"}}, {"Pacific/Wallis", new String[] {"\u30ef\u30ea\u30b9\u53ca\u3073\u30d5\u30c4\u30ca\u6642\u9593", "WFT", - "\u30ef\u30ea\u30b9\u53ca\u3073\u30d5\u30c4\u30ca\u590f\u6642\u9593", "WFST"}}, + "\u30ef\u30ea\u30b9\u53ca\u3073\u30d5\u30c4\u30ca\u590f\u6642\u9593", "WFST", + "\u30A6\u30A9\u30EA\u30B9\u30FB\u30D5\u30C4\u30CA\u6642\u9593", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java b/jdk/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java index 12e8b832390..b32bf1334ca 100644 --- a/jdk/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java +++ b/jdk/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"\uc5d0\uc774\ucee4 \uc2dc\uac04", "ACT", - "\uc5d0\uc774\ucee4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ACST"}; + "\uc5d0\uc774\ucee4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ACST", + "\uc5d0\uc774\ucee4 \uc2dc\uac04", "ACT"}; String ADELAIDE[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST", - "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST"}; + "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST", + "\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CT"}; String AGT[] = new String[] {"\uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "ART", - "\uc544\ub974\ud5e8\ud2f0\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ARST"}; + "\uc544\ub974\ud5e8\ud2f0\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ARST", + "\uC544\uB974\uD5E8\uD2F0\uB098 \uD45C\uC900\uC2DC", "ART"}; String AKST[] = new String[] {"\uc54c\ub798\uc2a4\uce74 \ud45c\uc900\uc2dc", "AKST", - "\uc54c\ub798\uc2a4\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AKDT"}; + "\uc54c\ub798\uc2a4\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AKDT", + "\uC54C\uB798\uC2A4\uCE74 \uD45C\uC900\uC2DC", "AKT"}; String AMT[] = new String[] {"\uc544\ub9c8\uc874 \uc2dc\uac04", "AMT", - "\uc544\ub9c8\uc874 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AMST"}; + "\uc544\ub9c8\uc874 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AMST", + "\uC544\uB9C8\uC874 \uD45C\uC900\uC2DC", "AMT"}; String ARAST[] = new String[] {"\uc544\ub78d \ud45c\uc900\uc2dc", "AST", - "\uc544\ub78d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ADT"}; + "\uc544\ub78d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ADT", + "\uC544\uB77C\uBE44\uC544 \uD45C\uC900\uC2DC", "AT"}; String ARMT[] = new String[] {"\uc544\ub974\uba54\ub2c8\uc544 \uc2dc\uac04", "AMT", - "\uc544\ub974\uba54\ub2c8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AMST"}; + "\uc544\ub974\uba54\ub2c8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AMST", + "\uC544\uB974\uBA54\uB2C8\uC544 \uD45C\uC900\uC2DC", "AMT"}; String AST[] = new String[] {"\ub300\uc11c\uc591 \ud45c\uc900\uc2dc", "AST", - "\ub300\uc11c\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ADT"}; + "\ub300\uc11c\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ADT", + "\uB300\uC11C\uC591 \uD45C\uC900\uC2DC", "AT"}; String BDT[] = new String[] {"\ubc29\uae00\ub77c\ub370\uc2dc \uc2dc\uac04", "BDT", - "\ubc29\uae00\ub77c\ub370\uc2dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BDST"}; + "\ubc29\uae00\ub77c\ub370\uc2dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BDST", + "\uBC29\uAE00\uB77C\uB370\uC2DC \uD45C\uC900\uC2DC", "BDT"}; String BRISBANE[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD038\uC990\uB79C\uB4DC)", "EST", - "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD038\uC990\uB79C\uB4DC)", "EST"}; + "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD038\uC990\uB79C\uB4DC)", "EST", + "\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD038\uC990\uB79C\uB4DC)", "ET"}; String BROKEN_HILL[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST", - "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST"}; + "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST", + "\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CT"}; String BRT[] = new String[] {"\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc2dc\uac04", "BRT", - "\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BRST"}; + "\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BRST", + "\uBE0C\uB77C\uC9C8\uB9AC\uC544 \uD45C\uC900\uC2DC", "BRT"}; String BTT[] = new String[] {"\ubd80\ud0c4 \uc2dc\uac04", "BTT", - "\ubd80\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BTST"}; + "\ubd80\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BTST", + "\uBD80\uD0C4 \uD45C\uC900\uC2DC", "BTT"}; String CAT[] = new String[] {"\uc911\uc559 \uc544\ud504\ub9ac\uce74 \uc2dc\uac04", "CAT", - "\uc911\uc559 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CAST"}; + "\uc911\uc559 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CAST", + "\uC911\uC559 \uC544\uD504\uB9AC\uCE74 \uD45C\uC900\uC2DC", "CAT"}; String CET[] = new String[] {"\uc911\uc559 \uc720\ub7fd \uc2dc\uac04", "CET", - "\uc911\uc559 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CEST"}; + "\uc911\uc559 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CEST", + "\uC911\uC559 \uC720\uB7FD \uD45C\uC900\uC2DC", "CET"}; String CHAST[] = new String[] {"Chatham \ud45c\uc900\uc2dc", "CHAST", - "Chatham \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHADT"}; + "Chatham \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHADT", + "\uCC44\uD140 \uD45C\uC900\uC2DC", "CHAT"}; String CHUT[] = new String[] {"\uCD94\uD06C \uD45C\uC900\uC2DC", "CHUT", - "\uCD94\uD06C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "CHUST"}; + "\uCD94\uD06C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "CHUST", + "\uCD94\uD06C \uD45C\uC900\uC2DC", "CHUT"}; String CIT[] = new String[] {"\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WITA", - "\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CIST"}; + "\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CIST", + "\uC911\uBD80 \uC778\uB3C4\uB124\uC2DC\uC544 \uD45C\uC900\uC2DC", "WITA"}; String CLT[] = new String[] {"\uce60\ub808 \uc2dc\uac04", "CLT", - "\uce60\ub808 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CLST"}; + "\uce60\ub808 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CLST", + "\uCE60\uB808 \uD45C\uC900\uC2DC", "CLT"}; String CST[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc", "CST", - "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"}; + "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT", + "\uC911\uBD80 \uD45C\uC900\uC2DC", "CT"}; String CTT[] = new String[] {"\uc911\uad6d \ud45c\uc900\uc2dc", "CST", - "\uc911\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"}; + "\uc911\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT", + "\uC911\uAD6D \uD45C\uC900\uC2DC", "CT"}; String CUBA[] = new String[] {"\ucfe0\ubc14 \ud45c\uc900\uc2dc", "CST", - "\ucfe0\ubc14 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"}; + "\ucfe0\ubc14 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT", + "\uCFE0\uBC14 \uD45C\uC900\uC2DC", "CT"}; String DARWIN[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uBD81\uBD80 \uC9C0\uC5ED)", "CST", - "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBD81\uBD80 \uC9C0\uC5ED)", "CST"}; + "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBD81\uBD80 \uC9C0\uC5ED)", "CST", + "\uC911\uBD80 \uD45C\uC900\uC2DC(\uBD81\uBD80 \uC9C0\uC5ED)", "CT"}; String DUBLIN[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", - "\uc544\uc77c\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IST"}; + "\uc544\uc77c\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IST", + "\uC544\uC77C\uB79C\uB4DC \uD45C\uC900\uC2DC", "IT"}; String EAT[] = new String[] {"\ub3d9\ubd80 \uc544\ud504\ub9ac\uce74 \uc2dc\uac04", "EAT", - "\ub3d9\ubd80 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EAST"}; + "\ub3d9\ubd80 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EAST", + "\uB3D9\uBD80 \uC544\uD504\uB9AC\uCE74 \uD45C\uC900\uC2DC", "EAT"}; String EASTER[] = new String[] {"Easter Is. \uc2dc\uac04", "EAST", - "Easter Is. \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EASST"}; + "Easter Is. \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EASST", + "\uC774\uC2A4\uD130 \uC12C \uD45C\uC900\uC2DC", "EAST"}; String EET[] = new String[] {"\ub3d9\uc720\ub7fd \uc2dc\uac04", "EET", - "\ub3d9\uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EEST"}; + "\ub3d9\uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EEST", + "\ub3d9\ubd80 \uc720\ub7fd \ud45c\uc900\uc2dc", "EET"}; String EGT[] = new String[] {"\ub3d9\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc2dc\uac04", "EGT", - "\ub3d9\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EGST"}; + "\ub3d9\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EGST", + "\uB3D9\uBD80 \uADF8\uB9B0\uB780\uB4DC \uD45C\uC900\uC2DC", "EGT"}; String EST[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc", "EST", - "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EDT"}; + "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EDT", + "\uB3D9\uBD80 \uD45C\uC900\uC2DC", "ET"}; String EST_NSW[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST", - "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST"}; + "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST", + "\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "ET"}; String FET[] = new String[] {"\uADF9\uB3D9 \uC720\uB7FD \uD45C\uC900\uC2DC", "FET", - "\uADF9\uB3D9 \uC720\uB7FD \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "FEST"}; + "\uADF9\uB3D9 \uC720\uB7FD \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "FEST", + "\uADF9\uB3D9 \uC720\uB7FD \uD45C\uC900\uC2DC", "FET"}; String GHMT[] = new String[] {"\uac00\ub098 \ud45c\uc900\uc2dc", "GMT", - "\uac00\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GHST"}; + "\uac00\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GHST", + "\uAC00\uB098 \uD45C\uC900\uC2DC", "GMT"}; String GAMBIER[] = new String[] {"\uac10\ube44\uc544 \uc2dc\uac04", "GAMT", - "\uac10\ube44\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GAMST"}; + "\uac10\ube44\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GAMST", + "\uC7A0\uBE44\uC544 \uD45C\uC900\uC2DC", "GAMT"}; String GMT[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", - "\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT"}; + "\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", + "\uADF8\uB9AC\uB2C8\uCE58 \uD45C\uC900\uC2DC", "GMT"}; String GMTBST[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", - "\uc601\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BST"}; + "\uc601\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BST", + "\uC601\uAD6D \uD45C\uC900\uC2DC", "BT"}; String GST[] = new String[] {"\uac78\ud504\ub9cc \ud45c\uc900\uc2dc", "GST", - "\uac78\ud504\ub9cc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GDT"}; + "\uac78\ud504\ub9cc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GDT", + "\uAC78\uD504\uB9CC \uD45C\uC900\uC2DC", "GT"}; String HAST[] = new String[] {"\ud558\uc640\uc774 \uc54c\ub958\uc0e8 \ud45c\uc900\uc2dc", "HAST", - "\ud558\uc640\uc774 \uc54c\ub958\uc0e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HADT"}; + "\ud558\uc640\uc774 \uc54c\ub958\uc0e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HADT", + "\uD558\uC640\uC774-\uC54C\uB8E8\uC0E8 \uD45C\uC900\uC2DC", "HAT"}; String HKT[] = new String[] {"\ud64d\ucf69 \uc2dc\uac04", "HKT", - "\ud64d\ucf69 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HKST"}; + "\ud64d\ucf69 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HKST", + "\uD64D\uCF69 \uD45C\uC900\uC2DC", "HKT"}; String HST[] = new String[] {"\ud558\uc640\uc774 \ud45c\uc900\uc2dc", "HST", - "\ud558\uc640\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HDT"}; + "\ud558\uc640\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HDT", + "\uD558\uC640\uC774 \uD45C\uC900\uC2DC", "HT"}; String ICT[] = new String[] {"\uc778\ub3c4\ucc28\uc774\ub098 \ubc18\ub3c4 \uc2dc\uac04", "ICT", - "\uc778\ub3c4\ucc28\uc774\ub098 \ubc18\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ICST"}; + "\uc778\ub3c4\ucc28\uc774\ub098 \ubc18\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ICST", + "\uC778\uB3C4\uCC28\uC774\uB098 \uBC18\uB3C4 \uD45C\uC900\uC2DC", "ICT"}; String IRT[] = new String[] {"\uc774\ub780 \ud45c\uc900\uc2dc", "IRST", - "\uc774\ub780 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IRDT"}; + "\uc774\ub780 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IRDT", + "\uC774\uB780 \uD45C\uC900\uC2DC", "IRT"}; String ISRAEL[] = new String[] {"\uc774\uc2a4\ub77c\uc5d8 \ud45c\uc900\uc2dc", "IST", - "\uc774\uc2a4\ub77c\uc5d8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IDT"}; + "\uc774\uc2a4\ub77c\uc5d8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IDT", + "\uC544\uC2A4\uB77C\uC5D8 \uD45C\uC900\uC2DC", "IT"}; String IST[] = new String[] {"\uc778\ub3c4 \ud45c\uc900\uc2dc", "IST", - "\uc778\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IDT"}; + "\uc778\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IDT", + "\uC778\uB3C4 \uD45C\uC900\uC2DC", "IT"}; String JST[] = new String[] {"\uc77c\ubcf8 \ud45c\uc900\uc2dc", "JST", - "\uc77c\ubcf8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "JDT"}; + "\uc77c\ubcf8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "JDT", + "\uC77C\uBCF8 \uD45C\uC900\uC2DC", "JT"}; String KST[] = new String[] {"\ud55c\uad6d \ud45c\uc900\uc2dc", "KST", - "\ud55c\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KDT"}; + "\ud55c\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KDT", + "\uB300\uD55C\uBBFC\uAD6D \uD45C\uC900\uC2DC", "KT"}; String LORD_HOWE[] = new String[] {"\ub85c\ub4dc \ud558\uc6b0 \ud45c\uc900\uc2dc", "LHST", - "\ub85c\ub4dc \ud558\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "LHST"}; + "\ub85c\ub4dc \ud558\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "LHST", + "\uB85C\uB4DC\uD558\uC6B0 \uD45C\uC900\uC2DC", "LHT"}; String MHT[] = new String[] {"\ub9c8\uc15c\uc81c\ub3c4 \uc2dc\uac04", "MHT", - "\ub9c8\uc15c\uc81c\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MHST"}; + "\ub9c8\uc15c\uc81c\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MHST", + "\uB9C8\uC15C \uC81C\uB3C4 \uD45C\uC900\uC2DC", "MHT"}; String MSK[] = new String[] {"\ubaa8\uc2a4\ud06c\ubc14 \ud45c\uc900\uc2dc", "MSK", - "\ubaa8\uc2a4\ud06c\ubc14 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MSD"}; + "\ubaa8\uc2a4\ud06c\ubc14 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MSD", + "\uBAA8\uC2A4\uD06C\uBC14 \uD45C\uC900\uC2DC", "MT"}; String MST[] = new String[] {"\uc0b0\uc9c0 \ud45c\uc900\uc2dc", "MST", - "\uc0b0\uc9c0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MDT"}; + "\uc0b0\uc9c0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MDT", + "\uC0B0\uC9C0 \uD45C\uC900\uC2DC", "MT"}; String MYT[] = new String[] {"\ub9d0\ub808\uc774\uc2dc\uc544 \uc2dc\uac04", "MYT", - "\ub9d0\ub808\uc774\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MYST"}; + "\ub9d0\ub808\uc774\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MYST", + "\uB9D0\uB808\uC774\uC2DC\uC544 \uD45C\uC900\uC2DC", "MYT"}; String NORONHA[] = new String[] {"Fernando de Noronha \uc2dc\uac04", "FNT", - "Fernando de Noronha \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "FNST"}; + "Fernando de Noronha \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "FNST", + "\uD398\uB974\uB09C\uB3C4 \uB4DC \uB178\uB85C\uD558 \uD45C\uC900\uC2DC", "FNT"}; String NOVT[] = new String[] {"\ub178\ube0c\uc2dc\ube4c\uc2a4\ud06c \uc2dc\uac04", "NOVT", - "\ub178\ube0c\uc2dc\ube4c\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NOVST"}; + "\ub178\ube0c\uc2dc\ube4c\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NOVST", + "\uB178\uBCF4\uC2DC\uBE44\uB974\uC2A4\uD06C \uD45C\uC900\uC2DC", "NOVT"}; String NPT[] = new String[] {"\ub124\ud314 \uc2dc\uac04", "NPT", - "\ub124\ud314 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NPST"}; + "\ub124\ud314 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NPST", + "\uB124\uD314 \uD45C\uC900\uC2DC", "NPT"}; String NST[] = new String[] {"\ub274\ud380\ub4e4\ub79c\ub4dc \ud45c\uc900\uc2dc", "NST", - "\ub274\ud380\ub4e4\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NDT"}; + "\ub274\ud380\ub4e4\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NDT", + "\uB274\uD380\uB4E4\uB79C\uB4DC \uD45C\uC900\uC2DC", "NT"}; String NZST[] = new String[] {"\ub274\uc9c8\ub79c\ub4dc \ud45c\uc900\uc2dc", "NZST", - "\ub274\uc9c8\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NZDT"}; + "\ub274\uc9c8\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NZDT", + "\uB274\uC9C8\uB79C\uB4DC \uD45C\uC900\uC2DC", "NZT"}; String PITCAIRN[] = new String[] {"Pitcairn \ud45c\uc900\uc2dc", "PST", - "Pitcairn \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"}; + "Pitcairn \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT", + "\uD54F\uCF00\uC5B8 \uD45C\uC900\uC2DC", "PT"}; String PKT[] = new String[] {"\ud30c\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "PKT", - "\ud30c\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PKST"}; + "\ud30c\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PKST", + "\uD30C\uD0A4\uC2A4\uD0C4 \uD45C\uC900\uC2DC", "PKT"}; String PONT[] = new String[] {"\uD3F0\uD398\uC774 \uD45C\uC900\uC2DC", "PONT", - "\uD3F0\uD398\uC774 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "PONST"}; + "\uD3F0\uD398\uC774 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "PONST", + "\uD3EC\uB098\uD398 \uD45C\uC900\uC2DC", "PONT"}; String PST[] = new String[] {"\ud0dc\ud3c9\uc591 \ud45c\uc900\uc2dc", "PST", - "\ud0dc\ud3c9\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"}; + "\ud0dc\ud3c9\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT", + "\uD0DC\uD3C9\uC591 \uD45C\uC900\uC2DC", "PT"}; String SAST[] = new String[] {"\ub0a8\uc544\ud504\ub9ac\uce74 \ud45c\uc900\uc2dc", "SAST", - "\ub0a8\uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SAST"}; + "\ub0a8\uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SAST", + "\uB0A8\uC544\uD504\uB9AC\uCE74 \uD45C\uC900\uC2DC", "SAT"}; String SBT[] = new String[] {"\uc194\ub85c\ubaac \uad70\ub3c4 \uc2dc\uac04", "SBT", - "\uc194\ub85c\ubaac \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SBST"}; + "\uc194\ub85c\ubaac \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SBST", + "\uC194\uB85C\uBAAC \uC81C\uB3C4 \uD45C\uC900\uC2DC", "SBT"}; String SGT[] = new String[] {"\uc2f1\uac00\ud3ec\ub974 \uc2dc\uac04", "SGT", - "\uc2f1\uac00\ud3ec\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SGST"}; + "\uc2f1\uac00\ud3ec\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SGST", + "\uC2F1\uAC00\uD3EC\uB974 \uD45C\uC900\uC2DC", "SGT"}; String SLST[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", - "\uc2dc\uc5d0\ub77c\ub9ac\uc628 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SLST"}; + "\uc2dc\uc5d0\ub77c\ub9ac\uc628 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SLST", + "\uC2DC\uC5D0\uB77C\uB9AC\uC628 \uD45C\uC900\uC2DC", "SLT"}; String TASMANIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST", - "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST"}; + "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST", + "\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "ET"}; String TMT[] = new String[] {"\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "TMT", - "\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TMST"}; + "\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TMST", + "\uD22C\uB974\uD06C\uBA54\uB2C8\uC2A4\uD0C4 \uD45C\uC900\uC2DC", "TMT"}; String ULAT[]= new String[] {"\uc6b8\ub780\ubc14\ud0c0\ub974 \uc2dc\uac04", "ULAT", - "\uc6b8\ub780\ubc14\ud0c0\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ULAST"}; + "\uc6b8\ub780\ubc14\ud0c0\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ULAST", + "\uC6B8\uB780\uBC14\uD1A0\uB974 \uD45C\uC900\uC2DC", "ULAT"}; String WART[] = new String[] {"\uc11c\ubd80 \uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "WART", "\uc11c\ubd80 \uc544\ub974\ud5e8\ud2f0\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WARST"}; String WAT[] = new String[] {"\uc11c\ubd80 \uc544\ud504\ub9ac\uce74 \uc2dc\uac04", "WAT", - "\uc11c\ubd80 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WAST"}; + "\uc11c\ubd80 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WAST", + "\uC11C\uBD80 \uC544\uD504\uB9AC\uCE74 \uD45C\uC900\uC2DC", "WAT"}; String WET[] = new String[] {"\uc11c\uc720\ub7fd \uc2dc\uac04", "WET", - "\uc11c\uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WEST"}; + "\uc11c\uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WEST", + "\uC11C\uBD80 \uC720\uB7FD \uD45C\uC900\uC2DC", "WET"}; String WIT[] = new String[] {"\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIB", - "\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WIST"}; + "\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WIST", + "\uC11C\uBD80 \uC778\uB3C4\uB124\uC2DC\uC544 \uD45C\uC900\uC2DC", "WIB"}; String WST_AUS[] = new String[] {"\uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST", - "\uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST"}; + "\uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST", + "\uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WT"}; String SAMOA[] = new String[] {"\uc0ac\ubaa8\uc544 \ud45c\uc900\uc2dc", "SST", - "\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SDT"}; + "\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SDT", + "\uC0AC\uBAA8\uC544 \uD45C\uC900\uC2DC", "ST"}; String WST_SAMOA[] = new String[] {"\uc11c\uc0ac\ubaa8\uc544 \uc2dc\uac04", "WST", - "\uc11c\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WSDT"}; + "\uc11c\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WSDT", + "\uC11C\uC0AC\uBAA8\uC544 \uD45C\uC900\uC2DC", "WST"}; String ChST[] = new String[] {"\ucc28\ubaa8\ub85c \ud45c\uc900\uc2dc", "ChST", - "\ucc28\ubaa8\ub85c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ChDT"}; + "\ucc28\ubaa8\ub85c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ChDT", + "\uCC28\uBAA8\uB974 \uD45C\uC900\uC2DC", "ChT"}; String VICTORIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uBE45\uD1A0\uB9AC\uC544)", "EST", - "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBE45\uD1A0\uB9AC\uC544)", "EST"}; + "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBE45\uD1A0\uB9AC\uC544)", "EST", + "\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uBE45\uD1A0\uB9AC\uC544)", "ET"}; String UTC[] = new String[] {"\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC", - "\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC"}; + "\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC", + "\uC9C0\uC5ED \uD45C\uC900\uC2DC", "UTC"}; String UZT[] = new String[] {"\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "UZT", - "\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "UZST"}; + "\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "UZST", + "\uC6B0\uC988\uBCA0\uD0A4\uC2A4\uD0C4 \uD45C\uC900\uC2DC", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"\ud30c\ub77c\uacfc\uc774 \uc2dc\uac04", "PYT", - "\ud30c\ub77c\uacfc\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PYST"}}, + "\ud30c\ub77c\uacfc\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PYST", + "\uD30C\uB77C\uACFC\uC774 \uD45C\uC900\uC2DC", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"\ucf5c\ub86c\ube44\uc544 \uc2dc\uac04", "COT", - "\ucf5c\ub86c\ube44\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "COST"}}, + "\ucf5c\ub86c\ube44\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "COST", + "\uCF5C\uB86C\uBE44\uC544 \uD45C\uC900\uC2DC", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"\ubca0\ub124\uc218\uc5d8\ub77c \uc2dc\uac04", "VET", - "\ubca0\ub124\uc218\uc5d8\ub77c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VEST"}}, + "\ubca0\ub124\uc218\uc5d8\ub77c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VEST", + "\uBCA0\uB124\uC218\uC5D8\uB77C \uD45C\uC900\uC2DC", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"\ud504\ub791\uc2a4\ub839 \uae30\uc544\ub098 \uc2dc\uac04", "GFT", - "\ud504\ub791\uc2a4\ub839 \uae30\uc544\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GFST"}}, + "\ud504\ub791\uc2a4\ub839 \uae30\uc544\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GFST", + "\uD504\uB791\uC2A4\uB839 \uAE30\uC544\uB098 \uD45C\uC900\uC2DC", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"\uc11c\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc2dc\uac04", "WGT", - "\uc11c\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WGST"}}, + "\uc11c\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WGST", + "\uC11C\uBD80 \uADF8\uB9B0\uB780\uB4DC \uD45C\uC900\uC2DC", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"\uc5d0\ucfe0\uc544\ub3c4\ub974 \uc2dc\uac04", "ECT", - "\uc5d0\ucfe0\uc544\ub3c4\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ECST"}}, + "\uc5d0\ucfe0\uc544\ub3c4\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ECST", + "\uC5D0\uCF70\uB3C4\uB974 \uD45C\uC900\uC2DC", "ECT"}}, {"America/Guyana", new String[] {"\uac00\uc774\uc544\ub098 \uc2dc\uac04", "GYT", - "\uac00\uc774\uc544\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GYST"}}, + "\uac00\uc774\uc544\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GYST", + "\uAC00\uC774\uC544\uB098 \uD45C\uC900\uC2DC", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"\ubcfc\ub9ac\ube44\uc544 \uc2dc\uac04", "BOT", - "\ubcfc\ub9ac\ube44\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BOST"}}, + "\ubcfc\ub9ac\ube44\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BOST", + "\uBCFC\uB9AC\uBE44\uC544 \uD45C\uC900\uC2DC", "BOT"}}, {"America/Lima", new String[] {"\ud398\ub8e8 \uc2dc\uac04", "PET", - "\ud398\ub8e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PEST"}}, + "\ud398\ub8e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PEST", + "\uD398\uB8E8 \uD45C\uC900\uC2DC", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uD45C\uC900\uC2DC", "MeST", - "\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MeDT"}}, + "\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MeDT", + "\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uD45C\uC900\uC2DC", "MeT"}}, {"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"}}, + "\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PMDT", + "\uD53C\uC5D0\uB974 \uBBF8\uD074\uB871 \uD45C\uC900\uC2DC", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"\uc6b0\ub8e8\uacfc\uc774 \uc2dc\uac04", "UYT", - "\uc6b0\ub8e8\uacfc\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "UYST"}}, + "\uc6b0\ub8e8\uacfc\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "UYST", + "\uC6B0\uB8E8\uACFC\uC774 \uD45C\uC900\uC2DC", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"\uc218\ub9ac\ub0a8 \uc2dc\uac04", "SRT", - "\uc218\ub9ac\ub0a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SRST"}}, + "\uc218\ub9ac\ub0a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SRST", + "\uC218\uB9AC\uB0A8 \uD45C\uC900\uC2DC", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"Davis \uc2dc\uac04", "DAVT", - "Davis \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DAVST"}}, + "Davis \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DAVST", + "\uB370\uC774\uBE44\uC2A4 \uD45C\uC900\uC2DC", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"\ub4a4\ubabd \ub4a4\ub974\ube4c \uc2dc\uac04", "DDUT", - "\ub4a4\ubabd \ub4a4\ub974\ube4c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DDUST"}}, + "\ub4a4\ubabd \ub4a4\ub974\ube4c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DDUST", + "\uB450\uBAAC\uD2B8\uC6B0\uB974\uBE4C \uD45C\uC900\uC2DC", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"\uB9E4\uCF70\uB9AC \uC12C \uD45C\uC900\uC2DC", "MIST", - "\uB9E4\uCF70\uB9AC \uC12C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MIST"}}, + "\uB9E4\uCF70\uB9AC \uC12C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MIST", + "\uB9E4\uCF70\uB9AC \uC12C \uD45C\uC900\uC2DC", "MIST"}}, {"Antarctica/Mawson", new String[] {"\ubaa8\uc2a8 \uc2dc\uac04", "MAWT", - "\ubaa8\uc2a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAWST"}}, + "\ubaa8\uc2a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAWST", + "\uB9C8\uC2A8 \uD45C\uC900\uC2DC", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"\ub85c\uc81c\ub77c \ud45c\uc900\uc2dc", "ROTT", - "\ub85c\uc81c\ub77c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ROTST"}}, + "\ub85c\uc81c\ub77c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ROTST", + "\uB85C\uB354\uB77C \uD45C\uC900\uC2DC", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Syowa \uc2dc\uac04", "SYOT", - "Syowa \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SYOST"}}, + "Syowa \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SYOST", + "\uC1FC\uC640 \uD45C\uC900\uC2DC", "SYOT"}}, {"Antarctica/Vostok", new String[] {"Vostok \uc2dc\uac04", "VOST", - "Vostok \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VOSST"}}, + "Vostok \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VOSST", + "\uBCF4\uC2A4\uD1A1 \uD45C\uC900\uC2DC", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"\uc54c\ub9c8\uc544\ud0c0 \uc2dc\uac04", "ALMT", - "\uc54c\ub9c8\uc544\ud0c0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ALMST"}}, + "\uc54c\ub9c8\uc544\ud0c0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ALMST", + "\uC54C\uB9C8\uC544\uD0C0 \uD45C\uC900\uC2DC", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"\uc544\ub098\ub514\ub974 \uc2dc\uac04", "ANAT", - "\uc544\ub098\ub514\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ANAST"}}, + "\uc544\ub098\ub514\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ANAST", + "\uC544\uB098\uB514\uB9AC \uD45C\uC900\uC2DC", "ANAT"}}, {"Asia/Aqtau", new String[] {"\uc545\ud0c0\uc6b0 \uc2dc\uac04", "AQTT", - "\uc545\ud0c0\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AQTST"}}, + "\uc545\ud0c0\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AQTST", + "\uC544\uD06C\uD0C0\uC6B0 \uD45C\uC900\uC2DC", "AQTT"}}, {"Asia/Aqtobe", new String[] {"\uc545\ud1a0\ube0c \uc2dc\uac04", "AQTT", - "\uc545\ud1a0\ube0c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AQTST"}}, + "\uc545\ud1a0\ube0c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AQTST", + "\uC544\uD06C\uD1A0\uBCA0 \uD45C\uC900\uC2DC", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"\uc544\uc81c\ub974\ubc14\uc774\uc794 \uc2dc\uac04", "AZT", - "\uc544\uc81c\ub974\ubc14\uc774\uc794 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AZST"}}, + "\uc544\uc81c\ub974\ubc14\uc774\uc794 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AZST", + "\uC544\uC81C\uB974\uBC14\uC774\uC794 \uD45C\uC900\uC2DC", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"\ud0a4\ub974\ud0a4\uc988\uc2a4\ud0c4 \uc2dc\uac04", "KGT", - "\ud0a4\ub974\uae30\uc988\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KGST"}}, + "\ud0a4\ub974\uae30\uc988\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KGST", + "\uD0A4\uB974\uAE30\uC2A4\uC2A4\uD0C4 \uD45C\uC900\uC2DC", "KGT"}}, {"Asia/Brunei", new String[] {"\ube0c\ub8e8\ub098\uc774 \uc2dc\uac04", "BNT", - "\ube0c\ub8e8\ub098\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BNST"}}, + "\ube0c\ub8e8\ub098\uc774 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BNST", + "\uBE0C\uB8E8\uB098\uC774 \uD45C\uC900\uC2DC", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Choibalsan \uc2dc\uac04", "CHOT", - "Choibalsan \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHOST"}}, + "Choibalsan \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHOST", + "\uCD08\uC774\uBC1C\uC0B0 \uD45C\uC900\uC2DC", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"\ud2f0\ubaa8\ub974-\ub808\uc2a4\ud14c \uc2dc\uac04", "TLT", - "\ud2f0\ubaa8\ub974-\ub808\uc2a4\ud14c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TLST"}}, + "\ud2f0\ubaa8\ub974-\ub808\uc2a4\ud14c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TLST", + "\uB3D9\uD2F0\uBAA8\uB974 \uD45C\uC900\uC2DC", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"\ud0c0\uc9c0\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "TJT", - "\ud0c0\uc9c0\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TJST"}}, + "\ud0c0\uc9c0\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TJST", + "\uD0C0\uC9C0\uD0A4\uC2A4\uD0C4 \uD45C\uC900\uC2DC", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"Hovd \uc2dc\uac04", "HOVT", - "Hovd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HOVST"}}, + "Hovd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "HOVST", + "\uD638\uBE0C\uB4DC \uD45C\uC900\uC2DC", "HOVT"}}, {"Asia/Irkutsk", new String[] {"\uc774\ub974\ucfe0\uce20\ud06c \uc2dc\uac04", "IRKT", - "\uc774\ub974\ucfe0\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IRKST"}}, + "\uc774\ub974\ucfe0\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IRKST", + "\uC774\uB974\uCFE0\uCE20\uD06C \uD45C\uC900\uC2DC", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIT", - "\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EIST"}}, + "\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EIST", + "\uB3D9\uBD80 \uC778\uB3C4\uB124\uC2DC\uC544 \uD45C\uC900\uC2DC", "WIT"}}, {"Asia/Kabul", new String[] {"\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "AFT", - "\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AFST"}}, + "\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AFST", + "\uC544\uD504\uAC00\uB2C8\uC2A4\uD0C4 \uD45C\uC900\uC2DC", "AFT"}}, {"Asia/Kamchatka", new String[] {"\ud398\ud2b8\ub85c\ud30c\ube14\ub85c\ud504\uc2a4\ud06c-\uce84\ucc28\uce20\ud0a4 \uc2dc\uac04", "PETT", - "\ud398\ud2b8\ub85c\ud30c\ube14\ub85c\ud504\uc2a4\ud06c-\uce84\ucc28\uce20\ud0a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PETST"}}, + "\ud398\ud2b8\ub85c\ud30c\ube14\ub85c\ud504\uc2a4\ud06c-\uce84\ucc28\uce20\ud0a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PETST", + "\uD398\uD2B8\uB85C\uD30C\uBE0C\uB85C\uD504\uC2A4\uD06C-\uCE84\uCC28\uCE20\uD0A4 \uD45C\uC900\uC2DC", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"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 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "YAKST", + "\uD55C\uB514\uAC00 \uD45C\uC900\uC2DC", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc2dc\uac04", "KRAT", - "\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KRAST"}}, + "\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KRAST", + "\uD06C\uB77C\uC2A4\uB178\uC57C\uB974\uC2A4\uD06C \uD45C\uC900\uC2DC", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"\ub9c8\uac00\ub2e8 \uc2dc\uac04", "MAGT", - "\ub9c8\uac00\ub2e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAGST"}}, + "\ub9c8\uac00\ub2e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAGST", + "\uB9C8\uAC00\uB2E8 \uD45C\uC900\uC2DC", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"\ud544\ub9ac\ud540 \uc2dc\uac04", "PHT", - "\ud544\ub9ac\ud540 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PHST"}}, + "\ud544\ub9ac\ud540 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PHST", + "\uD544\uB9AC\uD540 \uD45C\uC900\uC2DC", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Oral \ud45c\uc900\uc2dc", "ORAT", - "Oral \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ORAST"}}, + "Oral \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ORAST", + "\uC624\uB7F4 \uD45C\uC900\uC2DC", "ORAT"}}, {"Asia/Omsk", new String[] {"Omsk \uc2dc\uac04", "OMST", - "Omsk \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "OMSST"}}, + "Omsk \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "OMSST", + "\uC634\uC2A4\uD06C \uD45C\uC900\uC2DC", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Qyzylorda \ud45c\uc900\uc2dc", "QYZT", - "Qyzylorda \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "QYZST"}}, + "Qyzylorda \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "QYZST", + "\uD0A4\uC9C8\uB85C\uB974\uB2E4 \uD45C\uC900\uC2DC", "QYZT"}}, {"Asia/Rangoon", new String[] {"\ubbf8\uc580\ub9c8 \uc2dc\uac04", "MMT", - "\ubbf8\uc580\ub9c8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MMST"}}, + "\ubbf8\uc580\ub9c8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MMST", + "\uBBF8\uC580\uB9C8 \uD45C\uC900\uC2DC", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"\uc0ac\ud560\ub9b0 \uc2dc\uac04", "SAKT", - "\uc0ac\ud560\ub9b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SAKST"}}, + "\uc0ac\ud560\ub9b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SAKST", + "\uC0AC\uD560\uB9B0 \uD45C\uC900\uC2DC", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"\uadf8\ub8e8\uc9c0\uc57c \uc2dc\uac04", "GET", - "\uadf8\ub8e8\uc9c0\uc57c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GEST"}}, + "\uadf8\ub8e8\uc9c0\uc57c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GEST", + "\uADF8\uB8E8\uC9C0\uC57C \uD45C\uC900\uC2DC", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"\uC6B0\uC2A4\uD2F0\uB124\uB77C \uD45C\uC900\uC2DC", "VLAT", - "\uC6B0\uC2A4\uD2F0\uB124\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "VLAST" }}, + "\uC6B0\uC2A4\uD2F0\uB124\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "VLAST" , + "\uC6B0\uC2A4\uD2F0\uB124\uB77C \uD45C\uC900\uC2DC", "VLAT"}}, {"Asia/Vientiane", ICT}, {"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 \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\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "YAKST", + "\uC57C\uCFE0\uCE20\uD06C \uD45C\uC900\uC2DC", "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\ubc84\uadf8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "YEKST", + "\uC608\uCE74\uD14C\uB9B0\uBD80\uB974\uD06C \uD45C\uC900\uC2DC", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"\uc544\uc870\ub808\uc2a4 \uc2dc\uac04", "AZOT", - "\uc544\uc870\ub808\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AZOST"}}, + "\uc544\uc870\ub808\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AZOST", + "\uC544\uC870\uB808\uC2A4 \uD45C\uC900\uC2DC", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"\uae4c\ubf40\ubca0\ub974\ub370 \uc2dc\uac04", "CVT", - "\uae4c\ubf40\ubca0\ub974\ub370 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CVST"}}, + "\uae4c\ubf40\ubca0\ub974\ub370 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CVST", + "\uCF00\uC774\uD504\uBCA0\uB974\uB370 \uD45C\uC900\uC2DC", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"\uc0ac\uc6b0\uc2a4 \uc870\uc9c0\uc544 \ud45c\uc900\uc2dc", "GST", - "\uc0ac\uc6b0\uc2a4 \uc870\uc9c0\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GDT"}}, + "\uc0ac\uc6b0\uc2a4 \uc870\uc9c0\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GDT", + "\uC0AC\uC6B0\uC2A4\uC870\uC9C0\uC544 \uD45C\uC900\uC2DC", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"\ud3ec\ud074\ub79c\ub4dc \uad70\ub3c4 \uc2dc\uac04", "FKT", - "\ud3ec\ud074\ub79c\ub4dc \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "FKST"}}, + "\ud3ec\ud074\ub79c\ub4dc \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "FKST", + "\uD3EC\uD074\uB79C\uB4DC \uC81C\uB3C4 \uD45C\uC900\uC2DC", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"\uC911\uC559 \uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST", - "\uC911\uC559 \uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST"}}, + "\uC911\uC559 \uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST", + "\uC911\uC559 \uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"\uc0ac\ub9c8\ub77c \uc2dc\uac04", "SAMT", - "\uc0ac\ub9c8\ub77c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SAMST"}}, + "\uc0ac\ub9c8\ub77c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SAMST", + "\uC0AC\uB9C8\uB77C \uD45C\uC900\uC2DC", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"\ubcfc\uace0\uadf8\ub77c\ub4dc \uc2dc\uac04", "VOLT", - "\ubcfc\uace0\uadf8\ub77c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VOLST"}}, + "\ubcfc\uace0\uadf8\ub77c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VOLST", + "\uBCFC\uACE0\uADF8\uB77C\uB4DC \uD45C\uC900\uC2DC", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"\uc601\uc778\ub3c4 \uc81c\ub3c4 \uc2dc\uac04", "IOT", - "\uc601\uc778\ub3c4 \uc81c\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IOST"}}, + "\uc601\uc778\ub3c4 \uc81c\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IOST", + "\uC778\uB3C4\uC591 \uC2DD\uBBFC\uC9C0 \uD45C\uC900\uC2DC", "IOT"}}, {"Indian/Christmas", new String[] {"\ud06c\ub9ac\uc2a4\ub9c8\uc2a4\uc12c \uc2dc\uac04", "CXT", - "\ud06c\ub9ac\uc2a4\ub9c8\uc2a4\uc12c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CXST"}}, + "\ud06c\ub9ac\uc2a4\ub9c8\uc2a4\uc12c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CXST", + "\uD06C\uB9AC\uC2A4\uB9C8\uC2A4 \uC12C \uD45C\uC900\uC2DC", "CIT"}}, {"Indian/Cocos", new String[] {"\ucf54\ucf54\uc2a4 \uad70\ub3c4 \uc2dc\uac04", "CCT", - "\ucf54\ucf54\uc2a4 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CCST"}}, + "\ucf54\ucf54\uc2a4 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CCST", + "\uCF54\uCF54\uC2A4 \uC81C\uB3C4 \uD45C\uC900\uC2DC", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"\ud504\ub791\uc2a4 \ub0a8\ubd80 \uc9c0\ubc29 \ubc0f \ub0a8\uadf9 \uc9c0\uc5ed \uc2dc\uac04", "TFT", - "\ud504\ub791\uc2a4 \ub0a8\ubd80 \uc9c0\ubc29 \ubc0f \ub0a8\uadf9 \uc9c0\uc5ed \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TFST"}}, + "\ud504\ub791\uc2a4 \ub0a8\ubd80 \uc9c0\ubc29 \ubc0f \ub0a8\uadf9 \uc9c0\uc5ed \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TFST", + "\uD504\uB791\uC2A4\uB839 \uB0A8\uBD80 \uBC0F \uB0A8\uADF9 \uB300\uB959 \uD45C\uC900\uC2DC", "TFT"}}, {"Indian/Mahe", new String[] {"\uc138\uc774\uc140 \uc2dc\uac04", "SCT", - "\uc138\uc774\uc258 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SCST"}}, + "\uc138\uc774\uc258 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SCST", + "\uC138\uC774\uC178 \uD45C\uC900\uC2DC", "SCT"}}, {"Indian/Maldives", new String[] {"\ubab0\ub514\ube0c \uc2dc\uac04", "MVT", - "\ubab0\ub514\ube0c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MVST"}}, + "\ubab0\ub514\ube0c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MVST", + "\uBAB0\uB514\uBE0C \uD45C\uC900\uC2DC", "MVT"}}, {"Indian/Mauritius", new String[] {"\ubaa8\ub9ac\uc154\uc2a4 \uc2dc\uac04", "MUT", - "\ubaa8\ub9ac\uc154\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MUST"}}, + "\ubaa8\ub9ac\uc154\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MUST", + "\uBAA8\uB9AC\uC154\uC2A4 \uD45C\uC900\uC2DC", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"\ub9ac\uc720\ub2c8\uc5b8 \uc2dc\uac04", "RET", - "\ub9ac\uc720\ub2c8\uc5b8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "REST"}}, + "\ub9ac\uc720\ub2c8\uc5b8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "REST", + "\uB808\uC704\uB2C8\uC639 \uD45C\uC900\uC2DC", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"\uc911\ubd80 \uc720\ub7fd \uc2dc\uac04", "MET", - "\uc911\ubd80 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MEST"}}, + "\uc911\ubd80 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"\ube44\ub204\uc544\ud22c \uc2dc\uac04", "VUT", - "\ubc14\ub204\uc544\ud22c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VUST"}}, + "\ubc14\ub204\uc544\ud22c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VUST", + "\uBC14\uB204\uC544\uD22C \uD45C\uC900\uC2DC", "VUT"}}, {"Pacific/Enderbury", new String[] {"\ud53c\ub2c9\uc2a4 \uad70\ub3c4 \uc2dc\uac04", "PHOT", - "\ud53c\ub2c9\uc2a4 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PHOST"}}, + "\ud53c\ub2c9\uc2a4 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PHOST", + "\uD53C\uB2C9\uC2A4 \uC81C\uB3C4 \uD45C\uC900\uC2DC", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"\ud1a0\ucf08\ub77c\uc6b0 \uc2dc\uac04", "TKT", - "\ud1a0\ucf08\ub77c\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TKST"}}, + "\ud1a0\ucf08\ub77c\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TKST", + "\uD1A0\uCF08\uB77C\uC6B0 \uD45C\uC900\uC2DC", "TKT"}}, {"Pacific/Fiji", new String[] {"\ud53c\uc9c0 \uc2dc\uac04", "FJT", - "\ud53c\uc9c0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "FJST"}}, + "\ud53c\uc9c0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "FJST", + "\uD53C\uC9C0 \uD45C\uC900\uC2DC", "FJT"}}, {"Pacific/Funafuti", new String[] {"\ud22c\ubc1c\ub8e8 \uc2dc\uac04", "TVT", - "\ud22c\ubc1c\ub8e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TVST"}}, + "\ud22c\ubc1c\ub8e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TVST", + "\uD22C\uBC1C\uB8E8 \uD45C\uC900\uC2DC", "TVT"}}, {"Pacific/Galapagos", new String[] {"\uac08\ub77c\ud30c\uace0\uc2a4 \uc2dc\uac04", "GALT", - "\uac08\ub77c\ud30c\uace0\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GALST"}}, + "\uac08\ub77c\ud30c\uace0\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GALST", + "\uAC08\uB77C\uD30C\uACE0\uC2A4 \uD45C\uC900\uC2DC", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"\ub77c\uc778 \uad70\ub3c4 \uc2dc\uac04", "LINT", - "\ub77c\uc778 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "LINST"}}, + "\ub77c\uc778 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "LINST", + "\uB77C\uC778 \uC81C\uB3C4 \uD45C\uC900\uC2DC", "LINT"}}, {"Pacific/Kosrae", new String[] {"\ucf54\uc2a4\ub798 \uc2dc\uac04", "KOST", - "\ucf54\uc2a4\ub798 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KOSST"}}, + "\ucf54\uc2a4\ub798 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KOSST", + "\uCF54\uC2A4\uB808 \uD45C\uC900\uC2DC", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"\ub9c8\ub974\ucf00\uc0ac\uc2a4 \uc2dc\uac04", "MART", - "\ub9c8\ub974\ucf00\uc0ac\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MARST"}}, + "\ub9c8\ub974\ucf00\uc0ac\uc2a4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MARST", + "\uB9C8\uD0A4\uC800\uC2A4 \uD45C\uC900\uC2DC", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"\ub098\uc6b0\ub8e8 \uc2dc\uac04", "NRT", - "\ub098\uc6b0\ub8e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NRST"}}, + "\ub098\uc6b0\ub8e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NRST", + "\uB098\uC6B0\uB8E8 \uD45C\uC900\uC2DC", "NRT"}}, {"Pacific/Niue", new String[] {"\ub2c8\uc6b0\uc5d0 \uc2dc\uac04", "NUT", - "\ub2c8\uc6b0\uc5d0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NUST"}}, + "\ub2c8\uc6b0\uc5d0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NUST", + "\uB2C8\uC6B0\uC5D0 \uD45C\uC900\uC2DC", "NUT"}}, {"Pacific/Norfolk", new String[] {"\ub178\ud37d \uc2dc\uac04", "NFT", - "\ub178\ud37d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NFST"}}, + "\ub178\ud37d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NFST", + "\uB178\uD37D \uD45C\uC900\uC2DC", "NFT"}}, {"Pacific/Noumea", new String[] {"\ub274 \uce7c\ub808\ub3c4\ub2c8\uc544 \uc2dc\uac04", "NCT", - "\ub274 \uce7c\ub808\ub3c4\ub2c8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NCST"}}, + "\ub274 \uce7c\ub808\ub3c4\ub2c8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "NCST", + "\uB274 \uCE7C\uB808\uB3C4\uB2C8\uC544 \uD45C\uC900\uC2DC", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"\ud314\ub77c\uc6b0 \uc2dc\uac04", "PWT", - "\ud314\ub77c\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PWST"}}, + "\ud314\ub77c\uc6b0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PWST", + "\uD314\uB77C\uC6B0 \uD45C\uC900\uC2DC", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"\ud30c\ud478\uc544\ub274\uae30\ub2c8 \uc2dc\uac04", "PGT", - "\ud30c\ud478\uc544\ub274\uae30\ub2c8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PGST"}}, + "\ud30c\ud478\uc544\ub274\uae30\ub2c8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PGST", + "\uD30C\uD478\uC544 \uB274\uAE30\uB2C8\uC544 \uD45C\uC900\uC2DC", "PGT"}}, {"Pacific/Rarotonga", new String[] {"\ucfe0\ud06c \uad70\ub3c4 \uc2dc\uac04", "CKT", - "\ucfe0\ud06c \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CKHST"}}, + "\ucfe0\ud06c \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CKHST", + "\uCFE1 \uC81C\uB3C4 \uD45C\uC900\uC2DC", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"\ud0c0\ud788\ud2f0 \uc2dc\uac04", "TAHT", - "\ud0c0\ud788\ud2f0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TAHST"}}, + "\ud0c0\ud788\ud2f0 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TAHST", + "\uD0C0\uD788\uD2F0 \uD45C\uC900\uC2DC", "TAHT"}}, {"Pacific/Tarawa", new String[] {"\uae38\ubc84\ud2b8 \uad70\ub3c4 \uc2dc\uac04", "GILT", - "\uae38\ubc84\ud2b8 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GILST"}}, + "\uae38\ubc84\ud2b8 \uad70\ub3c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GILST", + "\uAE38\uBC84\uD2B8 \uC81C\uB3C4 \uD45C\uC900\uC2DC", "GILT"}}, {"Pacific/Tongatapu", new String[] {"\ud1b5\uac00 \uc2dc\uac04", "TOT", - "\ud1b5\uac00 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TOST"}}, + "\ud1b5\uac00 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TOST", + "\uD1B5\uAC00 \uD45C\uC900\uC2DC", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"\uc6e8\uc774\ud06c \uc2dc\uac04", "WAKT", - "\uc6e8\uc774\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WAKST"}}, + "\uc6e8\uc774\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WAKST", + "\uC6E8\uC774\uD06C \uD45C\uC900\uC2DC", "WAKT"}}, {"Pacific/Wallis", new String[] {"\uc6d4\ub9ac\uc2a4 \ud6c4\ud22c\ub098 \uc2dc\uac04", "WFT", - "\uc6d4\ub9ac\uc2a4 \ud6c4\ud2b8\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WFST"}}, + "\uc6d4\ub9ac\uc2a4 \ud6c4\ud2b8\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WFST", + "\uC6D4\uB9AC\uC2A4 \uD478\uD22C\uB098 \uD45C\uC900\uC2DC", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java b/jdk/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java index 29feb186bf7..265fba0b813 100644 --- a/jdk/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java +++ b/jdk/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java @@ -46,157 +46,233 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Fuso hor\u00e1rio do Acre", "ACT", - "Fuso hor\u00e1rio de ver\u00e3o do Acre", "ACST"}; + "Fuso hor\u00e1rio de ver\u00e3o do Acre", "ACST", + "Fuso hor\u00e1rio do Acre", "ACT"}; String ADELAIDE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul)", "CST", - "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul)", "CST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul)", "CST", + "Hor\u00E1rio Central (Austr\u00E1lia do Sul)", "CT"}; String AGT[] = new String[] {"Fuso hor\u00e1rio da Argentina", "ART", - "Fuso hor\u00e1rio de ver\u00e3o da Argentina", "ARST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Argentina", "ARST", + "Hor\u00E1rio da Argentina", "ART"}; String AKST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Alaska", "AKST", - "Hor\u00e1rio de luz natural do Alaska", "AKDT"}; + "Hor\u00e1rio de luz natural do Alaska", "AKDT", + "Hor\u00E1rio do Alasca", "AKT"}; String AMT[] = new String[] {"Fuso hor\u00e1rio do Amazonas", "AMT", - "Fuso hor\u00e1rio de ver\u00e3o do Amazonas", "AMST"}; + "Fuso hor\u00e1rio de ver\u00e3o do Amazonas", "AMST", + "Hor\u00E1rio do Amazonas", "AMT"}; String ARAST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da Ar\u00e1bia", "AST", - "Hor\u00e1rio de luz natural da Ar\u00e1bia", "ADT"}; + "Hor\u00e1rio de luz natural da Ar\u00e1bia", "ADT", + "Hor\u00E1rio da Ar\u00E1bia", "AT"}; String ARMT[] = new String[] {"Fuso hor\u00e1rio da Arm\u00eania", "AMT", - "Fuso hor\u00e1rio de ver\u00e3o da Arm\u00eania", "AMST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Arm\u00eania", "AMST", + "Hor\u00E1rio da Arm\u00EAnia", "AMT"}; String AST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Atl\u00e2ntico", "AST", - "Hor\u00e1rio de luz natural do Atl\u00e2ntico", "ADT"}; + "Hor\u00e1rio de luz natural do Atl\u00e2ntico", "ADT", + "Hor\u00E1rio do Atl\u00E2ntico", "AT"}; String BDT[] = new String[] {"Fuso hor\u00e1rio de Bangladesh", "BDT", - "Fuso hor\u00e1rio de ver\u00e3o de Bangladesh", "BDST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Bangladesh", "BDST", + "Hor\u00E1rio de Bangladesh", "BDT"}; String BRISBANE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Queensland)", "EST", - "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Queensland)", "EST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Queensland)", "EST", + "Hor\u00E1rio do Leste (Queensland)", "ET"}; String BROKEN_HILL[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST", - "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST", + "Hor\u00E1rio Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CT"}; String BRT[] = new String[] {"Fuso hor\u00e1rio de Bras\u00edlia", "BRT", - "Fuso hor\u00e1rio de ver\u00e3o de Bras\u00edlia", "BRST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Bras\u00edlia", "BRST", + "Hor\u00E1rio de Bras\u00EDlia", "BRT"}; String BTT[] = new String[] {"Fuso hor\u00e1rio de But\u00e3o", "BTT", - "Fuso hor\u00e1rio de ver\u00e3o de But\u00e3o", "BTST"}; + "Fuso hor\u00e1rio de ver\u00e3o de But\u00e3o", "BTST", + "Hor\u00E1rio do But\u00E3o", "BTT"}; String CAT[] = new String[] {"Fuso hor\u00e1rio da \u00c1frica Central", "CAT", - "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica Central", "CAST"}; + "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica Central", "CAST", + "Hor\u00E1rio da \u00C1frica Central", "CAT"}; String CET[] = new String[] {"Fuso hor\u00e1rio da Europa Central", "CET", - "Fuso hor\u00e1rio de ver\u00e3o da Europa Central", "CEST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Europa Central", "CEST", + "Hor\u00E1rio da Europa Central", "CET"}; String CHAST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Chatham", "CHAST", - "Hor\u00e1rio de luz natural de Chatham", "CHADT"}; + "Hor\u00e1rio de luz natural de Chatham", "CHADT", + "Hor\u00E1rio de Chatham", "CHAT"}; String CIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Central", "WITA", - "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Central", "CIST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Central", "CIST", + "Hor\u00E1rio da Indon\u00E9sia Central", "WITA"}; String CLT[] = new String[] {"Fuso hor\u00e1rio do Chile", "CLT", - "Fuso hor\u00e1rio de ver\u00e3o do Chile", "CLST"}; + "Fuso hor\u00e1rio de ver\u00e3o do Chile", "CLST", + "Hor\u00E1rio do Chile", "CLT"}; String CST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central", "CST", - "Hor\u00e1rio de luz natural central", "CDT"}; + "Hor\u00e1rio de luz natural central", "CDT", + "Hor\u00E1rio Central", "CT"}; String CTT[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da China", "CST", - "Hor\u00e1rio de luz natural da China", "CDT"}; + "Hor\u00e1rio de luz natural da China", "CDT", + "Hor\u00E1rio da China", "CT"}; String CUBA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Cuba", "CST", - "Hor\u00e1rio de luz natural de Cuba", "CDT"}; + "Hor\u00e1rio de luz natural de Cuba", "CDT", + "Hor\u00E1rio de Cuba", "CT"}; String DARWIN[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Territ\u00F3rio do Norte)", "CST", - "Fuso Hor\u00E1rio de Ver\u00E3o Central (Territ\u00F3rio do Norte)", "CST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Central (Territ\u00F3rio do Norte)", "CST", + "Hor\u00E1rio Central (Territ\u00F3rio do Norte)", "CT"}; String DUBLIN[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", - "Fuso hor\u00e1rio de ver\u00e3o da Irlanda", "IST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Irlanda", "IST", + "Hor\u00E1rio da Rep\u00FAblica da Irlanda", "IT"}; String EAT[] = new String[] {"Fuso hor\u00e1rio da \u00c1frica Oriental", "EAT", - "Fuso hor\u00e1rio padr\u00e3o da \u00c1frica Oriental", "EAST"}; + "Fuso hor\u00e1rio padr\u00e3o da \u00c1frica Oriental", "EAST", + "Hor\u00E1rio do Leste da \u00C1frica", "EAT"}; String EASTER[] = new String[] {"Fuso hor\u00e1rio da Ilha de P\u00e1scoa", "EAST", - "Fuso hor\u00e1rio de ver\u00e3o da Ilha de P\u00e1scoa", "EASST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Ilha de P\u00e1scoa", "EASST", + "Hor\u00E1rio da Ilha de P\u00E1scoa", "EAST"}; String EET[] = new String[] {"Fuso hor\u00e1rio da Europa Oriental", "EET", - "Fuso hor\u00e1rio de ver\u00e3o da Europa Oriental", "EEST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Europa Oriental", "EEST", + "Hor\u00e1rio da Europa Oriental", "EET"}; String EGT[] = new String[] {"Fuso hor\u00e1rio da Groenl\u00e2ndia Oriental", "EGT", - "Fuso hor\u00e1rio de ver\u00e3o da Groenl\u00e2ndia Oriental", "EGST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Groenl\u00e2ndia Oriental", "EGST", + "Hor\u00E1rio da Groenl\u00E2ndia Oriental", "EGT"}; String EST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental", "EST", - "Hor\u00e1rio de luz natural oriental", "EDT"}; + "Hor\u00e1rio de luz natural oriental", "EDT", + "Hor\u00E1rio do Leste", "ET"}; String EST_NSW[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Oriental (Nova Gales do Sul)", "EST", - "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Nova Gales do Sul)", "EST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Nova Gales do Sul)", "EST", + "Hor\u00E1rio Oriental (Nova Gales do Sul)", "ET"}; String FET[] = new String[] {"Hor\u00E1rio do Extremo Leste Europeu (FET)", "FET", - "Fuso Hor\u00E1rio de Ver\u00E3o do Extremo Leste Europeu", "FEST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o do Extremo Leste Europeu", "FEST", + "Hor\u00E1rio do Extremo Leste Europeu (FET)", "FET"}; String GHMT[] = new String[] {"Fuso hor\u00e1rio do meridiano de Gana", "GMT", - "Fuso hor\u00e1rio de ver\u00e3o de Gana", "GHST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Gana", "GHST", + "Fuso Hor\u00E1rio do Meridiano de Gana", "GMT"}; String GAMBIER[] = new String[] {"Fuso hor\u00e1rio de Gambier", "GAMT", - "Fuso hor\u00e1rio de ver\u00e3o de Gambier", "GAMST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Gambier", "GAMST", + "Hor\u00E1rio de Gambier", "GAMT"}; String GMT[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", - "Fuso hor\u00e1rio do meridiano de Greenwich", "GMT"}; + "Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", + "Hor\u00E1rio M\u00E9dio de Greenwich", "GMT"}; String GMTBST[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", - "Fuso hor\u00e1rio de ver\u00e3o da Gr\u00e3-Bretanha", "BST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Gr\u00e3-Bretanha", "BST", + "Hor\u00E1rio do Reino Unido", "BT"}; String GST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do golfo", "GST", - "Hor\u00e1rio de luz natural do golfo", "GDT"}; + "Hor\u00e1rio de luz natural do golfo", "GDT", + "Hor\u00E1rio do Golfo", "GT"}; String HAST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Hava\u00ed-Aleutian", "HAST", - "Hor\u00e1rio de luz natural do Hava\u00ed-Aleutian", "HADT"}; + "Hor\u00e1rio de luz natural do Hava\u00ed-Aleutian", "HADT", + "Hor\u00E1rio do Hava\u00ED-Aleutas", "HAT"}; String HKT[] = new String[] {"Fuso hor\u00e1rio de Hong Kong", "HKT", - "Fuso hor\u00e1rio de ver\u00e3o de Hong Kong", "HKST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Hong Kong", "HKST", + "Hor\u00E1rio de Hong Kong", "HKT"}; String HST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Hava\u00ed", "HST", - "Hor\u00e1rio de luz natural do Hava\u00ed", "HDT"}; + "Hor\u00e1rio de luz natural do Hava\u00ed", "HDT", + "Hor\u00E1rio do Hava\u00ED", "HT"}; String ICT[] = new String[] {"Fuso hor\u00e1rio da Indochina", "ICT", - "Fuso hor\u00e1rio de ver\u00e3o da Indochina", "ICST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Indochina", "ICST", + "Hor\u00E1rio da Indochina", "ICT"}; String IRT[] = new String[] {"Fuso hor\u00e1rio do Ir\u00e3", "IRST", - "Hor\u00e1rio de luz natural do Ir\u00e3", "IRDT"}; + "Hor\u00e1rio de luz natural do Ir\u00e3", "IRDT", + "Hor\u00E1rio do Ir\u00E3", "IRT"}; String ISRAEL[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Israel", "IST", - "Hor\u00e1rio de luz natural de Israel", "IDT"}; + "Hor\u00e1rio de luz natural de Israel", "IDT", + "Hor\u00E1rio de Israel", "IT"}; String IST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da \u00cdndia", "IST", - "Hor\u00e1rio de luz natural da \u00cdndia", "IDT"}; + "Hor\u00e1rio de luz natural da \u00cdndia", "IDT", + "Hor\u00E1rio da \u00CDndia", "IT"}; String JST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Jap\u00e3o", "JST", - "Hor\u00e1rio de luz natural do Jap\u00e3o", "JDT"}; + "Hor\u00e1rio de luz natural do Jap\u00e3o", "JDT", + "Hor\u00E1rio do Jap\u00E3o", "JT"}; String KST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da Coreia", "KST", - "Hor\u00e1rio de luz natural da Coreia", "KDT"}; + "Hor\u00e1rio de luz natural da Coreia", "KDT", + "Hor\u00E1rio da Coreia", "KT"}; String LORD_HOWE[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Lord Howe", "LHST", - "Fuso hor\u00e1rio de ver\u00e3o de Lord Howe", "LHST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Lord Howe", "LHST", + "Hor\u00E1rio de Lord Howe", "LHT"}; String MHT[] = new String[] {"Fuso hor\u00e1rio das Ilhas Marshall", "MHT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Marshall", "MHST"}; + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Marshall", "MHST", + "Hor\u00E1rio das Ilhas Marshall", "MHT"}; String MSK[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Moscou", "MSK", - "Hor\u00e1rio de luz natural de Moscou", "MSD"}; + "Hor\u00e1rio de luz natural de Moscou", "MSD", + "Hor\u00E1rio de Moscou", "MT"}; String MST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o das montanhas", "MST", - "Hor\u00e1rio de luz natural das montanhas", "MDT"}; + "Hor\u00e1rio de luz natural das montanhas", "MDT", + "Hor\u00E1rio das Montanhas Rochosas", "MT"}; String MYT[] = new String[] {"Fuso hor\u00e1rio da Mal\u00e1sia", "MYT", - "Fuso hor\u00e1rio de ver\u00e3o da Mal\u00e1sia", "MYST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Mal\u00e1sia", "MYST", + "Hor\u00E1rio da Mal\u00E1sia", "MYT"}; String NORONHA[] = new String[] {"Fuso hor\u00e1rio de Fernando de Noronha", "FNT", - "Fuso hor\u00e1rio de ver\u00e3o de Fernando de Noronha", "FNST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Fernando de Noronha", "FNST", + "Hor\u00E1rio de Fernando de Noronha", "FNT"}; String NOVT[] = new String[] {"Fuso hor\u00e1rio de Novosibirsk", "NOVT", - "Fuso hor\u00e1rio de ver\u00e3o de Novosibirsk", "NOVST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Novosibirsk", "NOVST", + "Hor\u00E1rio de Novosibirsk", "NOVT"}; String NPT[] = new String[] {"Fuso hor\u00e1rio do Nepal", "NPT", - "Fuso hor\u00e1rio de ver\u00e3o do Nepal", "NPST"}; + "Fuso hor\u00e1rio de ver\u00e3o do Nepal", "NPST", + "Hor\u00E1rio do Nepal", "NPT"}; String NST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Terra Nova", "NST", - "Hor\u00e1rio de luz natural de Terra Nova", "NDT"}; + "Hor\u00e1rio de luz natural de Terra Nova", "NDT", + "Hor\u00E1rio de Terra Nova", "NT"}; String NZST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da Nova Zel\u00e2ndia", "NZST", - "Hor\u00e1rio de luz natural da Nova Zel\u00e2ndia", "NZDT"}; + "Hor\u00e1rio de luz natural da Nova Zel\u00e2ndia", "NZDT", + "Hor\u00E1rio da Nova Zel\u00E2ndia", "NZT"}; String PITCAIRN[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Pitcairn", "PST", - "Hor\u00e1rio de luz natural de Pitcairn", "PDT"}; + "Hor\u00e1rio de luz natural de Pitcairn", "PDT", + "Hor\u00E1rio de Pitcairn", "PT"}; String PKT[] = new String[] {"Fuso hor\u00e1rio do Paquist\u00e3o", "PKT", - "Fuso hor\u00e1rio de ver\u00e3o do Paquist\u00e3o", "PKST"}; + "Fuso hor\u00e1rio de ver\u00e3o do Paquist\u00e3o", "PKST", + "Hor\u00E1rio do Paquist\u00E3o", "PKT"}; String PONT[] = new String[] {"Fuso Hor\u00E1rio de Pohnpei", "PONT", - "Fuso Hor\u00E1rio de Ver\u00E3o de Pohnpei", "PONST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o de Pohnpei", "PONST", + "Hor\u00E1rio de Ponape", "PONT"}; String PST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Pac\u00edfico", "PST", - "Hor\u00e1rio de luz natural do Pac\u00edfico", "PDT"}; + "Hor\u00e1rio de luz natural do Pac\u00edfico", "PDT", + "Hor\u00E1rio do Pac\u00EDfico", "PT"}; String SAST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o da \u00c1frica do Sul", "SAST", - "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica do Sul", "SAST"}; + "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica do Sul", "SAST", + "Hor\u00E1rio da \u00C1frica do Sul", "SAT"}; String SBT[] = new String[] {"Fuso hor\u00e1rio das Ilhas Salom\u00e3o", "SBT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Salom\u00e3o", "SBST"}; + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Salom\u00e3o", "SBST", + "Hor\u00E1rio das Ilhas Salom\u00E3o", "SBT"}; String SGT[] = new String[] {"Fuso hor\u00e1rio de Cingapura", "SGT", - "Fuso hor\u00e1rio de ver\u00e1 de Cingapura", "SGST"}; + "Fuso hor\u00e1rio de ver\u00e1 de Cingapura", "SGST", + "Hor\u00E1rio de Cingapura", "SGT"}; String SLST[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", - "Fuso hor\u00e1rio de ver\u00e3o de Serra Leoa", "SLST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Serra Leoa", "SLST", + "Hor\u00E1rio de Serra Leoa", "SLT"}; String TASMANIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Tasm\u00E2nia)", "EST", - "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Tasm\u00E2nia)", "EST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Tasm\u00E2nia)", "EST", + "Hor\u00E1rio do Leste (Tasm\u00E2nia)", "ET"}; String TMT[] = new String[] {"Fuso hor\u00e1rio do Turcomenist\u00e3o", "TMT", - "Fuso hor\u00e1rio de ver\u00e3o do Turcomenist\u00e3o", "TMST"}; + "Fuso hor\u00e1rio de ver\u00e3o do Turcomenist\u00e3o", "TMST", + "Hor\u00E1rio do Turcomenist\u00E3o", "TMT"}; String TRUT[] = new String[] {"Fuso Hor\u00E1rio de Chuuk", "CHUT", - "Fuso Hor\u00E1rio de Ver\u00E3o de Chuuk", "CHUST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o de Chuuk", "CHUST", + "Fuso Hor\u00E1rio de Chuuk", "CHUT"}; String ULAT[]= new String[] {"Fuso hor\u00e1rio de Ulan Bator", "ULAT", - "Fuso hor\u00e1rio de ver\u00e3o de Ulan Bator", "ULAST"}; + "Fuso hor\u00e1rio de ver\u00e3o de Ulan Bator", "ULAST", + "Hor\u00E1rio de Ulaanbaatar", "ULAT"}; String WAT[] = new String[] {"Fuso hor\u00e1rio da \u00c1frica Ocidental", "WAT", - "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica Ocidental", "WAST"}; + "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica Ocidental", "WAST", + "Hor\u00E1rio da \u00C1frica Ocidental", "WAT"}; String WET[] = new String[] {"Fuso hor\u00e1rio da Europa Ocidental", "WET", - "Fuso hor\u00e1rio de ver\u00e3o da Europa Ocidental", "WEST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Europa Ocidental", "WEST", + "Hor\u00E1rio da Europa Ocidental", "WET"}; String WIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Ocidental", "WIB", - "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Ocidental", "WIST"}; + "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Ocidental", "WIST", + "Hor\u00E1rio da Indon\u00E9sia Ocidental", "WIB"}; String WST_AUS[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Ocidental (Austr\u00E1lia)", "WST", - "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental (Austr\u00E1lia)", "WST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental (Austr\u00E1lia)", "WST", + "Hor\u00E1rio Ocidental (Austr\u00E1lia)", "WT"}; String SAMOA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Samoa", "SST", - "Hor\u00e1rio de luz natural de Samoa", "SDT"}; + "Hor\u00e1rio de luz natural de Samoa", "SDT", + "Hor\u00E1rio da Samoa", "ST"}; String WST_SAMOA[] = new String[] {"Fuso hor\u00e1rio de Samoa Ocidental", "WST", - "Fuso hor\u00e1rio de ver\u00e3o de Samoa Ocidental", "WSDT"}; + "Fuso hor\u00e1rio de ver\u00e3o de Samoa Ocidental", "WSDT", + "Fuso Hor\u00E1rio de Samoa Ocidental", "WST"}; String ChST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Chamorro", "ChST", - "Hor\u00e1rio de luz natural de Chamorro", "ChDT"}; + "Hor\u00e1rio de luz natural de Chamorro", "ChDT", + "Hor\u00E1rio de Chamorro", "ChT"}; String VICTORIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Victoria)", "EST", - "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Victoria)", "EST"}; + "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Victoria)", "EST", + "Hor\u00E1rio do Leste (Victoria)", "ET"}; String UTC[] = new String[] {"Tempo universal coordenado", "UTC", - "Tempo universal coordenado", "UTC"}; + "Tempo universal coordenado", "UTC", + "Hor\u00E1rio Universal Coordenado", "UTC"}; String UZT[] = new String[] {"Fuso hor\u00e1rio do Uzbequist\u00e3o", "UZT", - "Fuso hor\u00e1rio de ver\u00e3o do Uzbequist\u00e3o", "UZST"}; + "Fuso hor\u00e1rio de ver\u00e3o do Uzbequist\u00e3o", "UZST", + "Hor\u00E1rio do Uzbequist\u00E3o", "UZT"}; String WART[] = new String[] {"Fuso hor\u00e1rio da Argentina Ocidental", "WART", "Fuso hor\u00e1rio de ver\u00e3o da Argentina Ocidental", "WARST"}; @@ -311,7 +387,8 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"Fuso hor\u00e1rio do Paraguai", "PYT", - "Fuso hor\u00e1rio de ver\u00e3o do Paraguai", "PYST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Paraguai", "PYST", + "Hor\u00E1rio do Paraguai", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"Fuso hor\u00e1rio da Col\u00f4mbia", "COT", - "Fuso hor\u00e1rio de ver\u00e3o da Col\u00f4mbia", "COST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Col\u00f4mbia", "COST", + "Hor\u00E1rio da Col\u00F4mbia", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"Fuso hor\u00e1rio da Venezuela", "VET", - "Fuso hor\u00e1rio de ver\u00e3o da Venezuela", "VEST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Venezuela", "VEST", + "Hor\u00E1rio da Venezuela", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"Fuso hor\u00e1rio da Guiana Francesa", "GFT", - "Fuso hor\u00e1rio de ver\u00e3o da Guiana Francesa", "GFST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Guiana Francesa", "GFST", + "Hor\u00E1rio da Guiana Francesa", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"Fuso hor\u00e1rio da Groenl\u00e2ndia Ocidental", "WGT", - "Fuso hor\u00e1rio de ver\u00e3o da Groenl\u00e2ndia Ocidental", "WGST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Groenl\u00e2ndia Ocidental", "WGST", + "Hor\u00E1rio da Groenl\u00E2ndia Ocidental", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"Fuso hor\u00e1rio do Equador", "ECT", - "Fuso hor\u00e1rio de ver\u00e3o do Equador", "ECST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Equador", "ECST", + "Hor\u00E1rio do Equador", "ECT"}}, {"America/Guyana", new String[] {"Fuso hor\u00e1rio da Guiana", "GYT", - "Fuso hor\u00e1rio de ver\u00e3o da Guiana", "GYST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Guiana", "GYST", + "Hor\u00E1rios da Guiana", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"Fuso hor\u00e1rio da Bol\u00edvia", "BOT", - "Fuso hor\u00e1rio de ver\u00e3o da Bol\u00edvia", "BOST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Bol\u00edvia", "BOST", + "Hor\u00E1rio da Bol\u00EDvia", "BOT"}}, {"America/Lima", new String[] {"Fuso hor\u00e1rio do Peru", "PET", - "Fuso hor\u00e1rio de ver\u00e3o do Peru", "PEST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Peru", "PEST", + "Hor\u00E1rio do Peru", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"Hor\u00E1rio Padr\u00E3o de Metlakatla", "MeST", - "Hor\u00E1rio de Luz Natural de Metlakatla", "MeDT"}}, + "Hor\u00E1rio de Luz Natural de Metlakatla", "MeDT", + "Hor\u00E1rio de Metlakatla", "MeT"}}, {"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"}}, + "Hor\u00e1rio de luz natural de S\u00e3o Pedro e Miquelon", "PMDT", + "Hor\u00E1rio de Saint Pierre e Miquelon", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"Fuso hor\u00e1rio do Uruguai", "UYT", - "Fuso hor\u00e1rio de ver\u00e3o do Uruguai", "UYST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Uruguai", "UYST", + "Hor\u00E1rio do Uruguai", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"Fuso hor\u00e1rio do Suriname", "SRT", - "Fuso hor\u00e1rio de ver\u00e3o do Suriname", "SRST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Suriname", "SRST", + "Hor\u00E1rio do Suriname", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"Fuso hor\u00e1rio de Davis", "DAVT", - "Fuso hor\u00e1rio de ver\u00e3o de Davis", "DAVST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Davis", "DAVST", + "Hor\u00E1rio de Davis", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Fuso hor\u00e1rio de Dumont-d'Urville", "DDUT", - "Fuso hor\u00e1rio de ver\u00e3o de Dumont-d'Urville", "DDUST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Dumont-d'Urville", "DDUST", + "Fuso Hor\u00E1rio de Dumont-d'Urville", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"Fuso Hor\u00E1rio da Ilha de Macquarie", "MIST", - "Fuso Hor\u00E1rio de Ver\u00E3o da Ilha de Macquarie", "MIST"}}, + "Fuso Hor\u00E1rio de Ver\u00E3o da Ilha de Macquarie", "MIST", + "Fuso Hor\u00E1rio da Ilha de Macquarie", "MIST"}}, {"Antarctica/Mawson", new String[] {"Fuso hor\u00e1rio de Mawson", "MAWT", - "Fuso hor\u00e1rio de ver\u00e3o de Mawson", "MAWST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Mawson", "MAWST", + "Hor\u00E1rio de Mawson", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"Fuso hor\u00e1rio de Rothera", "ROTT", - "Fuso hor\u00e1rio de ver\u00e3o de Rothera", "ROTST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Rothera", "ROTST", + "Hor\u00E1rio de Rothera", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Fuso hor\u00e1rio de Syowa", "SYOT", - "Fuso hor\u00e1rio de ver\u00e3o de Syowa", "SYOST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Syowa", "SYOST", + "Hor\u00E1rio de Syowa", "SYOT"}}, {"Antarctica/Vostok", new String[] {"Fuso hor\u00e1rio de Vostok", "VOST", - "Fuso hor\u00e1rio de ver\u00e3o de Vostok", "VOSST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Vostok", "VOSST", + "Hor\u00E1rio de Vostok", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Fuso hor\u00e1rio de Alma-Ata", "ALMT", - "Fuso hor\u00e1rio de ver\u00e3o de Alma-Ata", "ALMST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Alma-Ata", "ALMST", + "Hor\u00E1rio de Alma-Ata", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"Fuso hor\u00e1rio de Anadyr", "ANAT", - "Fuso hor\u00e1rio de ver\u00e3o de Anadyr", "ANAST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Anadyr", "ANAST", + "Hor\u00E1rio de Anadyr", "ANAT"}}, {"Asia/Aqtau", new String[] {"Fuso hor\u00e1rio de Aqtau", "AQTT", - "Fuso hor\u00e1rio de ver\u00e3o de Aqtau", "AQTST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Aqtau", "AQTST", + "Hor\u00E1rio de Aqtau", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Fuso hor\u00e1rio de Aqtobe", "AQTT", - "Fuso hor\u00e1rio de ver\u00e3o de Aqtobe", "AQTST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Aqtobe", "AQTST", + "Hor\u00E1rio de Aqtobe", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"Fuso hor\u00e1rio do Azerbaij\u00e3o", "AZT", - "Fuso hor\u00e1rio de ver\u00e3o do Azerbaij\u00e3o", "AZST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Azerbaij\u00e3o", "AZST", + "Hor\u00E1rio do Azerbaij\u00E3o", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"Fuso hor\u00e1rio do Quirguist\u00e3o", "KGT", - "Fuso hor\u00e1rio de ver\u00e3o do Quirguist\u00e3o", "KGST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Quirguist\u00e3o", "KGST", + "Hor\u00E1rio do Quirguist\u00E3o", "KGT"}}, {"Asia/Brunei", new String[] {"Fuso hor\u00e1rio de Brunei", "BNT", - "Fuso hor\u00e1rio de ver\u00e3o de Brunei", "BNST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Brunei", "BNST", + "Hor\u00E1rio de Brunei", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Fuso hor\u00e1rio de Choibalsan", "CHOT", - "Fuso hor\u00e1rio de ver\u00e3o de Choibalsan", "CHOST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Choibalsan", "CHOST", + "Hor\u00E1rio de Choibalsan", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"Fuso hor\u00e1rio do Timor-Leste", "TLT", - "Fuso hor\u00e1rio de ver\u00e3o do Timor-Leste", "TLST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Timor-Leste", "TLST", + "Hor\u00E1rio do Timor-Leste", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"Fuso hor\u00e1rio do Tadjiquist\u00e3o", "TJT", - "Fuso hor\u00e1rio de ver\u00e3o do Tadjiquist\u00e3o", "TJST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Tadjiquist\u00e3o", "TJST", + "Hor\u00E1rio do Tadjiquist\u00E3o", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"Fuso hor\u00e1rio de Hovd", "HOVT", - "Fuso hor\u00e1rio de ver\u00e3o de Hovd", "HOVST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Hovd", "HOVST", + "Hor\u00E1rio de Hovd", "HOVT"}}, {"Asia/Irkutsk", new String[] {"Fuso hor\u00e1rio de Irkutsk", "IRKT", - "Fuso hor\u00e1rio de ver\u00e3o de Irkutsk", "IRKST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Irkutsk", "IRKST", + "Hor\u00E1rio de Irkutsk", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Oriental", "WIT", - "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Oriental", "EIST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Oriental", "EIST", + "Hor\u00E1rio da Indon\u00E9sia Oriental", "WIT"}}, {"Asia/Kabul", new String[] {"Fuso hor\u00e1rio do Afeganist\u00e3o", "AFT", - "Fuso hor\u00e1rio de ver\u00e3o do Afeganist\u00e3o", "AFST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Afeganist\u00e3o", "AFST", + "Hor\u00E1rio do Afeganist\u00E3o", "AFT"}}, {"Asia/Kamchatka", new String[] {"Fuso hor\u00e1rio de Petropavlovsk-Kamchatski", "PETT", - "Fuso hor\u00e1rio de ver\u00e3o de Petropavlovsk-Kamchatski", "PETST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Petropavlovsk-Kamchatski", "PETST", + "Hor\u00E1rio de Petropavlovsk-Kamchatski", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"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 Ver\u00E3o de Khandyga", "YAKST", + "Hor\u00E1rio de Khandyga", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"Fuso hor\u00e1rio de Krasnoyarsk", "KRAT", - "Fuso hor\u00e1rio de ver\u00e3o de Krasnoyarsk", "KRAST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Krasnoyarsk", "KRAST", + "Hor\u00E1rio de Krasnoyarsk", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Fuso hor\u00e1rio de Magadan", "MAGT", - "Fuso hor\u00e1rio de ver\u00e3o de Magadan", "MAGST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Magadan", "MAGST", + "Hor\u00E1rio de Magadan", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"Fuso hor\u00e1rio das Filipinas", "PHT", - "Fuso hor\u00e1rio de ver\u00e3o das Filipinas", "PHST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Filipinas", "PHST", + "Hor\u00E1rio das Filipinas", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Fuso hor\u00e1rio de Uralsk", "ORAT", - "Fuso hor\u00e1rio de ver\u00e3o de Uralsk", "ORAST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Uralsk", "ORAST", + "Hor\u00E1rio de Uralsk", "ORAT"}}, {"Asia/Omsk", new String[] {"Fuso hor\u00e1rio de Omsk", "OMST", - "Fuso hor\u00e1rio de ver\u00e3o de Omsk", "OMSST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Omsk", "OMSST", + "Hor\u00E1rio de Omsk", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Fuso hor\u00e1rio de Kizil-Orda", "QYZT", - "Fuso hor\u00e1rio de ver\u00e3o de Kizil-Orda", "QYZST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Kizil-Orda", "QYZST", + "Hor\u00E1rio de Qyzylorda", "QYZT"}}, {"Asia/Rangoon", new String[] {"Fuso hor\u00e1rio de Mianmar", "MMT", - "Fuso hor\u00e1rio de ver\u00e3o de Mianmar", "MMST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Mianmar", "MMST", + "Hor\u00E1rio de Mianmar", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"Fuso hor\u00e1rio de Sakhalina", "SAKT", - "Fuso hor\u00e1rio de ver\u00e3o de Sakhalina", "SAKST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Sakhalina", "SAKST", + "Hor\u00E1rio de Sakhalin", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"Fuso hor\u00e1rio da Ge\u00f3rgia", "GET", - "Fuso hor\u00e1rio de ver\u00e3o da Ge\u00f3rgia", "GEST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Ge\u00f3rgia", "GEST", + "Hor\u00E1rio da Ge\u00F3rgia", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"Hor\u00E1rio de Ust-Nera", "VLAT", - "Hor\u00E1rio de Ver\u00E3o de Ust-Nera", "VLAST"}}, + "Hor\u00E1rio de Ver\u00E3o de Ust-Nera", "VLAST", + "Hor\u00E1rio de Ust-Nera", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"Fuso hor\u00e1rio de Vladivostok", "VLAT", - "Fuso hor\u00e1rio de ver\u00e3o de Vladivostok", "VLAST"}}, + "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"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Yakutsk", "YAKST", + "Hor\u00E1rio de Yakutsk", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Fuso hor\u00e1rio de Yekaterinburgo", "YEKT", - "Fuso hor\u00e1rio de ver\u00e3o de Yekaterinburgo", "YEKST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Yekaterinburgo", "YEKST", + "Hor\u00E1rio de Yekaterinburg", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"Fuso hor\u00e1rio das A\u00e7ores", "AZOT", - "Fuso hor\u00e1rio de ver\u00e3o das A\u00e7ores", "AZOST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das A\u00e7ores", "AZOST", + "Hor\u00E1rio de A\u00E7ores", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"Fuso hor\u00e1rio de Cabo Verde", "CVT", - "Fuso hor\u00e1rio de ver\u00e3o de Cabo Verde", "CVST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Cabo Verde", "CVST", + "Hor\u00E1rio de Cabo Verde", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"Fuso hor\u00e1rio padr\u00e3o da Ge\u00f3rgia do Sul", "GST", - "Hor\u00e1rio de luz natural da Ge\u00f3rgia do Sul", "GDT"}}, + "Hor\u00e1rio de luz natural da Ge\u00f3rgia do Sul", "GDT", + "Hor\u00E1rio da Ge\u00F3rgia do Sul", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"Fuso hor\u00e1rio das Ilhas Falkland", "FKT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Falkland", "FKST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Falkland", "FKST", + "Hor\u00E1rio das Ilhas Malvinas", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"Fuso Hor\u00E1rio Ocidental Central (Austr\u00E1lia)", "CWST", - "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental Central (Austr\u00E1lia)", "CWST"}}, + "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental Central (Austr\u00E1lia)", "CWST", + "Hor\u00E1rio Ocidental Central (Austr\u00E1lia)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"Fuso hor\u00e1rio de Samara", "SAMT", - "Fuso hor\u00e1rio de ver\u00e3o de Samara", "SAMST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Samara", "SAMST", + "Hor\u00E1rio de Samara", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"Fuso hor\u00e1rio de Volgogrado", "VOLT", - "Fuso hor\u00e1rio de ver\u00e3o de Volgogrado", "VOLST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Volgogrado", "VOLST", + "Hor\u00E1rio de Volgogrado", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"Fuso hor\u00e1rio dos territ\u00f3rios do Oceano \u00cdndico", "IOT", - "Fuso hor\u00e1rio de ver\u00e3o dos territ\u00f3rios do Oceano \u00cdndico", "IOST"}}, + "Fuso hor\u00e1rio de ver\u00e3o dos territ\u00f3rios do Oceano \u00cdndico", "IOST", + "Hor\u00E1rio do Territ\u00F3rio do Oceano \u00CDndico", "IOT"}}, {"Indian/Christmas", new String[] {"Fuso hor\u00e1rio das Ilhas Christmas", "CXT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Christmas", "CXST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Christmas", "CXST", + "Hor\u00E1rio da Ilha Christmas", "CIT"}}, {"Indian/Cocos", new String[] {"Fuso hor\u00e1rio das Ilhas Cocos", "CCT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Cocos", "CCST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Cocos", "CCST", + "Hor\u00E1rio das Ilhas Cocos", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"Fuso hor\u00e1rio das Terras Austrais e Ant\u00e1rticas Francesas", "TFT", - "Fuso hor\u00e1rio de ver\u00e3o das Terras Austrais e Ant\u00e1rticas Francesas", "TFST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Terras Austrais e Ant\u00e1rticas Francesas", "TFST", + "Hor\u00E1rio do Territ\u00F3rio Franc\u00EAs no Sul da Ant\u00E1rtica", "TFT"}}, {"Indian/Mahe", new String[] {"Fuso hor\u00e1rio das Seychelles", "SCT", - "Fuso hor\u00e1rio de ver\u00e3o das Seychelles", "SCST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Seychelles", "SCST", + "Hor\u00E1rio de Seychelles", "SCT"}}, {"Indian/Maldives", new String[] {"Fuso hor\u00e1rio das Maldivas", "MVT", - "Fuso hor\u00e1rio de ver\u00e3o das Maldivas", "MVST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Maldivas", "MVST", + "Hor\u00E1rio das Maldivas", "MVT"}}, {"Indian/Mauritius", new String[] {"Fuso hor\u00e1rio das Ilhas Maur\u00edcio", "MUT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Maur\u00edcio", "MUST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Maur\u00edcio", "MUST", + "Hor\u00E1rio de Maur\u00EDcio", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"Fuso hor\u00e1rio de Reuni\u00e3o", "RET", - "Fuso hor\u00e1rio de ver\u00e3o de Reuni\u00e3o", "REST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Reuni\u00e3o", "REST", + "Hor\u00E1rio das Ilhas Reuni\u00E3o", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"Fuso hor\u00e1rio da Europa M\u00e9dia", "MET", - "Fuso hor\u00e1rio de ver\u00e3o da Europa M\u00e9dia", "MEST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Europa M\u00e9dia", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle { {"Pacific/Chuuk", TRUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"Fuso hor\u00e1rio de Vanuatu", "VUT", - "Fuso hor\u00e1rio de ver\u00e3o de Vanuatu", "VUST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Vanuatu", "VUST", + "Hor\u00E1rio de Vanuatu", "VUT"}}, {"Pacific/Enderbury", new String[] {"Fuso hor\u00e1rio das Ilhas F\u00e9nix", "PHOT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas F\u00e9nix", "PHOST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas F\u00e9nix", "PHOST", + "Hor\u00E1rio da Ilha Phoenix", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"Fuso hor\u00e1rio de Tokelau", "TKT", - "Fuso hor\u00e1rio de ver\u00e3o de Tokelau", "TKST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Tokelau", "TKST", + "Hor\u00E1rio de Toquelau", "TKT"}}, {"Pacific/Fiji", new String[] {"Fuso hor\u00e1rio de Fiji", "FJT", - "Fuso hor\u00e1rio de ver\u00e3o de Fiji", "FJST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Fiji", "FJST", + "Hor\u00E1rio de Fiji", "FJT"}}, {"Pacific/Funafuti", new String[] {"Fuso hor\u00e1rio de Tuvalu", "TVT", - "Fuso hor\u00e1rio de ver\u00e3o de Tuvalu", "TVST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Tuvalu", "TVST", + "Hor\u00E1rio de Tuvalu", "TVT"}}, {"Pacific/Galapagos", new String[] {"Fuso hor\u00e1rio das Ilhas Gal\u00e1pagos", "GALT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Gal\u00e1pagos", "GALST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Gal\u00e1pagos", "GALST", + "Hor\u00E1rio de Gal\u00E1pagos", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Fuso hor\u00e1rio das Esp\u00f3rades Equatoriais", "LINT", - "Fuso hor\u00e1rio de ver\u00e3o das Esp\u00f3rades Equatoriais", "LINST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Esp\u00f3rades Equatoriais", "LINST", + "Hor\u00E1rio das Ilhas Line", "LINT"}}, {"Pacific/Kosrae", new String[] {"Fuso hor\u00e1rio de Kosrae", "KOST", - "Fuso hor\u00e1rio de ver\u00e3o de Kosrae", "KOSST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Kosrae", "KOSST", + "Hor\u00E1rio de Kosrae", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"Fuso hor\u00e1rio das Ilhas Marquesas", "MART", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Marquesas", "MARST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Marquesas", "MARST", + "Hor\u00E1rio das Ilhas Marquesas", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"Fuso hor\u00e1rio de Nauru", "NRT", - "Fuso hor\u00e1rio de ver\u00e3o de Nauru", "NRST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Nauru", "NRST", + "Hor\u00E1rio de Nauru", "NRT"}}, {"Pacific/Niue", new String[] {"Fuso hor\u00e1rio de Niue", "NUT", - "Fuso hor\u00e1rio de ver\u00e3o de Niue", "NUST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Niue", "NUST", + "Hor\u00E1rio de Niue", "NUT"}}, {"Pacific/Norfolk", new String[] {"Fuso hor\u00e1rio da Ilha de Norfolk", "NFT", - "Fuso hor\u00e1rio de ver\u00e3o da Ilha de Norfolk", "NFST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Ilha de Norfolk", "NFST", + "Hor\u00E1rio de Norfolk", "NFT"}}, {"Pacific/Noumea", new String[] {"Fuso hor\u00e1rio da Nova Caled\u00f4nia", "NCT", - "Fuso hor\u00e1rio de ver\u00e3o da Nova Caled\u00f4nia", "NCST"}}, + "Fuso hor\u00e1rio de ver\u00e3o da Nova Caled\u00f4nia", "NCST", + "Hor\u00E1rio da Nova Caled\u00F4nia", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"Fuso hor\u00e1rio de Palau", "PWT", - "Fuso hor\u00e1rio de ver\u00e3o de Palau", "PWST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Palau", "PWST", + "Hor\u00E1rio de Palau", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"Fuso hor\u00e1rio de Papua-Nova Guin\u00e9", "PGT", - "Fuso hor\u00e1rio de ver\u00e3o de Papua-Nova Guin\u00e9", "PGST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Papua-Nova Guin\u00e9", "PGST", + "Hor\u00E1rio de Papua-Nova Guin\u00E9", "PGT"}}, {"Pacific/Rarotonga", new String[] {"Fuso hor\u00e1rio das Ilhas Cook", "CKT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Cook", "CKHST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Cook", "CKHST", + "Hor\u00E1rio das Ilhas Cook", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"Fuso hor\u00e1rio do Taiti", "TAHT", - "Fuso hor\u00e1rio de ver\u00e3o do Taiti", "TAHST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Taiti", "TAHST", + "Hor\u00E1rio do Tahiti", "TAHT"}}, {"Pacific/Tarawa", new String[] {"Fuso hor\u00e1rio das Ilhas Gilbert", "GILT", - "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Gilbert", "GILST"}}, + "Fuso hor\u00e1rio de ver\u00e3o das Ilhas Gilbert", "GILST", + "Hor\u00E1rio das Ilhas Gilbert", "GILT"}}, {"Pacific/Tongatapu", new String[] {"Fuso hor\u00e1rio de Tonga", "TOT", - "Fuso hor\u00e1rio de ver\u00e3o de Tonga", "TOST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Tonga", "TOST", + "Hor\u00E1rio de Tonga", "TOT"}}, {"Pacific/Truk", TRUT}, {"Pacific/Wake", new String[] {"Fuso hor\u00e1rio de Wake", "WAKT", - "Fuso hor\u00e1rio de ver\u00e3o de Wake", "WAKST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Wake", "WAKST", + "Hor\u00E1rio de Wake", "WAKT"}}, {"Pacific/Wallis", new String[] {"Fuso hor\u00e1rio de Wallis e Futuna", "WFT", - "Fuso hor\u00e1rio de ver\u00e3o de Wallis e Futuna", "WFST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Wallis e Futuna", "WFST", + "Hor\u00E1rio das Ilhas Wallis e Futuna", "WFT"}}, {"Pacific/Yap", TRUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java b/jdk/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java index 8d3c000005c..c0ec6e9e1c7 100644 --- a/jdk/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java +++ b/jdk/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Acre, normaltid", "ACT", - "Acre, sommartid", "ACST"}; + "Acre, sommartid", "ACST", + "Acre, normaltid", "ACT"}; String ADELAIDE[] = new String[] {"Central standardtid (Sydaustralien)", "CST", - "Central sommartid (South Australia)", "CST"}; + "Central sommartid (South Australia)", "CST", + "Central tid (Sydaustralien)", "CT"}; String AGT[] = new String[] {"Argentina, normaltid", "ART", - "Argentina, sommartid", "ARST"}; + "Argentina, sommartid", "ARST", + "Argentinsk tid", "ART"}; String AKST[] = new String[] {"Alaska, normaltid", "AKST", - "Alaska, sommartid", "AKDT"}; + "Alaska, sommartid", "AKDT", + "Alaskisk tid", "AKT"}; String AMT[] = new String[] {"Amazonas, normaltid", "AMT", - "Amazonas, sommartid", "AMST"}; + "Amazonas, sommartid", "AMST", + "Amazonas-tid", "AMT"}; String ARAST[] = new String[] {"Arabisk normaltid", "AST", - "Arabisk sommartid", "ADT"}; + "Arabisk sommartid", "ADT", + "Arabisk tid", "AT"}; String ARMT[] = new String[] {"Armenien, normaltid", "AMT", - "Armenien, sommartid", "AMST"}; + "Armenien, sommartid", "AMST", + "Armenisk tid", "AMT"}; String AST[] = new String[] {"Atlantisk normaltid", "AST", - "Atlantisk sommartid", "ADT"}; + "Atlantisk sommartid", "ADT", + "Atlantisk tid", "AT"}; String BDT[] = new String[] {"Bangladesh, normaltid", "BDT", - "Bangladesh, sommartid", "BDST"}; + "Bangladesh, sommartid", "BDST", + "Bangladeshisk tid", "BDT"}; String BRISBANE[] = new String[] {"\u00D6stlig standardtid (Queensland)", "EST", - "\u00D6stlig sommartid (Queensland)", "EST"}; - String BROKEN_HILL[] = new String[] {"Central standardtid (Sydaustralien)/New South Wales)", "CST", - "Central sommartid (South Australia/New South Wales)", "CST"}; + "\u00D6stlig sommartid (Queensland)", "EST", + "\u00D6stlig tid (Queensland)", "ET"}; + String BROKEN_HILL[] = new String[] {"Central standardtid (Sydaustralien/New South Wales)", "CST", + "Central sommartid (South Australia/New South Wales)", "CST", + "Central tid (Sydaustralien/New South Wales)", "CT"}; String BRT[] = new String[] {"Brasilien, normaltid", "BRT", - "Brasilien, sommartid", "BRST"}; + "Brasilien, sommartid", "BRST", + "Brasiliansk tid", "BRT"}; String BTT[] = new String[] {"Bhutan, normaltid", "BTT", - "Bhutan, sommartid", "BTST"}; + "Bhutan, sommartid", "BTST", + "Bhutanesisk tid", "BTT"}; String CAT[] = new String[] {"Centralafrikansk tid", "CAT", - "Centralafrikansk sommartid", "CAST"}; + "Centralafrikansk sommartid", "CAST", + "Centralafrikansk tid", "CAT"}; String CET[] = new String[] {"Centraleuropeisk tid", "CET", - "Centraleuropeisk sommartid", "CEST"}; + "Centraleuropeisk sommartid", "CEST", + "Centraleuropeisk tid", "CET"}; String CHAST[] = new String[] {"Chatham, normaltid", "CHAST", - "Chatham, sommartid", "CHADT"}; + "Chatham, sommartid", "CHADT", + "Chathams tid", "CHAT"}; String CHUT[] = new String[] {"Chuuk, normaltid", "CHUT", - "Chuuk, sommartid", "CHUST"}; + "Chuuk, sommartid", "CHUST", + "Chuuk, normaltid", "CHUT"}; String CIT[] = new String[] {"Centralindonesisk tid", "WITA", - "Centralindonesisk sommartid", "CIST"}; + "Centralindonesisk sommartid", "CIST", + "Centralindonesisk tid", "WITA"}; String CLT[] = new String[] {"Chile, normaltid", "CLT", - "Chile, sommartid", "CLST"}; + "Chile, sommartid", "CLST", + "Chilensk tid", "CLT"}; String CST[] = new String[] {"Central normaltid", "CST", - "Central sommartid", "CDT"}; + "Central sommartid", "CDT", + "Central tid", "CT"}; String CTT[] = new String[] {"Kina, normaltid", "CST", - "Kina, sommartid", "CDT"}; + "Kina, sommartid", "CDT", + "Kinesisk tid", "CT"}; String CUBA[] = new String[] {"Kuba, normaltid", "CST", - "Kuba, sommartid", "CDT"}; + "Kuba, sommartid", "CDT", + "Kubansk tid", "CT"}; String DARWIN[] = new String[] {"Central standardtid (Nordterritoriet)", "CST", - "Central sommartid (Nordterritoriet)", "CST"}; + "Central sommartid (Nordterritoriet)", "CST", + "Central tid (Nordterritoriet)", "CT"}; String DUBLIN[] = new String[] {"Greenwichtid", "GMT", - "Irland, sommartid", "IST"}; + "Irland, sommartid", "IST", + "Irl\u00E4ndsk tid", "IT"}; String EAT[] = new String[] {"\u00d6stafrikansk tid", "EAT", - "\u00d6stafrikansk sommartid", "EAST"}; + "\u00d6stafrikansk sommartid", "EAST", + "\u00D6stafrikansk tid", "EAT"}; String EASTER[] = new String[] {"P\u00e5sk\u00f6n, normaltid", "EAST", - "P\u00e5sk\u00f6n, sommartid", "EASST"}; + "P\u00e5sk\u00f6n, sommartid", "EASST", + "P\u00E5sk\u00F6n-tid", "EAST"}; String EET[] = new String[] {"\u00d6steuropeisk tid", "EET", - "\u00d6steuropeisk sommartid", "EEST"}; + "\u00d6steuropeisk sommartid", "EEST", + "\u00d6steuropeisk tid", "EET"}; String EGT[] = new String[] {"\u00d6stgr\u00f6nl\u00e4ndsk tid", "EGT", - "\u00d6stgr\u00f6nl\u00e4ndsk sommartid", "EGST"}; + "\u00d6stgr\u00f6nl\u00e4ndsk sommartid", "EGST", + "\u00D6stgr\u00F6nl\u00E4ndsk tid", "EGT"}; String EST[] = new String[] {"Eastern, normaltid", "EST", - "Eastern, sommartid", "EDT"}; + "Eastern, sommartid", "EDT", + "\u00D6stlig tid", "ET"}; String EST_NSW[] = new String[] {"\u00D6stlig standardtid (New South Wales)", "EST", - "\u00D6stlig sommartid (New South Wales)", "EST"}; + "\u00D6stlig sommartid (New South Wales)", "EST", + "\u00D6stlig tid (New South Wales)", "ET"}; String FET[] = new String[] {"Kaliningradtid", "FET", - "\u00D6steuropeisk sommartid", "FEST"}; + "\u00D6steuropeisk sommartid", "FEST", + "Kaliningradtid", "FET"}; String GHMT[] = new String[] {"Ghana, normaltid", "GMT", - "Ghana, sommartid", "GHST"}; + "Ghana, sommartid", "GHST", + "Ghana, normaltid", "GMT"}; String GAMBIER[] = new String[] {"Gambier, normaltid", "GAMT", - "Gambier, sommartid", "GAMST"}; + "Gambier, sommartid", "GAMST", + "Gambier\u00F6arna-tid", "GAMT"}; String GMT[] = new String[] {"Greenwichtid", "GMT", + "Greenwichtid", "GMT", "Greenwichtid", "GMT"}; String GMTBST[] = new String[] {"Greenwichtid", "GMT", - "Brittisk sommartid", "BST"}; + "Brittisk sommartid", "BST", + "Brittisk tid", "BT"}; String GST[] = new String[] {"Gulf-normaltid", "GST", - "Gulf-sommartid", "GDT"}; + "Gulf-sommartid", "GDT", + "Golfens tid", "GT"}; String HAST[] = new String[] {"Hawaii-Aleuterna, normaltid", "HAST", - "Hawaii-Aleuterna, sommartid", "HADT"}; + "Hawaii-Aleuterna, sommartid", "HADT", + "Hawaiiansk-aleutisk tid", "HAT"}; String HKT[] = new String[] {"Hong Kong, normaltid", "HKT", - "Hong Kong, sommartid", "HKST"}; + "Hong Kong, sommartid", "HKST", + "Hongkong-tid", "HKT"}; String HST[] = new String[] {"Hawaii, normaltid", "HST", - "Hawaii, sommartid", "HDT"}; + "Hawaii, sommartid", "HDT", + "Hawaiiansk tid", "HT"}; String ICT[] = new String[] {"Indokinesisk tid", "ICT", - "Indokinesisk sommartid", "ICST"}; + "Indokinesisk sommartid", "ICST", + "Indokinesisk tid", "ICT"}; String IRT[] = new String[] {"Iran, normaltid", "IRST", - "Iran, sommartid", "IRDT"}; + "Iran, sommartid", "IRDT", + "Iransk tid", "IRT"}; String ISRAEL[] = new String[] {"Israel, normaltid", "IST", - "Israel, sommartid", "IDT"}; + "Israel, sommartid", "IDT", + "Israelisk tid", "IT"}; String IST[] = new String[] {"Indien, normaltid", "IST", - "Indien, sommartid", "IDT"}; + "Indien, sommartid", "IDT", + "Indisk tid", "IT"}; String JST[] = new String[] {"Japan, normaltid", "JST", - "Japan, sommartid", "JDT"}; + "Japan, sommartid", "JDT", + "Japansk tid", "JT"}; String KST[] = new String[] {"Korea, normaltid", "KST", - "Korea, sommartid", "KDT"}; + "Korea, sommartid", "KDT", + "Koreansk tid", "KT"}; String LORD_HOWE[] = new String[] {"Lord Howe, normaltid", "LHST", - "Lord Howe, sommartid", "LHST"}; + "Lord Howe, sommartid", "LHST", + "Lord Howe-tid", "LHT"}; String MHT[] = new String[] {"Marshall\u00f6arna, normaltid", "MHT", - "Marshall\u00f6arna, sommartid", "MHST"}; + "Marshall\u00f6arna, sommartid", "MHST", + "Marshall\u00F6arna-tid", "MHT"}; String MSK[] = new String[] {"Moskva, normaltid", "MSK", - "Moskva, sommartid", "MSD"}; + "Moskva, sommartid", "MSD", + "Moskvas tid", "MT"}; String MST[] = new String[] {"Mountain, normaltid", "MST", - "Mountain, sommartid", "MDT"}; + "Mountain, sommartid", "MDT", + "Mountain-tid", "MT"}; String MYT[] = new String[] {"Malaysia, normaltid", "MYT", - "Malaysia, sommartid", "MYST"}; + "Malaysia, sommartid", "MYST", + "Malaysisk tid", "MYT"}; String NORONHA[] = new String[] {"Fernando de Noronha, normaltid", "FNT", - "Fernando de Noronha, sommartid", "FNST"}; + "Fernando de Noronha, sommartid", "FNST", + "Fernando de Noronha-tid", "FNT"}; String NOVT[] = new String[] {"Novosibirsk, normaltid", "NOVT", - "Novosibirsk, sommartid", "NOVST"}; + "Novosibirsk, sommartid", "NOVST", + "Sibirisk tid", "NOVT"}; String NPT[] = new String[] {"Nepal, normaltid", "NPT", - "Nepal, sommartid", "NPST"}; + "Nepal, sommartid", "NPST", + "Nepalesisk tid", "NPT"}; String NST[] = new String[] {"Newfoundland, normaltid", "NST", - "Newfoundland, sommartid", "NDT"}; + "Newfoundland, sommartid", "NDT", + "Newfoundl\u00E4ndsk tid", "NT"}; String NZST[] = new String[] {"Nya Zeeland, normaltid", "NZST", - "Nya Zeeland, sommartid", "NZDT"}; + "Nya Zeeland, sommartid", "NZDT", + "Nyzeel\u00E4ndsk tid", "NZT"}; String PITCAIRN[] = new String[] {"Pitcairn, normaltid", "PST", - "Pitcairn, sommartid", "PDT"}; + "Pitcairn, sommartid", "PDT", + "Pitcairn-tid", "PT"}; String PKT[] = new String[] {"Pakistan, normaltid", "PKT", - "Pakistan, sommartid", "PKST"}; + "Pakistan, sommartid", "PKST", + "Pakistansk tid", "PKT"}; String PONT[] = new String[] {"Pohnpei, normaltid", "PONT", - "Pohnpei, sommartid", "PONST"}; + "Pohnpei, sommartid", "PONST", + "Ponape-tid", "PONT"}; String PST[] = new String[] {"Stilla havet, normaltid", "PST", - "Stilla havet, sommartid", "PDT"}; + "Stilla havet, sommartid", "PDT", + "Stillahavet", "PT"}; String SAST[] = new String[] {"Sydafrika, normaltid", "SAST", - "Sydafrika, sommartid", "SAST"}; + "Sydafrika, sommartid", "SAST", + "Sydafrikansk tid", "SAT"}; String SBT[] = new String[] {"Salomon\u00f6arna, normaltid", "SBT", - "Salomon\u00f6arna, sommartid", "SBST"}; + "Salomon\u00f6arna, sommartid", "SBST", + "Salomon\u00F6arna-tid", "SBT"}; String SGT[] = new String[] {"Singapore, normaltid", "SGT", - "Singapore, sommartid", "SGST"}; + "Singapore, sommartid", "SGST", + "Singapore-tid", "SGT"}; String SLST[] = new String[] {"Greenwichtid", "GMT", - "Sierra Leone, sommartid", "SLST"}; + "Sierra Leone, sommartid", "SLST", + "Sierra Leone-tid", "SLT"}; String TASMANIA[] = new String[] {"\u00D6stlig standardtid (Tasmania)", "EST", - "\u00D6stlig sommartid (Tasmanien)", "EST"}; + "\u00D6stlig sommartid (Tasmanien)", "EST", + "\u00D6stlig tid (Tasmania)", "ET"}; String TMT[] = new String[] {"Turkmenistan, normaltid", "TMT", - "Turkmenistan, sommartid", "TMST"}; + "Turkmenistan, sommartid", "TMST", + "Turkmensk tid", "TMT"}; String ULAT[]= new String[] {"Ulaanbaatar, normaltid", "ULAT", - "Ulaanbaatar, sommartid", "ULAST"}; + "Ulaanbaatar, sommartid", "ULAST", + "Ulaanbaatar-tid", "ULAT"}; String WART[] = new String[] {"V\u00e4stargentina, normaltid", "WART", "V\u00e4stargentina, sommartid", "WARST"}; String WAT[] = new String[] {"V\u00e4stafrikansk tid", "WAT", - "V\u00e4stafrikansk sommartid", "WAST"}; + "V\u00e4stafrikansk sommartid", "WAST", + "V\u00E4stafrikansk tid", "WAT"}; String WET[] = new String[] {"V\u00e4steuropeisk tid", "WET", - "V\u00e4steuropeisk sommartid", "WEST"}; + "V\u00e4steuropeisk sommartid", "WEST", + "V\u00E4steuropeisk tid", "WET"}; String WIT[] = new String[] {"V\u00e4stindonesisk tid", "WIB", - "V\u00e4stindonesisk sommartid", "WIST"}; + "V\u00e4stindonesisk sommartid", "WIST", + "V\u00E4stindonesisk tid", "WIB"}; String WST_AUS[] = new String[] {"Western Standard Time (Australien)", "WST", - "V\u00E4stlig sommartid (Australien)", "WST"}; + "V\u00E4stlig sommartid (Australien)", "WST", + "V\u00E4stlig tid (Australien)", "WT"}; String SAMOA[] = new String[] {"Samoa, normaltid", "SST", - "Samoa, sommartid", "SDT"}; + "Samoa, sommartid", "SDT", + "Samoansk tid", "ST"}; String WST_SAMOA[] = new String[] {"V\u00e4stsamoansk tid", "WST", - "V\u00e4stsamoansk sommartid", "WSDT"}; + "V\u00e4stsamoansk sommartid", "WSDT", + "V\u00E4stsamoansk tid", "WST"}; String ChST[] = new String[] {"Chamorro, normaltid", "ChST", - "Chamorro, sommartid", "ChDT"}; + "Chamorro, sommartid", "ChDT", + "Chamorros tid", "ChT"}; String VICTORIA[] = new String[] {"\u00D6stlig standardtid (Victoria)", "EST", - "\u00D6stlig sommartid (Victoria)", "EST"}; + "\u00D6stlig sommartid (Victoria)", "EST", + "\u00D6stlig tid (Victoria)", "ET"}; String UTC[] = new String[] {"Koordinerad universell tid", "UTC", - "Koordinerad universell tid", "UTC"}; + "Koordinerad universell tid", "UTC", + "UTC (koordinerad v\u00E4rldstid)", "UTC"}; String UZT[] = new String[] {"Uzbekistan, normaltid", "UZT", - "Uzbekistan, sommartid", "UZST"}; + "Uzbekistan, sommartid", "UZST", + "Uzbekisk tid", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"Paraguay, normaltid", "PYT", - "Paraguay, sommartid", "PYST"}}, + "Paraguay, sommartid", "PYST", + "Paraguayansk tid", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"Colombia, normaltid", "COT", - "Colombia, sommartid", "COST"}}, + "Colombia, sommartid", "COST", + "Kolombiansk tid", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"Venezuela, normaltid", "VET", - "Venezuela, sommartid", "VEST"}}, + "Venezuela, sommartid", "VEST", + "Venezuelansk tid", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"Franska Guyana, normaltid", "GFT", - "Franska Guyana, sommartid", "GFST"}}, + "Franska Guyana, sommartid", "GFST", + "Franska Guyana-tid", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"V\u00e4stra Gr\u00f6nland, normaltid", "WGT", - "V\u00e4stra Gr\u00f6nland, sommartid", "WGST"}}, + "V\u00e4stra Gr\u00f6nland, sommartid", "WGST", + "V\u00E4stgr\u00F6nl\u00E4ndsk tid", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"Ecuador, normaltid", "ECT", - "Ecuador, sommartid", "ECST"}}, + "Ecuador, sommartid", "ECST", + "Ecuadoriansk tid", "ECT"}}, {"America/Guyana", new String[] {"Guyana, normaltid", "GYT", - "Guyana, sommartid", "GYST"}}, + "Guyana, sommartid", "GYST", + "Guyansk tid", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"Bolivia, normaltid", "BOT", - "Bolivia, sommartid", "BOST"}}, + "Bolivia, sommartid", "BOST", + "Boliviansk tid", "BOT"}}, {"America/Lima", new String[] {"Peru, normaltid", "PET", - "Peru, sommartid", "PEST"}}, + "Peru, sommartid", "PEST", + "Peruansk tid", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"Metlakatla, normaltid", "MeST", - "Metlakatla, sommartid", "MeDT"}}, + "Metlakatla, sommartid", "MeDT", + "Metlakatla-tid", "MeT"}}, {"America/Mexico_City", CST}, {"America/Miquelon", new String[] {"Saint-Pierre-et-Miquelon, normaltid", "PMST", - "Saint-Pierre-et-Miquelon, sommartid", "PMDT"}}, + "Saint-Pierre-et-Miquelon, sommartid", "PMDT", + "Saint-Pierre och Miquelons tid", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"Uruguay, normaltid", "UYT", - "Uruguay, sommartid", "UYST"}}, + "Uruguay, sommartid", "UYST", + "Uruguayansk tid", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"Surinam, normaltid", "SRT", - "Surinam, sommartid", "SRST"}}, + "Surinam, sommartid", "SRST", + "Surinamsk tid", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"Davis, normaltid", "DAVT", - "Davis, sommartid", "DAVST"}}, + "Davis, sommartid", "DAVST", + "Davis-tid", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville, normaltid", "DDUT", - "Dumont-d'Urville, sommartid", "DDUST"}}, + "Dumont-d'Urville, sommartid", "DDUST", + "Dumont-d'Urville-tid", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"Macquarie\u00F6n, normaltid", "MIST", - "Macquarie\u00F6n, sommartid", "MIST"}}, + "Macquarie\u00F6n, sommartid", "MIST", + "Macquarie\u00F6n, normaltid", "MIST"}}, {"Antarctica/Mawson", new String[] {"Mawson, normaltid", "MAWT", - "Mawson, sommartid", "MAWST"}}, + "Mawson, sommartid", "MAWST", + "Mawson-tid", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"Rothera, normaltid", "ROTT", - "Rothera, sommartid", "ROTST"}}, + "Rothera, sommartid", "ROTST", + "Rothera-tid", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Syowa, normaltid", "SYOT", - "Syowa, sommartid", "SYOST"}}, + "Syowa, sommartid", "SYOST", + "Syowa-tid", "SYOT"}}, {"Antarctica/Vostok", new String[] {"Vostok, normaltid", "VOST", - "Vostok, sommartid", "VOSST"}}, + "Vostok, sommartid", "VOSST", + "Vostok-tid", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Alma-Ata, normaltid", "ALMT", - "Alma-Ata, sommartid", "ALMST"}}, + "Alma-Ata, sommartid", "ALMST", + "Alma-Ata-tid", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"Anadyr, normaltid", "ANAT", - "Anadyr, sommartid", "ANAST"}}, + "Anadyr, sommartid", "ANAST", + "Anadyr-tid", "ANAT"}}, {"Asia/Aqtau", new String[] {"Aqtau, normaltid", "AQTT", - "Aqtau, sommartid", "AQTST"}}, + "Aqtau, sommartid", "AQTST", + "Aqtau-tid", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Aqtobe, normaltid", "AQTT", - "Aqtobe, sommartid", "AQTST"}}, + "Aqtobe, sommartid", "AQTST", + "Aqtobe-tid", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"Azerbajdzjan, normaltid", "AZT", - "Azerbajdzjan, sommartid", "AZST"}}, + "Azerbajdzjan, sommartid", "AZST", + "Azerbajdzjansk tid", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"Kirgizstan, normaltid", "KGT", - "Kirgizstan, sommartid", "KGST"}}, + "Kirgizstan, sommartid", "KGST", + "Kirgizisk tid", "KGT"}}, {"Asia/Brunei", new String[] {"Brunei, normaltid", "BNT", - "Brunei, sommartid", "BNST"}}, + "Brunei, sommartid", "BNST", + "Bruneisk tid", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Choibalsan, normaltid", "CHOT", - "Choibalsan, sommartid", "CHOST"}}, + "Choibalsan, sommartid", "CHOST", + "Choibalsan-tid", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"Timor-Leste, normaltid", "TLT", - "Timor-Leste, sommartid", "TLST"}}, + "Timor-Leste, sommartid", "TLST", + "\u00D6sttimor, normaltid", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"Tadzjikistan, normaltid", "TJT", - "Tadzjikistan, sommartid", "TJST"}}, + "Tadzjikistan, sommartid", "TJST", + "Tadzjikisk tid", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"Hovd, normaltid", "HOVT", - "Hovd, sommartid", "HOVST"}}, + "Hovd, sommartid", "HOVST", + "Hovd-tid", "HOVT"}}, {"Asia/Irkutsk", new String[] {"Irkutsk, normaltid", "IRKT", - "Irkutsk, sommartid", "IRKST"}}, + "Irkutsk, sommartid", "IRKST", + "Irkutsk-tid", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"\u00d6stindonesisk tid", "WIT", - "\u00d6stindonesisk sommartid", "EIST"}}, + "\u00d6stindonesisk sommartid", "EIST", + "\u00D6stindonesisk tid", "WIT"}}, {"Asia/Kabul", new String[] {"Afghanistan, normaltid", "AFT", - "Afghanistan, sommartid", "AFST"}}, + "Afghanistan, sommartid", "AFST", + "Afghansk tid", "AFT"}}, {"Asia/Kamchatka", new String[] {"Petropavlovsk-Kamtjatka, normaltid", "PETT", - "Petropavlovsk-Kamtjatka, sommartid", "PETST"}}, + "Petropavlovsk-Kamtjatka, sommartid", "PETST", + "Petropavlovsk-Kamtjatskij-tid", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, {"Asia/Khandyga", new String[] {"Khandyga, normaltid", "YAKT", - "Khandyga, sommartid", "YAKST"}}, + "Khandyga, sommartid", "YAKST", + "Khandyga, normaltid", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"Krasnojarsk, normaltid", "KRAT", - "Krasnojarsk, sommartid", "KRAST"}}, + "Krasnojarsk, sommartid", "KRAST", + "Krasnojarsk-tid", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Magadan, normaltid", "MAGT", - "Magadan, sommartid", "MAGST"}}, + "Magadan, sommartid", "MAGST", + "Magadan-tid", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"Filippinerna, normaltid", "PHT", - "Filippinerna, sommartid", "PHST"}}, + "Filippinerna, sommartid", "PHST", + "Filippinsk tid", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Oral, normaltid", "ORAT", - "Oral, sommartid", "ORAST"}}, + "Oral, sommartid", "ORAST", + "Oral-tid", "ORAT"}}, {"Asia/Omsk", new String[] {"Omsk, normaltid", "OMST", - "Omsk, sommartid", "OMSST"}}, + "Omsk, sommartid", "OMSST", + "Omsk-tid", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Qyzylorda, normaltid", "QYZT", - "Qyzylorda, sommartid", "QYZST"}}, + "Qyzylorda, sommartid", "QYZST", + "Qyzylorda-tid", "QYZT"}}, {"Asia/Rangoon", new String[] {"Myanmar, normaltid", "MMT", - "Myanmar, sommartid", "MMST"}}, + "Myanmar, sommartid", "MMST", + "Myanmar-tid", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"Sakhalin, normaltid", "SAKT", - "Sakhalin, sommartid", "SAKST"}}, + "Sakhalin, sommartid", "SAKST", + "Sakhalin-tid", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"Georgien, normaltid", "GET", - "Georgien, sommartid", "GEST"}}, + "Georgien, sommartid", "GEST", + "Georgisk tid", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"Ust-Nera, normaltid", "VLAT", - "Ust-Nera, sommartid", "VLAST"}}, + "Ust-Nera, sommartid", "VLAST", + "Ust-Nera, normaltid", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"Vladivostok, normaltid", "VLAT", - "Vladivostok, sommartid", "VLAST"}}, + "Vladivostok, sommartid", "VLAST", + "Vladivostok-tid", "VLAT"}}, {"Asia/Yakutsk", new String[] {"Jakutsk, normaltid", "YAKT", - "Jakutsk, sommartid", "YAKST"}}, + "Jakutsk, sommartid", "YAKST", + "Jakutsk-tid", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Jekaterinburg, normaltid", "YEKT", - "Jekaterinburg, sommartid", "YEKST"}}, + "Jekaterinburg, sommartid", "YEKST", + "Jekaterinburg-tid", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"Azorerna, normaltid", "AZOT", - "Azorerna, sommartid", "AZOST"}}, + "Azorerna, sommartid", "AZOST", + "Azorerna-tid", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"Kap Verde, normaltid", "CVT", - "Kap Verde, sommartid", "CVST"}}, + "Kap Verde, sommartid", "CVST", + "Kap Verde-tid", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"Sydgeorgien, normaltid", "GST", - "Sydgeorgien, sommartid", "GDT"}}, + "Sydgeorgien, sommartid", "GDT", + "Sydgeorgisk tid", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"Falklands\u00f6arna, normaltid", "FKT", - "Falklands\u00f6arna, sommartid", "FKST"}}, + "Falklands\u00f6arna, sommartid", "FKST", + "Falklands\u00F6arna-tid", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"Central v\u00E4stlig normaltid (Australien)", "CWST", - "Central v\u00E4stlig sommartid (Australien)", "CWST"}}, + "Central v\u00E4stlig sommartid (Australien)", "CWST", + "Central v\u00E4stlig tid (Australien)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"Samara, normaltid", "SAMT", - "Samara, sommartid", "SAMST"}}, + "Samara, sommartid", "SAMST", + "Samara-tid", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"Volgograd-tid", "VOLT", - "Volgograd, sommartid", "VOLST"}}, + "Volgograd, sommartid", "VOLST", + "Volgograd, normaltid", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"Indiska oceanen, normaltid", "IOT", - "Indiska oceanen, sommartid", "IOST"}}, + "Indiska oceanen, sommartid", "IOST", + "Indiska Ocean\u00F6arna-tid", "IOT"}}, {"Indian/Christmas", new String[] {"Jul\u00f6n, normaltid", "CXT", - "Jul\u00f6n, sommartid", "CXST"}}, + "Jul\u00f6n, sommartid", "CXST", + "Jul\u00F6n-tid", "CIT"}}, {"Indian/Cocos", new String[] {"Cocos-Keeling\u00f6arna, normaltid", "CCT", - "Cocos-Keeling\u00f6arna, sommartid", "CCST"}}, + "Cocos-Keeling\u00f6arna, sommartid", "CCST", + "Kokos\u00F6arna-tid", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"Franska s\u00f6dra och antarktiska omr\u00e5dena, normaltid", "TFT", - "Franska s\u00f6dra och antarktiska omr\u00e5dena, sommartid", "TFST"}}, + "Franska s\u00f6dra och antarktiska omr\u00e5dena, sommartid", "TFST", + "Franska s\u00F6dra och antarktiska \u00F6arna-tid", "TFT"}}, {"Indian/Mahe", new String[] {"Seychellerna, normaltid", "SCT", - "Seychellerna, sommartid", "SCST"}}, + "Seychellerna, sommartid", "SCST", + "Seychellisk tid", "SCT"}}, {"Indian/Maldives", new String[] {"Maldiverna, normaltid", "MVT", - "Maldiverna, sommartid", "MVST"}}, + "Maldiverna, sommartid", "MVST", + "Maldivisk tid", "MVT"}}, {"Indian/Mauritius", new String[] {"Mauritius, normaltid", "MUT", - "Mauritius, sommartid", "MUST"}}, + "Mauritius, sommartid", "MUST", + "Mauritiansk tid", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"Reunion, normaltid", "RET", - "Reunion, sommartid", "REST"}}, + "Reunion, sommartid", "REST", + "Reunion-tid", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"Mellaneuropeisk tid", "MET", - "Mellaneuropeisk sommartid", "MEST"}}, + "Mellaneuropeisk sommartid", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"Vanuatu, normaltid", "VUT", - "Vanuatu, sommartid", "VUST"}}, + "Vanuatu, sommartid", "VUST", + "Vanuatu-tid", "VUT"}}, {"Pacific/Enderbury", new String[] {"Phoenix-\u00f6arna, normaltid", "PHOT", - "Phoenix-\u00f6arna, sommartid", "PHOST"}}, + "Phoenix-\u00f6arna, sommartid", "PHOST", + "Phoenix\u00F6arna-tid", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"Tokelau, normaltid", "TKT", - "Tokelau, sommartid", "TKST"}}, + "Tokelau, sommartid", "TKST", + "Tokelau-tid", "TKT"}}, {"Pacific/Fiji", new String[] {"Fiji, normaltid", "FJT", - "Fiji, sommartid", "FJST"}}, + "Fiji, sommartid", "FJST", + "Fijiansk tid", "FJT"}}, {"Pacific/Funafuti", new String[] {"Tuvalu, normaltid", "TVT", - "Tuvalu, sommartid", "TVST"}}, + "Tuvalu, sommartid", "TVST", + "Tuvalu-tid", "TVT"}}, {"Pacific/Galapagos", new String[] {"Galapagos, normaltid", "GALT", - "Galapagos, sommartid", "GALST"}}, + "Galapagos, sommartid", "GALST", + "Galapagos-tid", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Line-\u00f6arna, normaltid", "LINT", - "Line-\u00f6arna, sommartid", "LINST"}}, + "Line-\u00f6arna, sommartid", "LINST", + "Line Islands-tid", "LINT"}}, {"Pacific/Kosrae", new String[] {"Kosrae, normaltid", "KOST", - "Kosrae, sommartid", "KOSST"}}, + "Kosrae, sommartid", "KOSST", + "Kosrae-tid", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"Marquesas, normaltid", "MART", - "Marquesas, sommartid", "MARST"}}, + "Marquesas, sommartid", "MARST", + "Marquesas\u00F6arna-tid", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"Nauru, normaltid", "NRT", - "Nauru, sommartid", "NRST"}}, + "Nauru, sommartid", "NRST", + "Nauruansk tid", "NRT"}}, {"Pacific/Niue", new String[] {"Niue, normaltid", "NUT", - "Niue, sommartid", "NUST"}}, + "Niue, sommartid", "NUST", + "Niue-tid", "NUT"}}, {"Pacific/Norfolk", new String[] {"Norfolk, normaltid", "NFT", - "Norfolk, sommartid", "NFST"}}, + "Norfolk, sommartid", "NFST", + "Norfolk-tid", "NFT"}}, {"Pacific/Noumea", new String[] {"Nya Caledonien, normaltid", "NCT", - "Nya Caledonien, sommartid", "NCST"}}, + "Nya Caledonien, sommartid", "NCST", + "Nya Kaledonien-tid", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"Palau, normaltid", "PWT", - "Palau, sommartid", "PWST"}}, + "Palau, sommartid", "PWST", + "Palau-tid", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"Papua Nya Guinea, normaltid", "PGT", - "Papua Nya Guinea, sommartid", "PGST"}}, + "Papua Nya Guinea, sommartid", "PGST", + "Papua Nya Guinea-tid", "PGT"}}, {"Pacific/Rarotonga", new String[] {"Cook\u00f6arna, normaltid", "CKT", - "Cook\u00f6arna, sommartid", "CKHST"}}, + "Cook\u00f6arna, sommartid", "CKHST", + "Cook\u00F6arna-tid", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"Tahiti, normaltid", "TAHT", - "Tahiti, sommartid", "TAHST"}}, + "Tahiti, sommartid", "TAHST", + "Tahiti-tid", "TAHT"}}, {"Pacific/Tarawa", new String[] {"Gilbert\u00f6arna, normaltid", "GILT", - "Gilbert\u00f6arna, sommartid", "GILST"}}, + "Gilbert\u00f6arna, sommartid", "GILST", + "Gilbert\u00F6arna-tid", "GILT"}}, {"Pacific/Tongatapu", new String[] {"Tonga, normaltid", "TOT", - "Tonga, sommartid", "TOST"}}, + "Tonga, sommartid", "TOST", + "Tonga-tid", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"Wake, normaltid", "WAKT", - "Wake, sommartid", "WAKST"}}, + "Wake, sommartid", "WAKST", + "Wake-tid", "WAKT"}}, {"Pacific/Wallis", new String[] {"Wallis & Futuna, normaltid", "WFT", - "Wallis & Futuna, sommartid", "WFST"}}, + "Wallis & Futuna, sommartid", "WFST", + "Wallis- och Futuna\u00F6arna-tid", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java b/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java index 9bf8d1b3362..7f79e9612bd 100644 --- a/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java +++ b/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Acre \u65f6\u95f4", "ACT", - "Acre \u590f\u4ee4\u65f6", "ACST"}; + "Acre \u590f\u4ee4\u65f6", "ACST", + "Acre \u65f6\u95f4", "ACT"}; String ADELAIDE[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST", - "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST"}; + "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST", + "\u4E2D\u90E8\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CT"}; String AGT[] = new String[] {"\u963f\u6839\u5ef7\u65f6\u95f4", "ART", - "\u963f\u6839\u5ef7\u590f\u4ee4\u65f6", "ARST"}; + "\u963f\u6839\u5ef7\u590f\u4ee4\u65f6", "ARST", + "\u963F\u6839\u5EF7\u65F6\u95F4", "ART"}; String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6807\u51c6\u65f6\u95f4", "AKST", - "\u963f\u62c9\u65af\u52a0\u590f\u4ee4\u65f6", "AKDT"}; + "\u963f\u62c9\u65af\u52a0\u590f\u4ee4\u65f6", "AKDT", + "\u963F\u62C9\u65AF\u52A0\u65F6\u95F4", "AKT"}; String AMT[] = new String[] {"\u4e9a\u9a6c\u900a\u65f6\u95f4", "AMT", - "\u4e9a\u9a6c\u900a\u590f\u4ee4\u65f6", "AMST"}; + "\u4e9a\u9a6c\u900a\u590f\u4ee4\u65f6", "AMST", + "\u4E9A\u9A6C\u900A\u65F6\u95F4", "AMT"}; String ARAST[] = new String[] {"\u963f\u62c9\u4f2f\u6807\u51c6\u65f6\u95f4", "AST", - "\u963f\u62c9\u4f2f\u590f\u4ee4\u65f6", "ADT"}; + "\u963f\u62c9\u4f2f\u590f\u4ee4\u65f6", "ADT", + "\u963F\u62C9\u4F2F\u534A\u5C9B\u65F6\u95F4", "AT"}; String ARMT[] = new String[] {"\u4e9a\u7f8e\u5c3c\u4e9a\u65f6\u95f4", "AMT", - "\u4e9a\u7f8e\u5c3c\u4e9a\u590f\u4ee4\u65f6", "AMST"}; + "\u4e9a\u7f8e\u5c3c\u4e9a\u590f\u4ee4\u65f6", "AMST", + "\u4E9A\u7F8E\u5C3C\u4E9A\u65F6\u95F4", "AMT"}; String AST[] = new String[] {"\u5927\u897f\u6d0b\u6807\u51c6\u65f6\u95f4", "AST", - "\u5927\u897f\u6d0b\u590f\u4ee4\u65f6", "ADT"}; + "\u5927\u897f\u6d0b\u590f\u4ee4\u65f6", "ADT", + "\u5927\u897F\u6D0B\u65F6\u95F4", "AT"}; String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u65f6\u95f4", "BDT", - "\u5b5f\u52a0\u62c9\u590f\u4ee4\u65f6", "BDST"}; + "\u5b5f\u52a0\u62c9\u590f\u4ee4\u65f6", "BDST", + "\u5B5F\u52A0\u62C9\u65F6\u95F4", "BDT"}; String BRISBANE[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u6606\u58EB\u5170)", "EST", - "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u6606\u58EB\u5170)", "EST"}; + "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u6606\u58EB\u5170)", "EST", + "\u4E1C\u90E8\u65F6\u95F4 (\u6606\u58EB\u5170)", "ET"}; String BROKEN_HILL[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST", - "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST"}; + "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST", + "\u4E2D\u90E8\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CT"}; String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9a\u65f6\u95f4", "BRT", - "\u5df4\u897f\u5229\u4e9a\u590f\u4ee4\u65f6", "BRST"}; + "\u5df4\u897f\u5229\u4e9a\u590f\u4ee4\u65f6", "BRST", + "\u5DF4\u897F\u5229\u4E9A\u65F6\u95F4", "BRT"}; String BTT[] = new String[] {"\u4e0d\u4e39\u65f6\u95f4", "BTT", - "\u4e0d\u4e39\u590f\u4ee4\u65f6", "BTST"}; + "\u4e0d\u4e39\u590f\u4ee4\u65f6", "BTST", + "\u4E0D\u4E39\u65F6\u95F4", "BTT"}; String CAT[] = new String[] {"\u4e2d\u975e\u65f6\u95f4", "CAT", - "\u4e2d\u975e\u590f\u4ee4\u65f6", "CAST"}; + "\u4e2d\u975e\u590f\u4ee4\u65f6", "CAST", + "\u4E2D\u975E\u65F6\u95F4", "CAT"}; String CET[] = new String[] {"\u4e2d\u6b27\u65f6\u95f4", "CET", - "\u4e2d\u6b27\u590f\u4ee4\u65f6", "CEST"}; + "\u4e2d\u6b27\u590f\u4ee4\u65f6", "CEST", + "\u4E2D\u6B27\u65F6\u95F4", "CET"}; String CHAST[] = new String[] {"\u67e5\u8428\u59c6\u6807\u51c6\u65f6\u95f4", "CHAST", - "\u67e5\u8428\u59c6\u590f\u4ee4\u65f6", "CHADT"}; + "\u67e5\u8428\u59c6\u590f\u4ee4\u65f6", "CHADT", + "\u67E5\u5854\u59C6\u65F6\u95F4", "CHAT"}; String CHUT[] = new String[] {"\u4E18\u514B\u65F6\u95F4", "CHUT", - "\u4E18\u514B\u590F\u4EE4\u65F6", "CHUST"}; + "\u4E18\u514B\u590F\u4EE4\u65F6", "CHUST", + "\u4E18\u514B\u65F6\u95F4", "CHUT"}; String CIT[] = new String[] {"\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WITA", - "\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "CIST"}; + "\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "CIST", + "\u4E2D\u90E8\u5370\u5EA6\u5C3C\u897F\u4E9A\u65F6\u95F4", "WITA"}; String CLT[] = new String[] {"\u667a\u5229\u65f6\u95f4", "CLT", - "\u667a\u5229\u590f\u4ee4\u65f6", "CLST"}; + "\u667a\u5229\u590f\u4ee4\u65f6", "CLST", + "\u667A\u5229\u65F6\u95F4", "CLT"}; String CST[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4", "CST", - "\u4e2d\u592e\u590f\u4ee4\u65f6", "CDT"}; + "\u4e2d\u592e\u590f\u4ee4\u65f6", "CDT", + "\u4E2D\u90E8\u65F6\u95F4", "CT"}; String CTT[] = new String[] {"\u4e2d\u56fd\u6807\u51c6\u65f6\u95f4", "CST", - "\u4e2d\u56fd\u590f\u4ee4\u65f6", "CDT"}; + "\u4e2d\u56fd\u590f\u4ee4\u65f6", "CDT", + "\u4E2D\u56FD\u65F6\u95F4", "CT"}; String CUBA[] = new String[] {"\u53e4\u5df4\u6807\u51c6\u65f6\u95f4", "CST", - "\u53e4\u5df4\u590f\u4ee4\u65f6", "CDT"}; + "\u53e4\u5df4\u590f\u4ee4\u65f6", "CDT", + "\u53E4\u5DF4\u65F6\u95F4", "CT"}; String DARWIN[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5317\u9886\u5730)", "CST", - "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5317\u9886\u5730)", "CST"}; + "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5317\u9886\u5730)", "CST", + "\u4E2D\u90E8\u65F6\u95F4 (\u5317\u90E8\u5730\u533A)", "CT"}; String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", - "\u7231\u5c14\u5170\u590f\u4ee4\u65f6", "IST"}; + "\u7231\u5c14\u5170\u590f\u4ee4\u65f6", "IST", + "\u7231\u5C14\u5170\u65F6\u95F4", "IT"}; String EAT[] = new String[] {"\u4e1c\u975e\u65f6\u95f4", "EAT", - "\u4e1c\u975e\u590f\u4ee4\u65f6", "EAST"}; + "\u4e1c\u975e\u590f\u4ee4\u65f6", "EAST", + "\u4E1C\u975E\u65F6\u95F4", "EAT"}; String EASTER[] = new String[] {"\u590d\u6d3b\u5c9b\u65f6\u95f4", "EAST", - "\u590d\u6d3b\u5c9b\u590f\u4ee4\u65f6", "EASST"}; + "\u590d\u6d3b\u5c9b\u590f\u4ee4\u65f6", "EASST", + "\u590D\u6D3B\u5C9B\u65F6\u95F4", "EAST"}; String EET[] = new String[] {"\u4e1c\u6b27\u65f6\u95f4", "EET", - "\u4e1c\u6b27\u590f\u4ee4\u65f6", "EEST"}; + "\u4e1c\u6b27\u590f\u4ee4\u65f6", "EEST", + "\u4e1c\u6b27\u65f6\u95f4", "EET"}; String EGT[] = new String[] {"\u4e1c\u683c\u6797\u5c9b\u65f6\u95f4", "EGT", - "\u4e1c\u683c\u6797\u5c9b\u590f\u4ee4\u65f6", "EGST"}; + "\u4e1c\u683c\u6797\u5c9b\u590f\u4ee4\u65f6", "EGST", + "\u4E1C\u683C\u6797\u5C9B\u65F6\u95F4", "EGT"}; String EST[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4", "EST", - "\u4e1c\u90e8\u590f\u4ee4\u65f6", "EDT"}; + "\u4e1c\u90e8\u590f\u4ee4\u65f6", "EDT", + "\u4E1C\u90E8\u65F6\u95F4", "ET"}; String EST_NSW[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST", - "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST"}; + "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST", + "\u4E1C\u90E8\u65F6\u95F4 (\u65B0\u5357\u5A01\u5C14\u65AF)", "ET"}; String FET[] = new String[] {"\u8FDC\u4E1C\u6B27\u65F6\u95F4", "FET", - "\u8FDC\u4E1C\u6B27\u590F\u4EE4\u65F6", "FEST"}; + "\u8FDC\u4E1C\u6B27\u590F\u4EE4\u65F6", "FEST", + "\u8FDC\u4E1C\u6B27\u65F6\u95F4", "FET"}; String GHMT[] = new String[] {"\u52a0\u7eb3\u65f6\u95f4", "GMT", - "\u52a0\u7eb3\u590f\u4ee4\u65f6", "GHST"}; + "\u52a0\u7eb3\u590f\u4ee4\u65f6", "GHST", + "\u52A0\u7EB3\u65F6\u95F4", "GMT"}; String GAMBIER[] = new String[] {"\u5188\u6bd4\u4e9a\u65f6\u95f4", "GAMT", - "\u5188\u6bd4\u4e9a\u590f\u4ee4\u65f6", "GAMST"}; + "\u5188\u6bd4\u4e9a\u590f\u4ee4\u65f6", "GAMST", + "\u5188\u6BD4\u4E9A\u65F6\u95F4", "GAMT"}; String GMT[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", - "\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT"}; + "\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", + "\u683C\u6797\u5A01\u6CBB\u65F6\u95F4", "GMT"}; String GMTBST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", - "\u82f1\u56fd\u590f\u4ee4\u65f6", "BST"}; + "\u82f1\u56fd\u590f\u4ee4\u65f6", "BST", + "\u82F1\u56FD\u65F6\u95F4", "BT"}; String GST[] = new String[] {"\u6ce2\u65af\u6e7e\u6807\u51c6\u65f6\u95f4", "GST", - "\u6ce2\u65af\u6e7e\u590f\u4ee4\u65f6", "GDT"}; + "\u6ce2\u65af\u6e7e\u590f\u4ee4\u65f6", "GDT", + "\u6D77\u6E7E\u65F6\u95F4", "GT"}; String HAST[] = new String[] {"\u590f\u5a01\u5937-\u963f\u7559\u7533\u7fa4\u5c9b\u6807\u51c6\u65f6\u95f4", "HAST", - "\u590f\u5a01\u5937-\u963f\u7559\u7533\u7fa4\u5c9b\u590f\u4ee4\u65f6", "HADT"}; + "\u590f\u5a01\u5937-\u963f\u7559\u7533\u7fa4\u5c9b\u590f\u4ee4\u65f6", "HADT", + "\u590F\u5A01\u5937-\u963F\u7559\u7533\u65F6\u95F4", "HAT"}; String HKT[] = new String[] {"\u9999\u6e2f\u65f6\u95f4", "HKT", - "\u9999\u6e2f\u590f\u4ee4\u65f6", "HKST"}; + "\u9999\u6e2f\u590f\u4ee4\u65f6", "HKST", + "\u9999\u6E2F\u65F6\u95F4", "HKT"}; String HST[] = new String[] {"\u590f\u5a01\u5937\u6807\u51c6\u65f6\u95f4", "HST", - "\u590f\u5a01\u5937\u590f\u4ee4\u65f6", "HDT"}; + "\u590f\u5a01\u5937\u590f\u4ee4\u65f6", "HDT", + "\u590F\u5A01\u5937\u65F6\u95F4", "HT"}; String ICT[] = new String[] {"\u5370\u5ea6\u652f\u90a3\u65f6\u95f4", "ICT", - "\u5370\u5ea6\u652f\u90a3\u590f\u4ee4\u65f6", "ICST"}; + "\u5370\u5ea6\u652f\u90a3\u590f\u4ee4\u65f6", "ICST", + "\u5370\u5EA6\u652F\u90A3\u65F6\u95F4", "ICT"}; String IRT[] = new String[] {"\u4f0a\u6717\u6807\u51c6\u65f6\u95f4", "IRST", - "\u4f0a\u6717\u590f\u4ee4\u65f6", "IRDT"}; + "\u4f0a\u6717\u590f\u4ee4\u65f6", "IRDT", + "\u4F0A\u6717\u65F6\u95F4", "IRT"}; String ISRAEL[] = new String[] {"\u4ee5\u8272\u5217\u6807\u51c6\u65f6\u95f4", "IST", - "\u4ee5\u8272\u5217\u590f\u4ee4\u65f6", "IDT"}; + "\u4ee5\u8272\u5217\u590f\u4ee4\u65f6", "IDT", + "\u4EE5\u8272\u5217\u65F6\u95F4", "IT"}; String IST[] = new String[] {"\u5370\u5ea6\u6807\u51c6\u65f6\u95f4", "IST", - "\u5370\u5ea6\u590f\u4ee4\u65f6", "IDT"}; + "\u5370\u5ea6\u590f\u4ee4\u65f6", "IDT", + "\u5370\u5EA6\u65F6\u95F4", "IT"}; String JST[] = new String[] {"\u65e5\u672c\u6807\u51c6\u65f6\u95f4", "JST", - "\u65e5\u672c\u590f\u4ee4\u65f6", "JDT"}; + "\u65e5\u672c\u590f\u4ee4\u65f6", "JDT", + "\u65E5\u672C\u65F6\u95F4", "JT"}; String KST[] = new String[] {"\u97e9\u56fd\u6807\u51c6\u65f6\u95f4", "KST", - "\u97e9\u56fd\u590f\u4ee4\u65f6", "KDT"}; + "\u97e9\u56fd\u590f\u4ee4\u65f6", "KDT", + "\u97E9\u56FD\u65F6\u95F4", "KT"}; String LORD_HOWE[] = new String[] {"\u8c6a\u516c\u6807\u51c6\u65f6\u95f4", "LHST", - "\u8c6a\u516c\u590f\u4ee4\u65f6", "LHST"}; + "\u8c6a\u516c\u590f\u4ee4\u65f6", "LHST", + "\u8C6A\u516C\u65F6\u95F4", "LHT"}; String MHT[] = new String[] {"\u9a6c\u7ecd\u5c14\u7fa4\u5c9b\u65f6\u95f4", "MHT", - "\u9a6c\u7ecd\u5c14\u7fa4\u5c9b\u590f\u4ee4\u65f6", "MHST"}; + "\u9a6c\u7ecd\u5c14\u7fa4\u5c9b\u590f\u4ee4\u65f6", "MHST", + "\u9A6C\u7ECD\u5C14\u7FA4\u5C9B\u65F6\u95F4", "MHT"}; String MSK[] = new String[] {"\u83ab\u65af\u79d1\u6807\u51c6\u65f6\u95f4", "MSK", - "\u83ab\u65af\u79d1\u590f\u4ee4\u65f6", "MSD"}; + "\u83ab\u65af\u79d1\u590f\u4ee4\u65f6", "MSD", + "\u83AB\u65AF\u79D1\u65F6\u95F4", "MT"}; String MST[] = new String[] {"Mountain \u6807\u51c6\u65f6\u95f4", "MST", - "Mountain \u590f\u4ee4\u65f6", "MDT"}; + "Mountain \u590f\u4ee4\u65f6", "MDT", + "\u5C71\u5730\u65F6\u95F4", "MT"}; String MYT[] = new String[] {"\u9a6c\u6765\u897f\u4e9a\u65f6\u95f4", "MYT", - "\u9a6c\u6765\u897f\u4e9a\u590f\u4ee4\u65f6", "MYST"}; + "\u9a6c\u6765\u897f\u4e9a\u590f\u4ee4\u65f6", "MYST", + "\u9A6C\u6765\u897F\u4E9A\u65F6\u95F4", "MYT"}; String NORONHA[] = new String[] {"\u8d39\u5c14\u5357\u591a\u5fb7\u8bfa\u7f57\u5c3c\u4e9a\u65f6\u95f4", "FNT", - "\u8d39\u5c14\u5357\u591a\u5fb7\u8bfa\u7f57\u5c3c\u4e9a\u590f\u4ee4\u65f6", "FNST"}; + "\u8d39\u5c14\u5357\u591a\u5fb7\u8bfa\u7f57\u5c3c\u4e9a\u590f\u4ee4\u65f6", "FNST", + "\u8D39\u5C14\u5357\u591A\u5FB7\u8BFA\u7F57\u5C3C\u4E9A\u65F6\u95F4", "FNT"}; String NOVT[] = new String[] {"Novosibirsk \u65f6\u95f4", "NOVT", - "Novosibirsk \u590f\u4ee4\u65f6", "NOVST"}; + "Novosibirsk \u590f\u4ee4\u65f6", "NOVST", + "Novosibirsk \u65F6\u95F4", "NOVT"}; String NPT[] = new String[] {"\u5c3c\u6cca\u5c14\u65f6\u95f4", "NPT", - "\u5c3c\u6cca\u5c14\u590f\u4ee4\u65f6", "NPST"}; + "\u5c3c\u6cca\u5c14\u590f\u4ee4\u65f6", "NPST", + "\u5C3C\u6CCA\u5C14\u65F6\u95F4", "NPT"}; String NST[] = new String[] {"\u7ebd\u82ac\u5170\u6807\u51c6\u65f6\u95f4", "NST", - "\u7ebd\u82ac\u5170\u590f\u4ee4\u65f6", "NDT"}; + "\u7ebd\u82ac\u5170\u590f\u4ee4\u65f6", "NDT", + "\u7EBD\u82AC\u5170\u65F6\u95F4", "NT"}; String NZST[] = new String[] {"\u65b0\u897f\u5170\u6807\u51c6\u65f6\u95f4", "NZST", - "\u65b0\u897f\u5170\u590f\u4ee4\u65f6", "NZDT"}; + "\u65b0\u897f\u5170\u590f\u4ee4\u65f6", "NZDT", + "\u65B0\u897F\u5170\u65F6\u95F4", "NZT"}; String PITCAIRN[] = new String[] {"\u76ae\u7279\u5eb7\u5c9b\u6807\u51c6\u65f6\u95f4", "PST", - "\u76ae\u7279\u5eb7\u5c9b\u590f\u4ee4\u65f6", "PDT"}; + "\u76ae\u7279\u5eb7\u5c9b\u590f\u4ee4\u65f6", "PDT", + "\u76AE\u7279\u51EF\u6069\u65F6\u95F4", "PT"}; String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u65f6\u95f4", "PKT", - "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u65f6", "PKST"}; + "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u65f6", "PKST", + "\u5DF4\u57FA\u65AF\u5766\u65F6\u95F4", "PKT"}; String PONT[] = new String[] {"\u6CE2\u7EB3\u4F69\u65F6\u95F4", "PONT", - "\u6CE2\u7EB3\u4F69\u590F\u4EE4\u65F6", "PONST"}; + "\u6CE2\u7EB3\u4F69\u590F\u4EE4\u65F6", "PONST", + "\u6CE2\u7EB3\u4F69\u65F6\u95F4", "PONT"}; String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6807\u51c6\u65f6\u95f4", "PST", - "\u592a\u5e73\u6d0b\u590f\u4ee4\u65f6", "PDT"}; + "\u592a\u5e73\u6d0b\u590f\u4ee4\u65f6", "PDT", + "\u592A\u5E73\u6D0B\u65F6\u95F4", "PT"}; String SAST[] = new String[] {"\u5357\u975e\u6807\u51c6\u65f6\u95f4", "SAST", - "\u5357\u975e\u590f\u4ee4\u65f6", "SAST"}; + "\u5357\u975e\u590f\u4ee4\u65f6", "SAST", + "\u5357\u975E\u65F6\u95F4", "SAT"}; String SBT[] = new String[] {"\u6240\u7f57\u95e8\u7fa4\u5c9b\u65f6\u95f4", "SBT", - "\u6240\u7f57\u95e8\u7fa4\u5c9b\u590f\u4ee4\u65f6", "SBST"}; + "\u6240\u7f57\u95e8\u7fa4\u5c9b\u590f\u4ee4\u65f6", "SBST", + "\u6240\u7F57\u95E8\u7FA4\u5C9B\u65F6\u95F4", "SBT"}; String SGT[] = new String[] {"\u65b0\u52a0\u5761\u65f6\u95f4", "SGT", - "\u65b0\u52a0\u5761\u590f\u4ee4\u65f6", "SGST"}; + "\u65b0\u52a0\u5761\u590f\u4ee4\u65f6", "SGST", + "\u65B0\u52A0\u5761\u65F6\u95F4", "SGT"}; String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", - "\u585e\u62c9\u5229\u6602\u590f\u4ee4\u65f6", "SLST"}; + "\u585e\u62c9\u5229\u6602\u590f\u4ee4\u65f6", "SLST", + "\u585E\u62C9\u91CC\u6602\u65F6\u95F4", "SLT"}; String TASMANIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST", - "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST"}; + "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST", + "\u4E1C\u90E8\u65F6\u95F4 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "ET"}; String TMT[] = new String[] {"\u571f\u5e93\u66fc\u65f6\u95f4", "TMT", - "\u571f\u5e93\u66fc\u590f\u4ee4\u65f6", "TMST"}; + "\u571f\u5e93\u66fc\u590f\u4ee4\u65f6", "TMST", + "\u571F\u5E93\u66FC\u65F6\u95F4", "TMT"}; String ULAT[]= new String[] {"\u5e93\u4f26\u65f6\u95f4", "ULAT", - "\u5e93\u4f26\u590f\u4ee4\u65f6", "ULAST"}; + "\u5e93\u4f26\u590f\u4ee4\u65f6", "ULAST", + "\u5E93\u4F26\u65F6\u95F4", "ULAT"}; String WART[] = new String[] {"\u897f\u963f\u6839\u5ef7\u65f6\u95f4", "WART", "\u897f\u963f\u6839\u5ef7\u590f\u4ee4\u65f6", "WARST"}; String WAT[] = new String[] {"\u897f\u975e\u65f6\u95f4", "WAT", - "\u897f\u975e\u590f\u4ee4\u65f6", "WAST"}; + "\u897f\u975e\u590f\u4ee4\u65f6", "WAST", + "\u897F\u975E\u65F6\u95F4", "WAT"}; String WET[] = new String[] {"\u897f\u6b27\u65f6\u95f4", "WET", - "\u897f\u6b27\u590f\u4ee4\u65f6", "WEST"}; + "\u897f\u6b27\u590f\u4ee4\u65f6", "WEST", + "\u897F\u6B27\u65F6\u95F4", "WET"}; String WIT[] = new String[] {"\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIB", - "\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "WIST"}; + "\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "WIST", + "\u897F\u5370\u5EA6\u5C3C\u897F\u4E9A\u65F6\u95F4", "WIB"}; String WST_AUS[] = new String[] {"\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "WST", - "\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "WST"}; + "\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "WST", + "\u897F\u90E8\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "WT"}; String SAMOA[] = new String[] {"\u8428\u6469\u4e9a\u7fa4\u5c9b\u6807\u51c6\u65f6\u95f4", "SST", - "\u8428\u6469\u4e9a\u7fa4\u5c9b\u590f\u4ee4\u65f6", "SDT"}; + "\u8428\u6469\u4e9a\u7fa4\u5c9b\u590f\u4ee4\u65f6", "SDT", + "\u8428\u6469\u4E9A\u65F6\u95F4", "ST"}; String WST_SAMOA[] = new String[] {"\u897f\u8428\u6469\u4e9a\u65f6\u95f4", "WST", - "\u897f\u8428\u6469\u4e9a\u590f\u4ee4\u65f6", "WSDT"}; + "\u897f\u8428\u6469\u4e9a\u590f\u4ee4\u65f6", "WSDT", + "\u897F\u8428\u6469\u4E9A\u65F6\u95F4", "WST"}; String ChST[] = new String[] {"Chamorro \u6807\u51c6\u65f6\u95f4", "ChST", - "Chamorro \u590f\u4ee4\u65f6", "ChDT"}; + "Chamorro \u590f\u4ee4\u65f6", "ChDT", + "\u67E5\u6469\u6D1B\u65F6\u95F4", "ChT"}; String VICTORIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u7EF4\u591A\u5229\u4E9A)", "EST", - "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u7EF4\u591A\u5229\u4E9A)", "EST"}; + "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u7EF4\u591A\u5229\u4E9A)", "EST", + "\u4E1C\u90E8\u65F6\u95F4 (\u7EF4\u591A\u5229\u4E9A)", "ET"}; String UTC[] = new String[] {"\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC", - "\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC"}; + "\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC", + "\u534F\u8C03\u4E16\u754C\u65F6\u95F4", "UTC"}; String UZT[] = new String[] {"\u4e4c\u5179\u522b\u514b\u65af\u5766\u65f6\u95f4", "UZT", - "\u4e4c\u5179\u522b\u514b\u65af\u5766\u590f\u4ee4\u65f6", "UZST"}; + "\u4e4c\u5179\u522b\u514b\u65af\u5766\u590f\u4ee4\u65f6", "UZST", + "\u4E4C\u5179\u522B\u514B\u65AF\u5766\u65F6\u95F4", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"\u5df4\u62c9\u572d\u65f6\u95f4", "PYT", - "\u5df4\u62c9\u572d\u590f\u4ee4\u65f6", "PYST"}}, + "\u5df4\u62c9\u572d\u590f\u4ee4\u65f6", "PYST", + "\u5DF4\u62C9\u572D\u65F6\u95F4", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"\u54e5\u4f26\u6bd4\u4e9a\u65f6\u95f4", "COT", - "\u54e5\u4f26\u6bd4\u4e9a\u590f\u4ee4\u65f6", "COST"}}, + "\u54e5\u4f26\u6bd4\u4e9a\u590f\u4ee4\u65f6", "COST", + "\u54E5\u4F26\u6BD4\u4E9A\u65F6\u95F4", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"\u59d4\u5185\u745e\u62c9\u65f6\u95f4", "VET", - "\u59d4\u5185\u745e\u62c9\u590f\u4ee4\u65f6", "VEST"}}, + "\u59d4\u5185\u745e\u62c9\u590f\u4ee4\u65f6", "VEST", + "\u59D4\u5185\u745E\u62C9\u65F6\u95F4", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"\u6cd5\u5c5e\u572d\u4e9a\u90a3\u65f6\u95f4", "GFT", - "\u6cd5\u5c5e\u572d\u4e9a\u90a3\u590f\u4ee4\u65f6", "GFST"}}, + "\u6cd5\u5c5e\u572d\u4e9a\u90a3\u590f\u4ee4\u65f6", "GFST", + "\u6CD5\u5C5E\u572D\u4E9A\u90A3\u65F6\u95F4", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"\u897f\u683c\u6797\u5170\u5c9b\u65f6\u95f4", "WGT", - "\u897f\u683c\u6797\u5170\u5c9b\u590f\u4ee4\u65f6", "WGST"}}, + "\u897f\u683c\u6797\u5170\u5c9b\u590f\u4ee4\u65f6", "WGST", + "\u897F\u683C\u6797\u5170\u5C9B\u65F6\u95F4", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"\u5384\u74dc\u591a\u5c14\u65f6\u95f4", "ECT", - "\u5384\u74dc\u591a\u5c14\u590f\u4ee4\u65f6", "ECST"}}, + "\u5384\u74dc\u591a\u5c14\u590f\u4ee4\u65f6", "ECST", + "\u5384\u74DC\u591A\u5C14\u65F6\u95F4", "ECT"}}, {"America/Guyana", new String[] {"\u572d\u4e9a\u90a3\u65f6\u95f4", "GYT", - "\u572d\u4e9a\u90a3\u590f\u4ee4\u65f6", "GYST"}}, + "\u572d\u4e9a\u90a3\u590f\u4ee4\u65f6", "GYST", + "\u572D\u4E9A\u90A3\u65F6\u95F4", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"\u73bb\u5229\u7ef4\u4e9a\u65f6\u95f4", "BOT", - "\u73bb\u5229\u7ef4\u4e9a\u590f\u4ee4\u65f6", "BOST"}}, + "\u73bb\u5229\u7ef4\u4e9a\u590f\u4ee4\u65f6", "BOST", + "\u73BB\u5229\u7EF4\u4E9A\u65F6\u95F4", "BOT"}}, {"America/Lima", new String[] {"\u79d8\u9c81\u65f6\u95f4", "PET", - "\u79d8\u9c81\u590f\u4ee4\u65f6", "PEST"}}, + "\u79d8\u9c81\u590f\u4ee4\u65f6", "PEST", + "\u79D8\u9C81\u65F6\u95F4", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6807\u51C6\u65F6\u95F4", "MeST", - "\u6885\u7279\u62C9\u5361\u7279\u62C9\u590F\u4EE4\u65F6", "MeDT"}}, + "\u6885\u7279\u62C9\u5361\u7279\u62C9\u590F\u4EE4\u65F6", "MeDT", + "\u6885\u7279\u62C9\u5361\u7279\u62C9\u65F6\u95F4", "MeT"}}, {"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"}}, + "\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u590f\u4ee4\u65f6", "PMDT", + "\u76AE\u57C3\u5C14\u548C\u5BC6\u514B\u9686\u5C9B\u65F6\u95F4", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"\u4e4c\u62c9\u572d\u65f6\u95f4", "UYT", - "\u4e4c\u62c9\u572d\u590f\u4ee4\u65f6", "UYST"}}, + "\u4e4c\u62c9\u572d\u590f\u4ee4\u65f6", "UYST", + "\u4E4C\u62C9\u572D\u65F6\u95F4", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"\u82cf\u5229\u5357\u65f6\u95f4", "SRT", - "\u82cf\u5229\u5357\u590f\u4ee4\u65f6", "SRST"}}, + "\u82cf\u5229\u5357\u590f\u4ee4\u65f6", "SRST", + "\u82CF\u5229\u5357\u65F6\u95F4", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,115 +550,146 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"\u6234\u7ef4\u65af\u65f6\u95f4", "DAVT", - "\u6234\u7ef4\u65af\u590f\u4ee4\u65f6", "DAVST"}}, + "\u6234\u7ef4\u65af\u590f\u4ee4\u65f6", "DAVST", + "\u6234\u7EF4\u65AF\u65F6\u95F4", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u65f6\u95f4", "DDUT", - "Dumont-d'Urville \u590f\u4ee4\u65f6", "DDUST"}}, + "Dumont-d'Urville \u590f\u4ee4\u65f6", "DDUST", + "Dumont-d'Urville \u65F6\u95F4", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"\u9EA6\u5938\u91CC\u5C9B\u65F6\u95F4", "MIST", - "\u9EA6\u5938\u91CC\u5C9B\u590F\u4EE4\u65F6", "MIST"}}, + "\u9EA6\u5938\u91CC\u5C9B\u590F\u4EE4\u65F6", "MIST", + "\u9EA6\u5938\u91CC\u5C9B\u65F6\u95F4", "MIST"}}, {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u65f6\u95f4", "MAWT", - "\u83ab\u68ee\u590f\u4ee4\u65f6", "MAWST"}}, + "\u83ab\u68ee\u590f\u4ee4\u65f6", "MAWST", + "\u83AB\u68EE\u65F6\u95F4", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"\u7f57\u745f\u62c9\u65f6\u95f4", "ROTT", - "\u7f57\u745f\u62c9\u590f\u4ee4\u65f6", "ROTST"}}, + "\u7f57\u745f\u62c9\u590f\u4ee4\u65f6", "ROTST", + "\u7F57\u745F\u62C9\u65F6\u95F4", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"Syowa \u65f6\u95f4", "SYOT", - "Syowa \u590f\u4ee4\u65f6", "SYOST"}}, + "Syowa \u590f\u4ee4\u65f6", "SYOST", + "Syowa \u65F6\u95F4", "SYOT"}}, {"Antarctica/Vostok", new String[] {"\u83ab\u65af\u6258\u514b\u65f6\u95f4", "VOST", - "\u83ab\u65af\u6258\u514b\u590f\u4ee4\u65f6", "VOSST"}}, + "\u83ab\u65af\u6258\u514b\u590f\u4ee4\u65f6", "VOSST", + "\u83AB\u65AF\u6258\u514B\u65F6\u95F4", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Alma-Ata \u65f6\u95f4", "ALMT", - "Alma-Ata \u590f\u4ee4\u65f6", "ALMST"}}, + "Alma-Ata \u590f\u4ee4\u65f6", "ALMST", + "Alma-Ata \u65F6\u95F4", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"\u963f\u90a3\u5e95\u6cb3\u65f6\u95f4", "ANAT", - "\u963f\u90a3\u5e95\u6cb3\u590f\u4ee4\u65f6", "ANAST"}}, + "\u963f\u90a3\u5e95\u6cb3\u590f\u4ee4\u65f6", "ANAST", + "\u963F\u90A3\u5E95\u6CB3\u65F6\u95F4", "ANAT"}}, {"Asia/Aqtau", new String[] {"Aqtau \u65f6\u95f4", "AQTT", - "Aqtau \u590f\u4ee4\u65f6", "AQTST"}}, + "Aqtau \u590f\u4ee4\u65f6", "AQTST", + "Aqtau \u65F6\u95F4", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Aqtobe \u65f6\u95f4", "AQTT", - "Aqtobe \u590f\u4ee4\u65f6", "AQTST"}}, + "Aqtobe \u590f\u4ee4\u65f6", "AQTST", + "Aqtobe \u65F6\u95F4", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"\u4e9a\u585e\u62dc\u7136\u65f6\u95f4", "AZT", - "\u4e9a\u585e\u62dc\u7136\u590f\u4ee4\u65f6", "AZST"}}, + "\u4e9a\u585e\u62dc\u7136\u590f\u4ee4\u65f6", "AZST", + "\u4E9A\u585E\u62DC\u7136\u65F6\u95F4", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"\u5409\u5c14\u5409\u65af\u65af\u5766\u65f6\u95f4", "KGT", - "\u5409\u5c14\u5409\u65af\u65af\u5766\u590f\u4ee4\u65f6", "KGST"}}, + "\u5409\u5c14\u5409\u65af\u65af\u5766\u590f\u4ee4\u65f6", "KGST", + "\u5409\u5C14\u5409\u65AF\u65AF\u5766\u65F6\u95F4", "KGT"}}, {"Asia/Brunei", new String[] {"\u6587\u83b1\u65f6\u95f4", "BNT", - "\u6587\u83b1\u590f\u4ee4\u65f6", "BNST"}}, + "\u6587\u83b1\u590f\u4ee4\u65f6", "BNST", + "\u6587\u83B1\u65F6\u95F4", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"Choibalsan \u65f6\u95f4", "CHOT", - "Choibalsan \u590f\u4ee4\u65f6", "CHOST"}}, + "Choibalsan \u590f\u4ee4\u65f6", "CHOST", + "Choibalsan \u65F6\u95F4", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"\u4e1c\u5e1d\u6c76\u65f6\u95f4", "TLT", - "\u4e1c\u5e1d\u6c76\u590f\u4ee4\u65f6", "TLST"}}, + "\u4e1c\u5e1d\u6c76\u590f\u4ee4\u65f6", "TLST", + "\u4E1C\u5E1D\u6C76\u65F6\u95F4", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"\u5854\u5409\u514b\u65af\u5766\u65f6\u95f4", "TJT", - "\u5854\u5409\u514b\u65af\u5766\u590f\u4ee4\u65f6", "TJST"}}, + "\u5854\u5409\u514b\u65af\u5766\u590f\u4ee4\u65f6", "TJST", + "\u5854\u5409\u514B\u65AF\u5766\u65F6\u95F4", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"\u79d1\u5e03\u591a\u65f6\u95f4", "HOVT", - "\u79d1\u5e03\u591a\u590f\u4ee4\u65f6", "HOVST"}}, + "\u79d1\u5e03\u591a\u590f\u4ee4\u65f6", "HOVST", + "\u79D1\u5E03\u591A\u65F6\u95F4", "HOVT"}}, {"Asia/Irkutsk", new String[] {"\u4f0a\u5c14\u5e93\u6b21\u514b\u65f6\u95f4", "IRKT", - "\u4f0a\u5c14\u5e93\u6b21\u514b\u590f\u4ee4\u65f6", "IRKST"}}, + "\u4f0a\u5c14\u5e93\u6b21\u514b\u590f\u4ee4\u65f6", "IRKST", + "\u4F0A\u5C14\u5E93\u6B21\u514B\u65F6\u95F4", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIT", - "\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "EIST"}}, + "\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "EIST", + "\u4E1C\u5370\u5EA6\u5C3C\u897F\u4E9A\u65F6\u95F4", "WIT"}}, {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u65f6\u95f4", "AFT", - "\u963f\u5bcc\u6c57\u590f\u4ee4\u65f6", "AFST"}}, + "\u963f\u5bcc\u6c57\u590f\u4ee4\u65f6", "AFST", + "\u963F\u5BCC\u6C57\u65F6\u95F4", "AFT"}}, {"Asia/Kamchatka", new String[] {"\u5f7c\u5f97\u7f57\u5df4\u752b\u6d1b\u592b\u65af\u514b\u65f6\u95f4", "PETT", - "\u5f7c\u5f97\u7f57\u5df4\u752b\u6d1b\u592b\u65af\u514b\u590f\u4ee4\u65f6", "PETST"}}, + "\u5f7c\u5f97\u7f57\u5df4\u752b\u6d1b\u592b\u65af\u514b\u590f\u4ee4\u65f6", "PETST", + "\u5F7C\u5F97\u7F57\u5DF4\u752B\u6D1B\u592B\u65AF\u514B\u65F6\u95F4", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"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\u590F\u4EE4\u65F6", "YAKST", + "\u6C49\u5FB7\u52A0\u65F6\u95F4", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u65f6\u95f4", "KRAT", - "\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u590f\u4ee4\u65f6", "KRAST"}}, + "\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u590f\u4ee4\u65f6", "KRAST", + "\u514B\u62C9\u65AF\u8BFA\u4E9A\u5C14\u65AF\u514B\u65F6\u95F4", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Magadan \u65f6\u95f4", "MAGT", - "Magadan \u590f\u4ee4\u65f6", "MAGST"}}, + "Magadan \u590f\u4ee4\u65f6", "MAGST", + "Magadan \u65F6\u95F4", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"\u83f2\u5f8b\u5bbe\u65f6\u95f4", "PHT", - "\u83f2\u5f8b\u5bbe\u590f\u4ee4\u65f6", "PHST"}}, + "\u83f2\u5f8b\u5bbe\u590f\u4ee4\u65f6", "PHST", + "\u83F2\u5F8B\u5BBE\u65F6\u95F4", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"Oral \u65f6\u95f4", "ORAT", - "Oral \u590f\u4ee4\u65f6", "ORAST"}}, + "Oral \u590f\u4ee4\u65f6", "ORAST", + "Oral \u65F6\u95F4", "ORAT"}}, {"Asia/Omsk", new String[] {"\u9102\u6728\u65af\u514b\u65f6\u95f4", "OMST", - "\u9102\u6728\u65af\u514b\u590f\u4ee4\u65f6", "OMSST"}}, + "\u9102\u6728\u65af\u514b\u590f\u4ee4\u65f6", "OMSST", + "\u9102\u6728\u65AF\u514B\u65F6\u95F4", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Qyzylorda \u65f6\u95f4", "QYZT", - "Qyzylorda \u590f\u4ee4\u65f6", "QYZST"}}, + "Qyzylorda \u590f\u4ee4\u65f6", "QYZST", + "Qyzylorda \u65F6\u95F4", "QYZT"}}, {"Asia/Rangoon", new String[] {"\u7f05\u7538\u65f6\u95f4", "MMT", - "\u7f05\u7538\u590f\u4ee4\u65f6", "MMST"}}, + "\u7f05\u7538\u590f\u4ee4\u65f6", "MMST", + "\u7F05\u7538\u65F6\u95F4", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"\u5e93\u9875\u5c9b\u65f6\u95f4", "SAKT", - "\u5e93\u9875\u5c9b\u590f\u4ee4\u65f6", "SAKST"}}, + "\u5e93\u9875\u5c9b\u590f\u4ee4\u65f6", "SAKST", + "\u5E93\u9875\u5C9B\u65F6\u95F4", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, @@ -577,7 +697,8 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"\u4e54\u6cbb\u4e9a\u65f6\u95f4", "GET", - "\u4e54\u6cbb\u4e9a\u590f\u4ee4\u65f6", "GEST"}}, + "\u4e54\u6cbb\u4e9a\u590f\u4ee4\u65f6", "GEST", + "\u4E54\u6CBB\u4E9A\u65F6\u95F4", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -586,31 +707,39 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"\u4E4C\u65AF\u5B63\u6D85\u62C9\u65F6\u95F4", "VLAT", - "\u4E4C\u65AF\u5B63\u6D85\u62C9\u590F\u4EE4\u65F6", "VLAST"}}, + "\u4E4C\u65AF\u5B63\u6D85\u62C9\u590F\u4EE4\u65F6", "VLAST", + "\u4E4C\u65AF\u5B63\u6D85\u62C9\u65F6\u95F4", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"\u6d77\u53c2\u5d34\u65f6\u95f4", "VLAT", - "\u6d77\u53c2\u5d34\u590f\u4ee4\u65f6", "VLAST"}}, + "\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\u590f\u4ee4\u65f6", "YAKST", + "\u4E9A\u5E93\u6B21\u514B\u65F6\u95F4", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Yekaterinburg \u65f6\u95f4", "YEKT", - "Yekaterinburg \u590f\u4ee4\u65f6", "YEKST"}}, + "Yekaterinburg \u590f\u4ee4\u65f6", "YEKST", + "Yekaterinburg \u65F6\u95F4", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"\u4e9a\u901f\u5c14\u7fa4\u5c9b\u65f6\u95f4", "AZOT", - "\u4e9a\u901f\u5c14\u7fa4\u5c9b\u590f\u4ee4\u65f6", "AZOST"}}, + "\u4e9a\u901f\u5c14\u7fa4\u5c9b\u590f\u4ee4\u65f6", "AZOST", + "\u4E9A\u901F\u5C14\u7FA4\u5C9B\u65F6\u95F4", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"\u4f5b\u5fb7\u89d2\u65f6\u95f4", "CVT", - "\u4f5b\u5fb7\u89d2\u590f\u4ee4\u65f6", "CVST"}}, + "\u4f5b\u5fb7\u89d2\u590f\u4ee4\u65f6", "CVST", + "\u4F5B\u5FB7\u89D2\u65F6\u95F4", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"\u5357\u4e54\u6cbb\u4e9a\u6807\u51c6\u65f6\u95f4", "GST", - "\u5357\u4e54\u6cbb\u4e9a\u590f\u4ee4\u65f6", "GDT"}}, + "\u5357\u4e54\u6cbb\u4e9a\u590f\u4ee4\u65f6", "GDT", + "\u5357\u4E54\u6CBB\u4E9A\u5C9B\u65F6\u95F4", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"\u798f\u514b\u5170\u7fa4\u5c9b\u65f6\u95f4", "FKT", - "\u798f\u514b\u5170\u7fa4\u5c9b\u590f\u4ee4\u65f6", "FKST"}}, + "\u798f\u514b\u5170\u7fa4\u5c9b\u590f\u4ee4\u65f6", "FKST", + "\u798F\u514B\u5170\u7FA4\u5C9B\u65F6\u95F4", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -619,7 +748,8 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "CWST", - "\u4E2D\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "CWST"}}, + "\u4E2D\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "CWST", + "\u4E2D\u897F\u90E8\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -704,7 +834,8 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"\u6c99\u9a6c\u62c9\u65f6\u95f4", "SAMT", - "\u6c99\u9a6c\u62c9\u590f\u4ee4\u65f6", "SAMST"}}, + "\u6c99\u9a6c\u62c9\u590f\u4ee4\u65f6", "SAMST", + "\u6C99\u9A6C\u62C9\u65F6\u95F4", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -720,7 +851,8 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"\u4f0f\u5c14\u52a0\u683c\u52d2\u65f6\u95f4", "VOLT", - "\u4f0f\u5c14\u52a0\u683c\u52d2\u590f\u4ee4\u65f6", "VOLST"}}, + "\u4f0f\u5c14\u52a0\u683c\u52d2\u590f\u4ee4\u65f6", "VOLST", + "\u4F0F\u5C14\u52A0\u683C\u52D2\u65F6\u95F4", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -734,30 +866,39 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"\u5370\u5ea6\u6d0b\u5730\u5e26\u65f6\u95f4", "IOT", - "\u5370\u5ea6\u6d0b\u5730\u5e26\u590f\u4ee4\u65f6", "IOST"}}, + "\u5370\u5ea6\u6d0b\u5730\u5e26\u590f\u4ee4\u65f6", "IOST", + "\u5370\u5EA6\u6D0B\u5730\u5E26\u65F6\u95F4", "IOT"}}, {"Indian/Christmas", new String[] {"\u5723\u8bde\u5c9b\u65f6\u95f4", "CXT", - "\u5723\u8bde\u5c9b\u590f\u4ee4\u65f6", "CXST"}}, + "\u5723\u8bde\u5c9b\u590f\u4ee4\u65f6", "CXST", + "\u5723\u8BDE\u5C9B\u65F6\u95F4", "CIT"}}, {"Indian/Cocos", new String[] {"\u53ef\u53ef\u65af\u7fa4\u5c9b\u65f6\u95f4", "CCT", - "\u53ef\u53ef\u65af\u7fa4\u5c9b\u590f\u4ee4\u65f6", "CCST"}}, + "\u53ef\u53ef\u65af\u7fa4\u5c9b\u590f\u4ee4\u65f6", "CCST", + "\u53EF\u53EF\u65AF\u7FA4\u5C9B\u65F6\u95F4", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"\u6cd5\u5c5e\u5357\u6781\u65f6\u95f4", "TFT", - "\u6cd5\u5c5e\u5357\u6781\u590f\u4ee4\u65f6", "TFST"}}, + "\u6cd5\u5c5e\u5357\u6781\u590f\u4ee4\u65f6", "TFST", + "\u6CD5\u5C5E\u5357\u6781\u65F6\u95F4", "TFT"}}, {"Indian/Mahe", new String[] {"\u585e\u5e2d\u5c14\u7fa4\u5c9b\u65f6\u95f4", "SCT", - "\u585e\u5e2d\u5c14\u7fa4\u5c9b\u590f\u4ee4\u65f6", "SCST"}}, + "\u585e\u5e2d\u5c14\u7fa4\u5c9b\u590f\u4ee4\u65f6", "SCST", + "\u585E\u5E2D\u5C14\u7FA4\u5C9B\u65F6\u95F4", "SCT"}}, {"Indian/Maldives", new String[] {"\u9a6c\u5c14\u4ee3\u592b\u65f6\u95f4", "MVT", - "\u9a6c\u5c14\u4ee3\u592b\u590f\u4ee4\u65f6", "MVST"}}, + "\u9a6c\u5c14\u4ee3\u592b\u590f\u4ee4\u65f6", "MVST", + "\u9A6C\u5C14\u4EE3\u592B\u65F6\u95F4", "MVT"}}, {"Indian/Mauritius", new String[] {"\u6469\u91cc\u897f\u65af\u65f6\u95f4", "MUT", - "\u6469\u91cc\u897f\u65af\u590f\u4ee4\u65f6", "MUST"}}, + "\u6469\u91cc\u897f\u65af\u590f\u4ee4\u65f6", "MUST", + "\u6469\u91CC\u897F\u65AF\u65F6\u95F4", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"\u7559\u5c3c\u65fa\u5c9b\u65f6\u95f4", "RET", - "\u7559\u5c3c\u65fa\u5c9b\u590f\u4ee4\u65f6", "REST"}}, + "\u7559\u5c3c\u65fa\u5c9b\u590f\u4ee4\u65f6", "REST", + "\u7559\u5C3C\u65FA\u5C9B\u65F6\u95F4", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"\u4e2d\u6b27\u65f6\u95f4", "MET", - "\u4e2d\u6b27\u590f\u4ee4\u65f6", "MEST"}}, + "\u4e2d\u6b27\u590f\u4ee4\u65f6", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -777,61 +918,82 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"\u74e6\u5974\u963f\u56fe\u65f6\u95f4", "VUT", - "\u74e6\u5974\u963f\u56fe\u590f\u4ee4\u65f6", "VUST"}}, + "\u74e6\u5974\u963f\u56fe\u590f\u4ee4\u65f6", "VUST", + "\u74E6\u5974\u963F\u56FE\u65F6\u95F4", "VUT"}}, {"Pacific/Enderbury", new String[] {"\u83f2\u5c3c\u514b\u65af\u7fa4\u5c9b\u65f6\u95f4", "PHOT", - "\u83f2\u5c3c\u514b\u65af\u7fa4\u5c9b\u590f\u4ee4\u65f6", "PHOST"}}, + "\u83f2\u5c3c\u514b\u65af\u7fa4\u5c9b\u590f\u4ee4\u65f6", "PHOST", + "\u83F2\u5C3C\u514B\u65AF\u7FA4\u5C9B\u65F6\u95F4", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"\u6258\u514b\u52b3\u7fa4\u5c9b\u65f6\u95f4", "TKT", - "\u6258\u514b\u52b3\u7fa4\u5c9b\u590f\u4ee4\u65f6", "TKST"}}, + "\u6258\u514b\u52b3\u7fa4\u5c9b\u590f\u4ee4\u65f6", "TKST", + "\u6258\u514B\u52B3\u7FA4\u5C9B\u65F6\u95F4", "TKT"}}, {"Pacific/Fiji", new String[] {"\u6590\u6d4e\u65f6\u95f4", "FJT", - "\u6590\u6d4e\u590f\u4ee4\u65f6", "FJST"}}, + "\u6590\u6d4e\u590f\u4ee4\u65f6", "FJST", + "\u6590\u6D4E\u65F6\u95F4", "FJT"}}, {"Pacific/Funafuti", new String[] {"\u5410\u9c81\u74e6\u65f6\u95f4", "TVT", - "\u5410\u9c81\u74e6\u590f\u4ee4\u65f6", "TVST"}}, + "\u5410\u9c81\u74e6\u590f\u4ee4\u65f6", "TVST", + "\u5410\u9C81\u74E6\u65F6\u95F4", "TVT"}}, {"Pacific/Galapagos", new String[] {"\u52a0\u62c9\u5df4\u54e5\u65f6\u95f4", "GALT", - "\u52a0\u62c9\u5df4\u54e5\u590f\u4ee4\u65f6", "GALST"}}, + "\u52a0\u62c9\u5df4\u54e5\u590f\u4ee4\u65f6", "GALST", + "\u52A0\u62C9\u5DF4\u54E5\u65F6\u95F4", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Line \u5c9b\u65f6\u95f4", "LINT", - "Line \u5c9b\u590f\u4ee4\u65f6", "LINST"}}, + "Line \u5c9b\u590f\u4ee4\u65f6", "LINST", + "Line \u5C9B\u65F6\u95F4", "LINT"}}, {"Pacific/Kosrae", new String[] {"Kosrae \u65f6\u95f4", "KOST", - "Kosrae \u590f\u4ee4\u65f6", "KOSST"}}, + "Kosrae \u590f\u4ee4\u65f6", "KOSST", + "Kosrae \u65F6\u95F4", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"\u9a6c\u514b\u8428\u65af\u65f6\u95f4", "MART", - "\u9a6c\u514b\u8428\u65af\u590f\u4ee4\u65f6", "MARST"}}, + "\u9a6c\u514b\u8428\u65af\u590f\u4ee4\u65f6", "MARST", + "\u9A6C\u514B\u8428\u65AF\u65F6\u95F4", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"\u8bfa\u9c81\u65f6\u95f4", "NRT", - "\u8bfa\u9c81\u590f\u4ee4\u65f6", "NRST"}}, + "\u8bfa\u9c81\u590f\u4ee4\u65f6", "NRST", + "\u8BFA\u9C81\u65F6\u95F4", "NRT"}}, {"Pacific/Niue", new String[] {"\u7ebd\u5a01\u5c9b\u65f6\u95f4", "NUT", - "\u7ebd\u5a01\u5c9b\u590f\u4ee4\u65f6", "NUST"}}, + "\u7ebd\u5a01\u5c9b\u590f\u4ee4\u65f6", "NUST", + "\u7EBD\u5A01\u5C9B\u65F6\u95F4", "NUT"}}, {"Pacific/Norfolk", new String[] {"\u8bfa\u798f\u514b\u65f6\u95f4", "NFT", - "\u8bfa\u798f\u514b\u590f\u4ee4\u65f6", "NFST"}}, + "\u8bfa\u798f\u514b\u590f\u4ee4\u65f6", "NFST", + "\u8BFA\u798F\u514B\u65F6\u95F4", "NFT"}}, {"Pacific/Noumea", new String[] {"\u65b0\u52a0\u52d2\u591a\u5c3c\u4e9a\u65f6\u95f4", "NCT", - "\u65b0\u52a0\u52d2\u591a\u5c3c\u4e9a\u590f\u4ee4\u65f6", "NCST"}}, + "\u65b0\u52a0\u52d2\u591a\u5c3c\u4e9a\u590f\u4ee4\u65f6", "NCST", + "\u65B0\u52A0\u52D2\u591A\u5C3C\u4E9A\u65F6\u95F4", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"\u5e1b\u7409\u65f6\u95f4", "PWT", - "\u5e1b\u7409\u590f\u4ee4\u65f6", "PWST"}}, + "\u5e1b\u7409\u590f\u4ee4\u65f6", "PWST", + "\u5E1B\u7409\u65F6\u95F4", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"\u5df4\u5e03\u4e9a\u65b0\u51e0\u5185\u4e9a\u65f6\u95f4", "PGT", - "\u5df4\u5e03\u4e9a\u65b0\u51e0\u5185\u4e9a\u590f\u4ee4\u65f6", "PGST"}}, + "\u5df4\u5e03\u4e9a\u65b0\u51e0\u5185\u4e9a\u590f\u4ee4\u65f6", "PGST", + "\u5DF4\u5E03\u4E9A\u65B0\u51E0\u5185\u4E9A\u65F6\u95F4", "PGT"}}, {"Pacific/Rarotonga", new String[] {"\u5e93\u514b\u7fa4\u5c9b\u65f6\u95f4", "CKT", - "\u5e93\u514b\u7fa4\u5c9b\u590f\u4ee4\u65f6", "CKHST"}}, + "\u5e93\u514b\u7fa4\u5c9b\u590f\u4ee4\u65f6", "CKHST", + "\u5E93\u514B\u7FA4\u5C9B\u65F6\u95F4", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"\u5927\u6eaa\u5730\u5c9b\u65f6\u95f4", "TAHT", - "\u5927\u6eaa\u5730\u5c9b\u590f\u4ee4\u65f6", "TAHST"}}, + "\u5927\u6eaa\u5730\u5c9b\u590f\u4ee4\u65f6", "TAHST", + "\u5927\u6EAA\u5730\u5C9B\u65F6\u95F4", "TAHT"}}, {"Pacific/Tarawa", new String[] {"\u5409\u4f2f\u7279\u7fa4\u5c9b\u65f6\u95f4", "GILT", - "\u5409\u4f2f\u7279\u7fa4\u5c9b\u590f\u4ee4\u65f6", "GILST"}}, + "\u5409\u4f2f\u7279\u7fa4\u5c9b\u590f\u4ee4\u65f6", "GILST", + "\u5409\u4F2F\u7279\u7FA4\u5C9B\u65F6\u95F4", "GILT"}}, {"Pacific/Tongatapu", new String[] {"\u4e1c\u52a0\u65f6\u95f4", "TOT", - "\u4e1c\u52a0\u590f\u4ee4\u65f6", "TOST"}}, + "\u4e1c\u52a0\u590f\u4ee4\u65f6", "TOST", + "\u4E1C\u52A0\u65F6\u95F4", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"\u5a01\u514b\u65f6\u95f4", "WAKT", - "\u5a01\u514b\u590f\u4ee4\u65f6", "WAKST"}}, + "\u5a01\u514b\u590f\u4ee4\u65f6", "WAKST", + "\u5A01\u514B\u65F6\u95F4", "WAKT"}}, {"Pacific/Wallis", new String[] {"\u74e6\u5229\u65af\u53ca\u798f\u675c\u7eb3\u7fa4\u5c9b\u65f6\u95f4", "WFT", - "\u74e6\u5229\u65af\u53ca\u798f\u675c\u7eb3\u7fa4\u5c9b\u590f\u4ee4\u65f6", "WFST"}}, + "\u74e6\u5229\u65af\u53ca\u798f\u675c\u7eb3\u7fa4\u5c9b\u590f\u4ee4\u65f6", "WFST", + "\u74E6\u5229\u65AF\u53CA\u798F\u675C\u7EB3\u7FA4\u5C9B\u65F6\u95F4", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java b/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java index ab14a98fdb1..8cccc2f01ba 100644 --- a/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java +++ b/jdk/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java @@ -46,159 +46,235 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { protected final Object[][] getContents() { String ACT[] = new String[] {"Acre \u6642\u9593", "ACT", - "Acre \u590f\u4ee4\u6642\u9593", "ACST"}; + "Acre \u590f\u4ee4\u6642\u9593", "ACST", + "Acre \u6642\u9593", "ACT"}; String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u90E8)", "CST", - "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340)", "CST"}; + "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340)", "CST", + "\u4E2D\u90E8\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u90E8)", "CT"}; String AGT[] = new String[] {"\u963f\u6839\u5ef7\u6642\u9593", "ART", - "\u963f\u6839\u5ef7\u590f\u4ee4\u6642\u9593", "ARST"}; + "\u963f\u6839\u5ef7\u590f\u4ee4\u6642\u9593", "ARST", + "\u963F\u6839\u5EF7\u6642\u9593", "ART"}; String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6a19\u6e96\u6642\u9593", "AKST", - "\u963f\u62c9\u65af\u52a0\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "AKDT"}; + "\u963f\u62c9\u65af\u52a0\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "AKDT", + "\u963F\u62C9\u65AF\u52A0\u6642\u9593", "AKT"}; String AMT[] = new String[] {"\u4e9e\u99ac\u905c\u6642\u9593", "AMT", - "\u4e9e\u99ac\u905c\u590f\u4ee4\u6642\u9593", "AMST"}; + "\u4e9e\u99ac\u905c\u590f\u4ee4\u6642\u9593", "AMST", + "\u4E9E\u99AC\u905C\u6642\u9593", "AMT"}; String ARAST[] = new String[] {"\u963f\u62c9\u4f2f\u6a19\u6e96\u6642\u9593", "AST", - "\u963f\u62c9\u4f2f\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ADT"}; + "\u963f\u62c9\u4f2f\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ADT", + "\u963F\u62C9\u4F2F\u6642\u9593", "AT"}; String ARMT[] = new String[] {"\u4e9e\u7f8e\u5c3c\u4e9e\u6642\u9593", "AMT", - "\u4e9e\u7f8e\u5c3c\u4e9e\u590f\u4ee4\u6642\u9593", "AMST"}; + "\u4e9e\u7f8e\u5c3c\u4e9e\u590f\u4ee4\u6642\u9593", "AMST", + "\u4E9E\u7F8E\u5C3C\u4E9E\u6642\u9593", "AMT"}; String AST[] = new String[] {"\u5927\u897f\u6d0b\u6a19\u6e96\u6642\u9593", "AST", - "\u5927\u897f\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ADT"}; + "\u5927\u897f\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ADT", + "\u5927\u897F\u6D0B\u6642\u9593", "AT"}; String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u6642\u9593", "BDT", - "\u5b5f\u52a0\u62c9\u590f\u4ee4\u6642\u9593", "BDST"}; + "\u5b5f\u52a0\u62c9\u590f\u4ee4\u6642\u9593", "BDST", + "\u5B5F\u52A0\u62C9\u6642\u9593", "BDT"}; String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u6606\u58EB\u862D)", "EST", - "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u6606\u58EB\u862D)", "EST"}; + "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u6606\u58EB\u862D)", "EST", + "\u6771\u90E8\u6642\u9593 (\u6606\u58EB\u862D)", "ET"}; String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST", - "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST"}; + "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST", + "\u4E2D\u90E8\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u90E8/\u65B0\u5357\u5A01\u723E\u65AF)", "CT"}; String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9e\u6642\u9593", "BRT", - "\u5df4\u897f\u5229\u4e9e\u590f\u4ee4\u6642\u9593", "BRST"}; + "\u5df4\u897f\u5229\u4e9e\u590f\u4ee4\u6642\u9593", "BRST", + "\u5DF4\u897F\u5229\u4E9E\u6642\u9593", "BRT"}; String BTT[] = new String[] {"\u4e0d\u4e39\u6642\u9593", "BTT", - "\u4e0d\u4e39\u590f\u4ee4\u6642\u9593", "BTST"}; + "\u4e0d\u4e39\u590f\u4ee4\u6642\u9593", "BTST", + "\u4E0D\u4E39\u6642\u9593", "BTT"}; String CAT[] = new String[] {"\u4e2d\u975e\u6642\u9593", "CAT", - "\u4e2d\u975e\u590f\u4ee4\u6642\u9593", "CAST"}; + "\u4e2d\u975e\u590f\u4ee4\u6642\u9593", "CAST", + "\u4E2D\u975E\u6642\u9593", "CAT"}; String CET[] = new String[] {"\u4e2d\u6b50\u6642\u9593", "CET", - "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "CEST"}; + "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "CEST", + "\u4E2D\u6B50\u6642\u9593", "CET"}; String CHAST[] = new String[] {"\u67e5\u5766\u6a19\u6e96\u6642\u9593", "CHAST", - "\u67e5\u5766\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CHADT"}; + "\u67e5\u5766\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CHADT", + "\u67E5\u5766\u6642\u9593", "CHAT"}; String CHUT[] = new String[] {"\u695A\u514B\u6642\u9593", "CHUT", - "\u695A\u514B\u590F\u4EE4\u6642\u9593", "CHUST"}; + "\u695A\u514B\u590F\u4EE4\u6642\u9593", "CHUST", + "\u695A\u514B\u6642\u9593", "CHUT"}; String CIT[] = new String[] {"\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WITA", - "\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u4ee4\u6642\u9593", "CIST"}; + "\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u4ee4\u6642\u9593", "CIST", + "\u4E2D\u5370\u5EA6\u5C3C\u897F\u4E9E\u6642\u9593", "WITA"}; String CLT[] = new String[] {"\u667a\u5229\u6642\u9593", "CLT", - "\u667a\u5229\u590f\u4ee4\u6642\u9593", "CLST"}; + "\u667a\u5229\u590f\u4ee4\u6642\u9593", "CLST", + "\u667A\u5229\u6642\u9593", "CLT"}; String CST[] = new String[] {"\u4e2d\u592e\u6a19\u6e96\u6642\u9593", "CST", - "\u4e2d\u592e\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"}; + "\u4e2d\u592e\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT", + "\u7F8E\u570B\u4E2D\u90E8\u6642\u9593", "CT"}; String CTT[] = new String[] {"\u4e2d\u570b\u6a19\u6e96\u6642\u9593", "CST", - "\u4e2d\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"}; + "\u4e2d\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT", + "\u4E2D\u570B\u6642\u9593", "CT"}; String CUBA[] = new String[] {"\u53e4\u5df4\u6a19\u6e96\u6642\u9593", "CST", - "\u53e4\u5df4\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"}; + "\u53e4\u5df4\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT", + "\u53E4\u5DF4\u6642\u9593", "CT"}; String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST", - "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST"}; + "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST", + "\u6FB3\u5927\u5229\u4E9E\u4E2D\u90E8\u6642\u9593 (\u5317\u65B9\u5340\u57DF)", "CT"}; String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT", - "\u611b\u723e\u862d\u590f\u4ee4\u6642\u9593", "IST"}; + "\u611b\u723e\u862d\u590f\u4ee4\u6642\u9593", "IST", + "\u611B\u723E\u862D\u6587\u6642\u9593", "IT"}; String EAT[] = new String[] {"\u6771\u975e\u6642\u9593", "EAT", - "\u6771\u975e\u590f\u4ee4\u6642\u9593", "EAST"}; + "\u6771\u975e\u590f\u4ee4\u6642\u9593", "EAST", + "\u6771\u975E\u6642\u9593", "EAT"}; String EASTER[] = new String[] {"\u5fa9\u6d3b\u5cf6\u6642\u9593", "EAST", - "\u5fa9\u6d3b\u5cf6\u590f\u4ee4\u6642\u9593", "EASST"}; + "\u5fa9\u6d3b\u5cf6\u590f\u4ee4\u6642\u9593", "EASST", + "\u5FA9\u6D3B\u5CF6\u6642\u9593", "EAST"}; String EET[] = new String[] {"\u6771\u6b50\u6642\u9593", "EET", - "\u6771\u6b50\u590f\u4ee4\u6642\u9593", "EEST"}; + "\u6771\u6b50\u590f\u4ee4\u6642\u9593", "EEST", + "\u6771\u6b50\u6642\u9593", "EET"}; String EGT[] = new String[] {"\u6771\u683c\u6797\u5cf6\u6642\u9593", "EGT", - "\u6771\u683c\u6797\u5cf6\u590f\u4ee4\u6642\u9593", "EGST"}; + "\u6771\u683c\u6797\u5cf6\u590f\u4ee4\u6642\u9593", "EGST", + "\u6771\u683C\u9675\u862D\u6642\u9593", "EGT"}; String EST[] = new String[] {"\u6771\u65b9\u6a19\u6e96\u6642\u9593", "EST", - "\u6771\u65b9\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "EDT"}; + "\u6771\u65b9\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "EDT", + "\u7F8E\u570B\u6771\u90E8\u6642\u9593", "ET"}; String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST", - "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST"}; + "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST", + "\u6771\u90E8\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "ET"}; String FET[] = new String[] {"\u6771\u6B50\u5167\u9678\u6642\u9593", "FET", - "\u6771\u6B50\u5167\u9678\u590F\u4EE4\u6642\u9593", "FEST"}; + "\u6771\u6B50\u5167\u9678\u590F\u4EE4\u6642\u9593", "FEST", + "\u6771\u6B50\u5167\u9678\u6642\u9593", "FET"}; String GHMT[] = new String[] {"\u8fe6\u7d0d\u5e73\u5747\u6642\u9593", "GMT", - "\u8fe6\u7d0d\u590f\u4ee4\u6642\u9593", "GHST"}; + "\u8fe6\u7d0d\u590f\u4ee4\u6642\u9593", "GHST", + "\u8FE6\u7D0D\u6642\u9593", "GMT"}; String GAMBIER[] = new String[] {"\u7518\u6bd4\u723e\u6642\u9593", "GAMT", - "\u7518\u6bd4\u723e\u590f\u4ee4\u6642\u9593", "GAMST"}; + "\u7518\u6bd4\u723e\u590f\u4ee4\u6642\u9593", "GAMST", + "\u7518\u6BD4\u723E\u6642\u9593", "GAMT"}; String GMT[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u6642\u9593", "GMT", - "\u683c\u6797\u5a01\u6cbb\u6642\u9593", "GMT"}; + "\u683c\u6797\u5a01\u6cbb\u6642\u9593", "GMT", + "\u683C\u6797\u5A01\u6CBB\u6642\u9593", "GMT"}; String GMTBST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT", - "\u82f1\u570b\u590f\u4ee4\u6642\u9593", "BST"}; + "\u82f1\u570b\u590f\u4ee4\u6642\u9593", "BST", + "\u82F1\u570B\u6642\u9593", "BT"}; String GST[] = new String[] {"\u6ce2\u65af\u7063\u6a19\u6e96\u6642\u9593", "GST", - "\u6ce2\u65af\u7063\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "GDT"}; + "\u6ce2\u65af\u7063\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "GDT", + "\u6CE2\u65AF\u7063\u6642\u9593", "GT"}; String HAST[] = new String[] {"\u590f\u5a01\u5937-\u963f\u7559\u7533\u7fa4\u5cf6\u6a19\u6e96\u6642\u9593", "HAST", - "\u590f\u5a01\u5937-\u963f\u7559\u7533\u7fa4\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "HADT"}; + "\u590f\u5a01\u5937-\u963f\u7559\u7533\u7fa4\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "HADT", + "\u590F\u5A01\u5937-\u963F\u7559\u7533\u6642\u9593", "HAT"}; String HKT[] = new String[] {"\u9999\u6e2f\u6642\u9593", "HKT", - "\u9999\u6e2f\u590f\u4ee4\u6642\u9593", "HKST"}; + "\u9999\u6e2f\u590f\u4ee4\u6642\u9593", "HKST", + "\u9999\u6E2F\u6642\u9593", "HKT"}; String HST[] = new String[] {"\u590f\u5a01\u5937\u6a19\u6e96\u6642\u9593", "HST", - "\u590f\u5a01\u5937\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "HDT"}; + "\u590f\u5a01\u5937\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "HDT", + "\u590F\u5A01\u5937\u6642\u9593", "HT"}; String ICT[] = new String[] {"\u5370\u5ea6\u652f\u90a3\u6642\u9593", "ICT", - "\u5370\u5ea6\u652f\u90a3\u590f\u4ee4\u6642\u9593", "ICST"}; + "\u5370\u5ea6\u652f\u90a3\u590f\u4ee4\u6642\u9593", "ICST", + "\u5370\u5EA6\u652F\u90A3\u6642\u9593", "ICT"}; String IRT[] = new String[] {"\u4f0a\u6717\u6a19\u6e96\u6642\u9593", "IRST", - "\u4f0a\u6717\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "IRDT"}; + "\u4f0a\u6717\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "IRDT", + "\u4F0A\u6717\u6642\u9593", "IRT"}; String ISRAEL[] = new String[] {"\u4ee5\u8272\u5217\u6a19\u6e96\u6642\u9593", "IST", - "\u4ee5\u8272\u5217\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "IDT"}; + "\u4ee5\u8272\u5217\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "IDT", + "\u4EE5\u8272\u5217\u6642\u9593", "IT"}; String IST[] = new String[] {"\u5370\u5ea6\u6a19\u6e96\u6642\u9593", "IST", - "\u5370\u5ea6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "IDT"}; + "\u5370\u5ea6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "IDT", + "\u5370\u5EA6\u6642\u9593", "IT"}; String JST[] = new String[] {"\u65e5\u672c\u6a19\u6e96\u6642\u9593", "JST", - "\u65e5\u672c\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "JDT"}; + "\u65e5\u672c\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "JDT", + "\u65E5\u672C\u6642\u9593", "JT"}; String KST[] = new String[] {"\u97d3\u570b\u6a19\u6e96\u6642\u9593", "KST", - "\u97d3\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "KDT"}; + "\u97d3\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "KDT", + "\u97D3\u570B\u6642\u9593", "KT"}; String LORD_HOWE[] = new String[] {"\u8c6a\u52f3\u7235\u5cf6\u6a19\u6e96\u6642\u9593", "LHST", - "\u8c6a\u52f3\u7235\u5cf6\u590f\u4ee4\u6642\u9593", "LHST"}; + "\u8c6a\u52f3\u7235\u5cf6\u590f\u4ee4\u6642\u9593", "LHST", + "\u8C6A\u52F3\u7235\u5CF6\u6642\u9593", "LHT"}; String MHT[] = new String[] {"\u99ac\u7d39\u723e\u7fa4\u5cf6\u6642\u9593", "MHT", - "\u99ac\u7d39\u723e\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "MHST"}; + "\u99ac\u7d39\u723e\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "MHST", + "\u99AC\u7D39\u723E\u7FA4\u5CF6\u6642\u9593", "MHT"}; String MSK[] = new String[] {"\u83ab\u65af\u79d1\u6a19\u6e96\u6642\u9593", "MSK", - "\u83ab\u65af\u79d1\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "MSD"}; + "\u83ab\u65af\u79d1\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "MSD", + "\u83AB\u65AF\u79D1\u6642\u9593", "MT"}; String MST[] = new String[] {"\u5c71\u5340\u6a19\u6e96\u6642\u9593", "MST", - "\u5c71\u5340\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "MDT"}; + "\u5c71\u5340\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "MDT", + "\u7F8E\u570B\u5C71\u5340\u6642\u9593", "MT"}; String MYT[] = new String[] {"\u99ac\u4f86\u897f\u4e9e\u6642\u9593", "MYT", - "\u99ac\u4f86\u897f\u4e9e\u590f\u4ee4\u6642\u9593", "MYST"}; + "\u99ac\u4f86\u897f\u4e9e\u590f\u4ee4\u6642\u9593", "MYST", + "\u99AC\u4F86\u897F\u4E9E\u6642\u9593", "MYT"}; String NORONHA[] = new String[] {"\u8cbb\u723e\u5357\u591a-\u8fea\u8afe\u7f85\u5c3c\u4e9e\u6642\u9593", "FNT", - "\u8cbb\u723e\u5357\u591a-\u8fea\u8afe\u7f85\u5c3c\u4e9e\u590f\u4ee4\u6642\u9593", "FNST"}; + "\u8cbb\u723e\u5357\u591a-\u8fea\u8afe\u7f85\u5c3c\u4e9e\u590f\u4ee4\u6642\u9593", "FNST", + "\u8CBB\u723E\u5357\u591A-\u8FEA\u8AFE\u7F85\u5C3C\u4E9E\u6642\u9593", "FNT"}; String NOVT[] = new String[] {"Novosibirsk \u6642\u9593", "NOVT", - "Novosibirsk \u590f\u4ee4\u6642\u9593", "NOVST"}; + "Novosibirsk \u590f\u4ee4\u6642\u9593", "NOVST", + "\u65B0\u897F\u4F2F\u5229\u4E9E\u6642\u9593", "NOVT"}; String NPT[] = new String[] {"\u5c3c\u6cca\u723e\u6642\u9593", "NPT", - "\u5c3c\u6cca\u723e\u590f\u4ee4\u6642\u9593", "NPST"}; + "\u5c3c\u6cca\u723e\u590f\u4ee4\u6642\u9593", "NPST", + "\u5C3C\u6CCA\u723E\u6642\u9593", "NPT"}; String NST[] = new String[] {"\u7d10\u82ac\u862d\u6a19\u6e96\u6642\u9593", "NST", - "\u7d10\u82ac\u862d\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "NDT"}; + "\u7d10\u82ac\u862d\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "NDT", + "\u7D10\u82AC\u862D\u6642\u9593", "NT"}; String NZST[] = new String[] {"\u7d10\u897f\u862d\u6a19\u6e96\u6642\u9593", "NZST", - "\u7d10\u897f\u862d\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "NZDT"}; + "\u7d10\u897f\u862d\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "NZDT", + "\u7D10\u897F\u862D\u6642\u9593", "NZT"}; String PITCAIRN[] = new String[] {"\u76ae\u7279\u5eb7\u6a19\u6e96\u6642\u9593", "PST", - "\u76ae\u7279\u5eb7\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"}; + "\u76ae\u7279\u5eb7\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT", + "\u76AE\u7279\u5EB7\u6642\u9593", "PT"}; String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u6642\u9593", "PKT", - "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u6642\u9593", "PKST"}; + "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u6642\u9593", "PKST", + "\u5DF4\u57FA\u65AF\u5766\u6642\u9593", "PKT"}; String PONT[] = new String[] {"\u6CE2\u7D0D\u4F69\u6642\u9593", "PONT", - "\u6CE2\u7D0D\u4F69\u590F\u4EE4\u6642\u9593", "PONST"}; + "\u6CE2\u7D0D\u4F69\u590F\u4EE4\u6642\u9593", "PONST", + "\u6CE2\u7D0D\u4F69\u5CF6\u6642\u9593", "PONT"}; String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642\u9593", "PST", - "\u592a\u5e73\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"}; + "\u592a\u5e73\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT", + "\u592A\u5E73\u6D0B\u6642\u9593", "PT"}; String SAST[] = new String[] {"\u5357\u975e\u6a19\u6e96\u6642\u9593", "SAST", - "\u5357\u975e\u590f\u4ee4\u6642\u9593", "SAST"}; + "\u5357\u975e\u590f\u4ee4\u6642\u9593", "SAST", + "\u5357\u975E\u6642\u9593", "SAT"}; String SBT[] = new String[] {"\u6240\u7f85\u9580\u7fa4\u5cf6\u6642\u9593", "SBT", - "\u6240\u7f85\u9580\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "SBST"}; + "\u6240\u7f85\u9580\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "SBST", + "\u6240\u7F85\u9580\u7FA4\u5CF6\u6642\u9593", "SBT"}; String SGT[] = new String[] {"\u65b0\u52a0\u5761\u6642\u9593", "SGT", - "\u65b0\u52a0\u5761\u590f\u4ee4\u6642\u9593", "SGST"}; + "\u65b0\u52a0\u5761\u590f\u4ee4\u6642\u9593", "SGST", + "\u65B0\u52A0\u5761\u6642\u9593", "SGT"}; String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT", - "\u7345\u5b50\u5c71\u590f\u4ee4\u6642\u9593", "SLST"}; + "\u7345\u5b50\u5c71\u590f\u4ee4\u6642\u9593", "SLST", + "\u7345\u5B50\u5C71\u6642\u9593", "SLT"}; String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST", - "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST"}; + "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST", + "\u6FB3\u5927\u5229\u4E9E\u6771\u90E8\u6642\u9593 (\u5854\u65AF\u99AC\u5C3C\u4E9E\u5CF6)", "ET"}; String TMT[] = new String[] {"\u571f\u5eab\u66fc\u6642\u9593", "TMT", - "\u571f\u5eab\u66fc\u590f\u4ee4\u6642\u9593", "TMST"}; + "\u571f\u5eab\u66fc\u590f\u4ee4\u6642\u9593", "TMST", + "\u571F\u5EAB\u66FC\u6642\u9593", "TMT"}; String ULAT[]= new String[] {"\u5eab\u502b\u6642\u9593", "ULAT", - "\u5eab\u502b\u590f\u4ee4\u6642\u9593", "ULAST"}; + "\u5eab\u502b\u590f\u4ee4\u6642\u9593", "ULAST", + "\u5EAB\u502B\u6642\u9593", "ULAT"}; String WART[] = new String[] {"\u897f\u963f\u6839\u5ef7\u6642\u9593", "WART", "\u897f\u963f\u6839\u5ef7\u590f\u4ee4\u6642\u9593", "WARST"}; String WAT[] = new String[] {"\u897f\u975e\u6642\u9593", "WAT", - "\u897f\u975e\u590f\u4ee4\u6642\u9593", "WAST"}; + "\u897f\u975e\u590f\u4ee4\u6642\u9593", "WAST", + "\u897F\u975E\u6642\u9593", "WAT"}; String WET[] = new String[] {"\u897f\u6b50\u6642\u9593", "WET", - "\u897f\u6b50\u590f\u4ee4\u6642\u9593", "WEST"}; + "\u897f\u6b50\u590f\u4ee4\u6642\u9593", "WEST", + "\u897F\u6B50\u6642\u9593", "WET"}; String WIT[] = new String[] {"\u897f\u5370\u5c3c\u6642\u9593", "WIB", - "\u897f\u5370\u5c3c\u590f\u4ee4\u6642\u9593", "WIST"}; + "\u897f\u5370\u5c3c\u590f\u4ee4\u6642\u9593", "WIST", + "\u897F\u5370\u5C3C\u6642\u9593", "WIB"}; String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST", - "\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST"}; + "\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST", + "\u897F\u90E8\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WT"}; String SAMOA[] = new String[] {"\u85a9\u6469\u4e9e\u6a19\u6e96\u6642\u9593", "SST", - "\u85a9\u6469\u4e9e\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "SDT"}; + "\u85a9\u6469\u4e9e\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "SDT", + "\u85A9\u6469\u4E9E\u6642\u9593", "ST"}; String WST_SAMOA[] = new String[] {"\u897f\u85a9\u6469\u4e9e\u6642\u9593", "WST", - "\u897f\u85a9\u6469\u4e9e\u590f\u4ee4\u6642\u9593", "WSDT"}; + "\u897f\u85a9\u6469\u4e9e\u590f\u4ee4\u6642\u9593", "WSDT", + "\u897F\u85A9\u6469\u4E9E\u6642\u9593", "WST"}; String ChST[] = new String[] {"\u67e5\u83ab\u6d1b\u6a19\u6e96\u6642\u9593", "ChST", - "\u67e5\u83ab\u6d1b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ChDT"}; + "\u67e5\u83ab\u6d1b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ChDT", + "\u67E5\u83AB\u7F85\u6642\u9593", "ChT"}; String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST", - "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST"}; + "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST", + "\u6771\u90E8\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E)", "ET"}; String UTC[] = new String[] {"\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC", - "\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC"}; + "\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC", + "\u5354\u8ABF\u4E16\u754C\u6642\u9593", "UTC"}; String UZT[] = new String[] {"\u70cf\u8332\u5225\u514b\u65af\u5766\u6642\u9593", "UZT", - "\u70cf\u8332\u5225\u514b\u65af\u5766\u590f\u4ee4\u6642\u9593", "UZST"}; + "\u70cf\u8332\u5225\u514b\u65af\u5766\u590f\u4ee4\u6642\u9593", "UZST", + "\u70CF\u8332\u5225\u514B\u65AF\u5766\u6642\u9593", "UZT"}; return new Object[][] { {"America/Los_Angeles", PST}, @@ -311,7 +387,8 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Argentina/Ushuaia", AGT}, {"America/Aruba", AST}, {"America/Asuncion", new String[] {"\u5df4\u62c9\u572d\u6642\u9593", "PYT", - "\u5df4\u62c9\u572d\u590f\u4ee4\u6642\u9593", "PYST"}}, + "\u5df4\u62c9\u572d\u590f\u4ee4\u6642\u9593", "PYST", + "\u5DF4\u62C9\u572D\u6642\u9593", "PYT"}}, {"America/Atikokan", EST}, {"America/Atka", HAST}, {"America/Bahia", BRT}, @@ -322,17 +399,20 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Blanc-Sablon", AST}, {"America/Boa_Vista", AMT}, {"America/Bogota", new String[] {"\u54e5\u502b\u6bd4\u4e9e\u6642\u9593", "COT", - "\u54e5\u502b\u6bd4\u4e9e\u590f\u4ee4\u6642\u9593", "COST"}}, + "\u54e5\u502b\u6bd4\u4e9e\u590f\u4ee4\u6642\u9593", "COST", + "\u54E5\u502B\u6BD4\u4E9E\u6642\u9593", "COT"}}, {"America/Boise", MST}, {"America/Buenos_Aires", AGT}, {"America/Cambridge_Bay", MST}, {"America/Campo_Grande", AMT}, {"America/Cancun", CST}, {"America/Caracas", new String[] {"\u59d4\u5167\u745e\u62c9\u6642\u9593", "VET", - "\u59d4\u5167\u745e\u62c9\u590f\u4ee4\u6642\u9593", "VEST"}}, + "\u59d4\u5167\u745e\u62c9\u590f\u4ee4\u6642\u9593", "VEST", + "\u59D4\u5167\u745E\u62C9\u6642\u9593", "VET"}}, {"America/Catamarca", AGT}, {"America/Cayenne", new String[] {"\u6cd5\u5c6c\u572d\u4e9e\u90a3\u6642\u9593", "GFT", - "\u6cd5\u5c6c\u572d\u4e9e\u90a3\u590f\u4ee4\u6642\u9593", "GFST"}}, + "\u6cd5\u5c6c\u572d\u4e9e\u90a3\u590f\u4ee4\u6642\u9593", "GFST", + "\u6CD5\u5C6C\u572D\u4E9E\u90A3\u6642\u9593", "GFT"}}, {"America/Cayman", EST}, {"America/Chihuahua", MST}, {"America/Creston", MST}, @@ -354,16 +434,19 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Fortaleza", BRT}, {"America/Glace_Bay", AST}, {"America/Godthab", new String[] {"\u897f\u683c\u6797\u862d\u5cf6\u6642\u9593", "WGT", - "\u897f\u683c\u6797\u862d\u5cf6\u590f\u4ee4\u6642\u9593", "WGST"}}, + "\u897f\u683c\u6797\u862d\u5cf6\u590f\u4ee4\u6642\u9593", "WGST", + "\u897F\u683C\u9675\u862D\u6642\u9593", "WGT"}}, {"America/Goose_Bay", AST}, {"America/Grand_Turk", EST}, {"America/Grenada", AST}, {"America/Guadeloupe", AST}, {"America/Guatemala", CST}, {"America/Guayaquil", new String[] {"\u5384\u74dc\u591a\u723e\u6642\u9593", "ECT", - "\u5384\u74dc\u591a\u723e\u590f\u4ee4\u6642\u9593", "ECST"}}, + "\u5384\u74dc\u591a\u723e\u590f\u4ee4\u6642\u9593", "ECST", + "\u5384\u74DC\u591A\u723E\u6642\u9593", "ECT"}}, {"America/Guyana", new String[] {"\u84cb\u4e9e\u90a3\u6642\u9593", "GYT", - "\u84cb\u4e9e\u90a3\u590f\u4ee4\u6642\u9593", "GYST"}}, + "\u84cb\u4e9e\u90a3\u590f\u4ee4\u6642\u9593", "GYST", + "\u84CB\u4E9E\u90A3\u6642\u9593", "GYT"}}, {"America/Havana", CUBA}, {"America/Hermosillo", MST}, {"America/Indiana/Indianapolis", EST}, @@ -384,9 +467,11 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Knox_IN", CST}, {"America/Kralendijk", AST}, {"America/La_Paz", new String[] {"\u73bb\u5229\u7dad\u4e9e\u6642\u9593", "BOT", - "\u73bb\u5229\u7dad\u4e9e\u590f\u4ee4\u6642\u9593", "BOST"}}, + "\u73bb\u5229\u7dad\u4e9e\u590f\u4ee4\u6642\u9593", "BOST", + "\u73BB\u5229\u7DAD\u4E9E\u6642\u9593", "BOT"}}, {"America/Lima", new String[] {"\u7955\u9b6f\u6642\u9593", "PET", - "\u7955\u9b6f\u590f\u4ee4\u6642\u9593", "PEST"}}, + "\u7955\u9b6f\u590f\u4ee4\u6642\u9593", "PEST", + "\u7955\u9B6F\u6642\u9593", "PET"}}, {"America/Louisville", EST}, {"America/Lower_Princes", AST}, {"America/Maceio", BRT}, @@ -400,13 +485,16 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Menominee", CST}, {"America/Merida", CST}, {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6A19\u6E96\u6642\u9593", "MeST", - "\u6885\u7279\u62C9\u5361\u7279\u62C9\u65E5\u5149\u7BC0\u7D04\u6642\u9593", "MeDT"}}, + "\u6885\u7279\u62C9\u5361\u7279\u62C9\u65E5\u5149\u7BC0\u7D04\u6642\u9593", "MeDT", + "\u6885\u7279\u62C9\u5361\u7279\u62C9\u6642\u9593", "MeT"}}, {"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"}}, + "\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PMDT", + "\u8056\u5F7C\u5FB7\u8207\u5BC6\u555F\u5D19\u6642\u9593", "PMT"}}, {"America/Moncton", AST}, {"America/Montevideo", new String[] {"\u70cf\u62c9\u572d\u6642\u9593", "UYT", - "\u70cf\u62c9\u572d\u590f\u4ee4\u6642\u9593", "UYST"}}, + "\u70cf\u62c9\u572d\u590f\u4ee4\u6642\u9593", "UYST", + "\u70CF\u62C9\u572D\u6642\u9593", "UYT"}}, {"America/Monterrey", CST}, {"America/Montreal", EST}, {"America/Montserrat", AST}, @@ -421,7 +509,8 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Panama", EST}, {"America/Pangnirtung", EST}, {"America/Paramaribo", new String[] {"\u8607\u5229\u5357\u6642\u9593", "SRT", - "\u8607\u5229\u5357\u590f\u4ee4\u6642\u9593", "SRST"}}, + "\u8607\u5229\u5357\u590f\u4ee4\u6642\u9593", "SRST", + "\u8607\u5229\u5357\u6642\u9593", "SRT"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, {"America/Porto_Acre", ACT}, @@ -461,124 +550,157 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Yellowknife", MST}, {"Antarctica/Casey", WST_AUS}, {"Antarctica/Davis", new String[] {"\u81fa\u7dad\u65af\u6642\u9593", "DAVT", - "\u81fa\u7dad\u65af\u590f\u4ee4\u6642\u9593", "DAVST"}}, + "\u81fa\u7dad\u65af\u590f\u4ee4\u6642\u9593", "DAVST", + "\u81FA\u7DAD\u65AF\u6642\u9593", "DAVT"}}, {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u6642\u9593", "DDUT", - "Dumont-d'Urville \u590f\u4ee4\u6642\u9593", "DDUST"}}, + "Dumont-d'Urville \u590f\u4ee4\u6642\u9593", "DDUST", + "Dumont-d'Urville \u6642\u9593", "DDUT"}}, {"Antarctica/Macquarie", new String[] {"\u9EA5\u5938\u5229\u5CF6\u6642\u9593", "MIST", - "\u9EA5\u5938\u5229\u5CF6\u590F\u4EE4\u6642\u9593", "MIST"}}, + "\u9EA5\u5938\u5229\u5CF6\u590F\u4EE4\u6642\u9593", "MIST", + "\u9EA5\u5938\u5229\u5CF6\u6642\u9593", "MIST"}}, {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u6642\u9593", "MAWT", - "\u83ab\u68ee\u590f\u4ee4\u6642\u9593", "MAWST"}}, + "\u83ab\u68ee\u590f\u4ee4\u6642\u9593", "MAWST", + "\u83AB\u68EE\u6642\u9593", "MAWT"}}, {"Antarctica/McMurdo", NZST}, {"Antarctica/Palmer", CLT}, {"Antarctica/Rothera", new String[] {"\u7f85\u897f\u62c9\u6642\u9593", "ROTT", - "\u7f85\u897f\u62c9\u590f\u4ee4\u6642\u9593", "ROTST"}}, + "\u7f85\u897f\u62c9\u590f\u4ee4\u6642\u9593", "ROTST", + "\u7F85\u897F\u62C9\u6642\u9593", "ROTT"}}, {"Antarctica/South_Pole", NZST}, {"Antarctica/Syowa", new String[] {"\u5915\u6b50\u74e6 (Syowa) \u6642\u9593", "SYOT", - "\u5915\u6b50\u74e6 (Syowa) \u590f\u4ee4\u6642\u9593", "SYOST"}}, + "\u5915\u6b50\u74e6 (Syowa) \u590f\u4ee4\u6642\u9593", "SYOST", + "\u5915\u6B50\u74E6 (Syowa) \u6642\u9593", "SYOT"}}, {"Antarctica/Vostok", new String[] {"\u4f5b\u65af\u6258 (Vostok) \u6642\u9593", "VOST", - "\u4f5b\u65af\u6258 (Vostok) \u590f\u4ee4\u6642\u9593", "VOSST"}}, + "\u4f5b\u65af\u6258 (Vostok) \u590f\u4ee4\u6642\u9593", "VOSST", + "\u4F5B\u65AF\u6258 (Vostok) \u6642\u9593", "VOST"}}, {"Arctic/Longyearbyen", CET}, {"Asia/Aden", ARAST}, {"Asia/Almaty", new String[] {"Alma-Ata \u6642\u9593", "ALMT", - "Alma-Ata \u590f\u4ee4\u6642\u9593", "ALMST"}}, + "Alma-Ata \u590f\u4ee4\u6642\u9593", "ALMST", + "\u963F\u62C9\u6728\u5716\u6642\u9593", "ALMT"}}, {"Asia/Amman", ARAST}, {"Asia/Anadyr", new String[] {"\u963f\u90a3\u5e95\u6cb3\u6642\u9593", "ANAT", - "\u963f\u90a3\u5e95\u6cb3\u590f\u4ee4\u6642\u9593", "ANAST"}}, + "\u963f\u90a3\u5e95\u6cb3\u590f\u4ee4\u6642\u9593", "ANAST", + "\u963F\u90A3\u5E95\u6CB3\u6642\u9593", "ANAT"}}, {"Asia/Aqtau", new String[] {"Aqtau \u6642\u9593", "AQTT", - "Aqtau \u590f\u4ee4\u6642\u9593", "AQTST"}}, + "Aqtau \u590f\u4ee4\u6642\u9593", "AQTST", + "\u963F\u514B\u5957\u6642\u9593", "AQTT"}}, {"Asia/Aqtobe", new String[] {"Aqtobe \u6642\u9593", "AQTT", - "Aqtobe \u590f\u4ee4\u6642\u9593", "AQTST"}}, + "Aqtobe \u590f\u4ee4\u6642\u9593", "AQTST", + "\u963F\u514B\u6258\u5225\u6642\u9593", "AQTT"}}, {"Asia/Ashgabat", TMT}, {"Asia/Ashkhabad", TMT}, {"Asia/Baghdad", ARAST}, {"Asia/Bahrain", ARAST}, {"Asia/Baku", new String[] {"\u4e9e\u585e\u62dc\u7136\u6642\u9593", "AZT", - "\u4e9e\u585e\u62dc\u7136\u590f\u4ee4\u6642\u9593", "AZST"}}, + "\u4e9e\u585e\u62dc\u7136\u590f\u4ee4\u6642\u9593", "AZST", + "\u4E9E\u585E\u62DC\u7136\u6642\u9593", "AZT"}}, {"Asia/Bangkok", ICT}, {"Asia/Beirut", EET}, {"Asia/Bishkek", new String[] {"Kirgizstan \u6642\u9593", "KGT", - "Kirgizstan \u590f\u4ee4\u6642\u9593", "KGST"}}, + "Kirgizstan \u590f\u4ee4\u6642\u9593", "KGST", + "\u5409\u723E\u5409\u65AF\u6642\u9593", "KGT"}}, {"Asia/Brunei", new String[] {"\u6c76\u840a\u6642\u9593", "BNT", - "\u6c76\u840a\u590f\u4ee4\u6642\u9593", "BNST"}}, + "\u6c76\u840a\u590f\u4ee4\u6642\u9593", "BNST", + "\u6C76\u840A\u6642\u9593", "BNT"}}, {"Asia/Calcutta", IST}, {"Asia/Choibalsan", new String[] {"\u5de7\u5df4\u5c71 (Choibalsan) \u6642\u9593", "CHOT", - "\u5de7\u5df4\u5c71 (Choibalsan) \u590f\u4ee4\u6642\u9593", "CHOST"}}, + "\u5de7\u5df4\u5c71 (Choibalsan) \u590f\u4ee4\u6642\u9593", "CHOST", + "\u5DE7\u5DF4\u5C71 (Choibalsan) \u6642\u9593", "CHOT"}}, {"Asia/Chongqing", CTT}, {"Asia/Chungking", CTT}, {"Asia/Colombo", IST}, {"Asia/Dacca", BDT}, {"Asia/Dhaka", BDT}, {"Asia/Dili", new String[] {"\u6771\u5e1d\u6c76\u6642\u9593", "TLT", - "\u6771\u5e1d\u6c76\u590f\u4ee4\u6642\u9593", "TLST"}}, + "\u6771\u5e1d\u6c76\u590f\u4ee4\u6642\u9593", "TLST", + "\u6771\u5E1D\u6C76\u6642\u9593", "TLT"}}, {"Asia/Damascus", EET}, {"Asia/Dubai", GST}, {"Asia/Dushanbe", new String[] {"\u5854\u5409\u514b\u6642\u9593", "TJT", - "\u5854\u5409\u514b\u590f\u4ee4\u6642\u9593", "TJST"}}, + "\u5854\u5409\u514b\u590f\u4ee4\u6642\u9593", "TJST", + "\u5854\u5409\u514B\u6642\u9593", "TJT"}}, {"Asia/Gaza", EET}, {"Asia/Harbin", CTT}, {"Asia/Hebron", EET}, {"Asia/Ho_Chi_Minh", ICT}, {"Asia/Hong_Kong", HKT}, {"Asia/Hovd", new String[] {"\u4faf\u5fb7 (Hovd) \u6642\u9593", "HOVT", - "\u4faf\u5fb7 (Hovd) \u590f\u4ee4\u6642\u9593", "HOVST"}}, + "\u4faf\u5fb7 (Hovd) \u590f\u4ee4\u6642\u9593", "HOVST", + "\u4FAF\u5FB7 (Hovd) \u6642\u9593", "HOVT"}}, {"Asia/Irkutsk", new String[] {"Irkutsk \u6642\u9593", "IRKT", - "Irkutsk \u590f\u4ee4\u6642\u9593", "IRKST"}}, + "Irkutsk \u590f\u4ee4\u6642\u9593", "IRKST", + "\u4F0A\u723E\u5EAB\u6B21\u514B\u6642\u9593", "IRKT"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, {"Asia/Jayapura", new String[] {"\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WIT", - "\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u65e5\u6642\u9593", "EIST"}}, + "\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u65e5\u6642\u9593", "EIST", + "\u6771\u5370\u5EA6\u5C3C\u897F\u4E9E\u6642\u9593", "WIT"}}, {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u6642\u9593", "AFT", - "\u963f\u5bcc\u6c57\u590f\u4ee4\u6642\u9593", "AFST"}}, + "\u963f\u5bcc\u6c57\u590f\u4ee4\u6642\u9593", "AFST", + "\u963F\u5BCC\u6C57\u6642\u9593", "AFT"}}, {"Asia/Kamchatka", new String[] {"Petropavlovsk-Kamchatski \u6642\u9593", "PETT", - "Petropavlovsk-Kamchatski \u590f\u4ee4\u6642\u9593", "PETST"}}, + "Petropavlovsk-Kamchatski \u590f\u4ee4\u6642\u9593", "PETST", + "Petropavlovsk-Kamchatski \u6642\u9593", "PETT"}}, {"Asia/Karachi", PKT}, {"Asia/Kashgar", CTT}, {"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) \u590F\u4EE4\u6642\u9593", "YAKST", + "\u6F22\u5730\u52A0 (Khandyga) \u6642\u9593", "YAKT"}}, {"Asia/Kolkata", IST}, {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u6642\u9593", "KRAT", - "\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u590f\u4ee4\u6642\u9593", "KRAST"}}, + "\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u590f\u4ee4\u6642\u9593", "KRAST", + "\u514B\u62C9\u65AF\u8AFE\u4E9E\u723E\u65AF\u514B\u6642\u9593", "KRAT"}}, {"Asia/Kuala_Lumpur", MYT}, {"Asia/Kuching", MYT}, {"Asia/Kuwait", ARAST}, {"Asia/Macao", CTT}, {"Asia/Macau", CTT}, {"Asia/Magadan", new String[] {"Magadan \u6642\u9593", "MAGT", - "Magadan \u590f\u4ee4\u6642\u9593", "MAGST"}}, + "Magadan \u590f\u4ee4\u6642\u9593", "MAGST", + "\u99AC\u52A0\u4E39\u6642\u9593", "MAGT"}}, {"Asia/Makassar", CIT}, {"Asia/Manila", new String[] {"\u83f2\u5f8b\u8cd3\u6642\u9593", "PHT", - "\u83f2\u5f8b\u8cd3\u590f\u4ee4\u6642\u9593", "PHST"}}, + "\u83f2\u5f8b\u8cd3\u590f\u4ee4\u6642\u9593", "PHST", + "\u83F2\u5F8B\u8CD3\u6642\u9593", "PHT"}}, {"Asia/Muscat", GST}, {"Asia/Nicosia", EET}, {"Asia/Novokuznetsk", NOVT}, {"Asia/Novosibirsk", NOVT}, {"Asia/Oral", new String[] {"\u6b50\u4f5b\u6642\u9593", "ORAT", - "\u6b50\u4f5b\u590f\u4ee4\u6642\u9593", "ORAST"}}, + "\u6b50\u4f5b\u590f\u4ee4\u6642\u9593", "ORAST", + "\u6B50\u4F5B\u6642\u9593", "ORAT"}}, {"Asia/Omsk", new String[] {"\u6b50\u59c6\u65af\u514b (Omsk) \u6642\u9593", "OMST", - "\u6b50\u59c6\u65af\u514b (Omsk) \u590f\u4ee4\u6642\u9593", "OMSST"}}, + "\u6b50\u59c6\u65af\u514b (Omsk) \u590f\u4ee4\u6642\u9593", "OMSST", + "\u6B50\u59C6\u65AF\u514B (Omsk) \u6642\u9593", "OMST"}}, {"Asia/Phnom_Penh", ICT}, {"Asia/Pontianak", WIT}, {"Asia/Pyongyang", KST}, {"Asia/Qatar", ARAST}, {"Asia/Qyzylorda", new String[] {"Qyzylorda \u6642\u9593", "QYZT", - "Qyzylorda \u590f\u4ee4\u6642\u9593", "QYZST"}}, + "Qyzylorda \u590f\u4ee4\u6642\u9593", "QYZST", + "\u514B\u5B5C\u6D1B\u723E\u9054\u6642\u9593", "QYZT"}}, {"Asia/Rangoon", new String[] {"\u7dec\u7538\u6642\u9593", "MMT", - "\u7dec\u7538\u590f\u4ee4\u6642\u9593", "MMST"}}, + "\u7dec\u7538\u590f\u4ee4\u6642\u9593", "MMST", + "\u7DEC\u7538\u6642\u9593", "MMT"}}, {"Asia/Riyadh", ARAST}, {"Asia/Saigon", ICT}, {"Asia/Sakhalin", new String[] {"\u5eab\u9801\u5cf6\u6642\u9593", "SAKT", - "\u5eab\u9801\u5cf6\u590f\u4ee4\u6642\u9593", "SAKST"}}, + "\u5eab\u9801\u5cf6\u590f\u4ee4\u6642\u9593", "SAKST", + "\u5EAB\u9801\u5CF6\u6642\u9593", "SAKT"}}, {"Asia/Samarkand", UZT}, {"Asia/Seoul", KST}, {"Asia/Singapore", SGT}, {"Asia/Taipei", new String[] {"\u53f0\u7063\u6a19\u6e96\u6642\u9593", "TST", - "\u53f0\u7063\u590f\u4ee4\u6642\u9593", "TDT"}}, + "\u53f0\u7063\u590f\u4ee4\u6642\u9593", "TDT", + "\u53f0\u7063\u6642\u9593", "TT"}}, {"Asia/Tel_Aviv", ISRAEL}, {"Asia/Tashkent", UZT}, {"Asia/Tbilisi", new String[] {"\u55ac\u6cbb\u4e9e\u6642\u9593", "GET", - "\u55ac\u6cbb\u4e9e\u590f\u4ee4\u6642\u9593", "GEST"}}, + "\u55ac\u6cbb\u4e9e\u590f\u4ee4\u6642\u9593", "GEST", + "\u55AC\u6CBB\u4E9E\u6642\u9593", "GET"}}, {"Asia/Tehran", IRT}, {"Asia/Thimbu", BTT}, {"Asia/Thimphu", BTT}, @@ -587,31 +709,39 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, {"Asia/Ust-Nera", new String[] {"\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u6642\u9593", "VLAT", - "\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u590F\u4EE4\u6642\u9593", "VLAST"}}, + "\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u590F\u4EE4\u6642\u9593", "VLAST", + "\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u6642\u9593", "VLAT"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", new String[] {"\u6d77\u53c3\u5d34\u6642\u9593", "VLAT", - "\u6d77\u53c3\u5d34\u590f\u4ee4\u6642\u9593", "VLAST"}}, + "\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\u590f\u4ee4\u6642\u9593", "YAKST", + "\u4E9E\u5EAB\u6B21\u514B\u6642\u9593", "YAKT"}}, {"Asia/Yekaterinburg", new String[] {"Yekaterinburg \u6642\u9593", "YEKT", - "Yekaterinburg \u590f\u4ee4\u6642\u9593", "YEKST"}}, + "Yekaterinburg \u590f\u4ee4\u6642\u9593", "YEKST", + "\u8449\u5361\u6377\u7433\u5821\u6642\u9593", "YEKT"}}, {"Asia/Yerevan", ARMT}, {"Atlantic/Azores", new String[] {"\u4e9e\u901f\u723e\u7fa4\u5cf6\u6642\u9593", "AZOT", - "\u4e9e\u901f\u723e\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "AZOST"}}, + "\u4e9e\u901f\u723e\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "AZOST", + "\u4E9E\u901F\u723E\u7FA4\u5CF6\u6642\u9593", "AZOT"}}, {"Atlantic/Bermuda", AST}, {"Atlantic/Canary", WET}, {"Atlantic/Cape_Verde", new String[] {"\u4f5b\u5fb7\u89d2\u6642\u9593", "CVT", - "\u4f5b\u5fb7\u89d2\u590f\u4ee4\u6642\u9593", "CVST"}}, + "\u4f5b\u5fb7\u89d2\u590f\u4ee4\u6642\u9593", "CVST", + "\u4F5B\u5FB7\u89D2\u6642\u9593", "CVT"}}, {"Atlantic/Faeroe", WET}, {"Atlantic/Faroe", WET}, {"Atlantic/Jan_Mayen", CET}, {"Atlantic/Madeira", WET}, {"Atlantic/Reykjavik", GMT}, {"Atlantic/South_Georgia", new String[] {"\u5357\u55ac\u6cbb\u4e9e\u6a19\u6e96\u6642\u9593", "GST", - "\u5357\u55ac\u6cbb\u4e9e\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "GDT"}}, + "\u5357\u55ac\u6cbb\u4e9e\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "GDT", + "\u5357\u55AC\u6CBB\u4E9E\u6642\u9593", "GT"}}, {"Atlantic/St_Helena", GMT}, {"Atlantic/Stanley", new String[] {"\u798f\u514b\u862d\u7fa4\u5cf6\u6642\u9593", "FKT", - "\u798f\u514b\u862d\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "FKST"}}, + "\u798f\u514b\u862d\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "FKST", + "\u798F\u514B\u862D\u7FA4\u5CF6\u6642\u9593", "FKT"}}, {"Australia/ACT", EST_NSW}, {"Australia/Adelaide", ADELAIDE}, {"Australia/Brisbane", BRISBANE}, @@ -620,7 +750,8 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST", - "\u4E2D\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST"}}, + "\u4E2D\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST", + "\u4E2D\u897F\u90E8\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWT"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, @@ -705,7 +836,8 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"Europe/Riga", EET}, {"Europe/Rome", CET}, {"Europe/Samara", new String[] {"\u6c99\u99ac\u62c9\u6642\u9593", "SAMT", - "\u6c99\u99ac\u62c9\u590f\u4ee4\u6642\u9593", "SAMST"}}, + "\u6c99\u99ac\u62c9\u590f\u4ee4\u6642\u9593", "SAMST", + "\u6C99\u99AC\u62C9\u6642\u9593", "SAMT"}}, {"Europe/San_Marino", CET}, {"Europe/Sarajevo", CET}, {"Europe/Simferopol", EET}, @@ -721,7 +853,8 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"Europe/Vienna", CET}, {"Europe/Vilnius", EET}, {"Europe/Volgograd", new String[] {"\u4f0f\u723e\u52a0\u683c\u52d2\u6642\u9593", "VOLT", - "\u4f0f\u723e\u52a0\u683c\u52d2\u590f\u4ee4\u6642\u9593", "VOLST"}}, + "\u4f0f\u723e\u52a0\u683c\u52d2\u590f\u4ee4\u6642\u9593", "VOLST", + "\u4F0F\u723E\u52A0\u683C\u52D2\u6642\u9593", "VOLT"}}, {"Europe/Warsaw", CET}, {"Europe/Zagreb", CET}, {"Europe/Zaporozhye", EET}, @@ -735,30 +868,39 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"IST", IST}, {"Indian/Antananarivo", EAT}, {"Indian/Chagos", new String[] {"\u5370\u5ea6\u6d0b\u5730\u5340\u6642\u9593", "IOT", - "\u5370\u5ea6\u6d0b\u5730\u5340\u590f\u4ee4\u6642\u9593", "IOST"}}, + "\u5370\u5ea6\u6d0b\u5730\u5340\u590f\u4ee4\u6642\u9593", "IOST", + "\u82F1\u5C6C\u5370\u5EA6\u6D0B\u5730\u5340", "IOT"}}, {"Indian/Christmas", new String[] {"\u8056\u8a95\u5cf6\u6642\u9593", "CXT", - "\u8056\u8a95\u5cf6\u590f\u4ee4\u6642\u9593", "CXST"}}, + "\u8056\u8a95\u5cf6\u590f\u4ee4\u6642\u9593", "CXST", + "\u8056\u8A95\u5CF6\u6642\u9593", "CIT"}}, {"Indian/Cocos", new String[] {"\u53ef\u53ef\u65af\u7fa4\u5cf6\u6642\u9593", "CCT", - "\u53ef\u53ef\u65af\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "CCST"}}, + "\u53ef\u53ef\u65af\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "CCST", + "\u53EF\u53EF\u65AF\u7FA4\u5CF6\u6642\u9593", "CCT"}}, {"Indian/Comoro", EAT}, {"Indian/Kerguelen", new String[] {"\u6cd5\u570b\u5357\u534a\u7403\u53ca\u5357\u6975\u5c6c\u5730\u6642\u9593", "TFT", - "\u6cd5\u570b\u5357\u534a\u7403\u53ca\u5357\u6975\u5c6c\u5730\u590f\u4ee4\u6642\u9593", "TFST"}}, + "\u6cd5\u570b\u5357\u534a\u7403\u53ca\u5357\u6975\u5c6c\u5730\u590f\u4ee4\u6642\u9593", "TFST", + "\u6CD5\u570B\u5357\u534A\u7403\u53CA\u5357\u6975\u5C6C\u5730\u6642\u9593", "TFT"}}, {"Indian/Mahe", new String[] {"\u585e\u5e2d\u723e\u7fa4\u5cf6\u6642\u9593", "SCT", - "\u585e\u5e2d\u723e\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "SCST"}}, + "\u585e\u5e2d\u723e\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "SCST", + "\u585E\u5E2D\u723E\u7FA4\u5CF6\u6642\u9593", "SCT"}}, {"Indian/Maldives", new String[] {"\u99ac\u723e\u5730\u592b\u6642\u9593", "MVT", - "\u99ac\u723e\u5730\u592b\u590f\u4ee4\u6642\u9593", "MVST"}}, + "\u99ac\u723e\u5730\u592b\u590f\u4ee4\u6642\u9593", "MVST", + "\u99AC\u723E\u5730\u592B\u6642\u9593", "MVT"}}, {"Indian/Mauritius", new String[] {"\u6469\u91cc\u897f\u65af\u6642\u9593", "MUT", - "\u6469\u91cc\u897f\u65af\u590f\u4ee4\u6642\u9593", "MUST"}}, + "\u6469\u91cc\u897f\u65af\u590f\u4ee4\u6642\u9593", "MUST", + "\u6469\u91CC\u897F\u65AF\u6642\u9593", "MUT"}}, {"Indian/Mayotte", EAT}, {"Indian/Reunion", new String[] {"\u7559\u5c3c\u65fa\u5cf6\u6642\u9593", "RET", - "\u7559\u5c3c\u65fa\u5cf6\u590f\u4ee4\u6642\u9593", "REST"}}, + "\u7559\u5c3c\u65fa\u5cf6\u590f\u4ee4\u6642\u9593", "REST", + "\u7559\u5C3C\u65FA\u5CF6\u6642\u9593", "RET"}}, {"Israel", ISRAEL}, {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, {"Libya", EET}, {"MET", new String[] {"\u4e2d\u6b50\u6642\u9593", "MET", - "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "MEST"}}, + "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "MEST", + "MET", "MET"}}, {"Mexico/BajaNorte", PST}, {"Mexico/BajaSur", MST}, {"Mexico/General", CST}, @@ -778,61 +920,82 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"Pacific/Chuuk", CHUT}, {"Pacific/Easter", EASTER}, {"Pacific/Efate", new String[] {"\u74e6\u5974\u963f\u5716\u6642\u9593", "VUT", - "\u74e6\u5974\u963f\u5716\u590f\u4ee4\u6642\u9593", "VUST"}}, + "\u74e6\u5974\u963f\u5716\u590f\u4ee4\u6642\u9593", "VUST", + "\u74E6\u5974\u963F\u5716\u6642\u9593", "VUT"}}, {"Pacific/Enderbury", new String[] {"\u83f2\u5c3c\u514b\u65af\u7fa4\u5cf6\u6642\u9593", "PHOT", - "\u83f2\u5c3c\u514b\u65af\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "PHOST"}}, + "\u83f2\u5c3c\u514b\u65af\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "PHOST", + "\u83F2\u5C3C\u514B\u65AF\u7FA4\u5CF6\u6642\u9593", "PHOT"}}, {"Pacific/Fakaofo", new String[] {"\u6258\u514b\u52de\u7fa4\u5cf6\u6642\u9593", "TKT", - "\u6258\u514b\u52de\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "TKST"}}, + "\u6258\u514b\u52de\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "TKST", + "\u6258\u514B\u52DE\u7FA4\u5CF6\u6642\u9593", "TKT"}}, {"Pacific/Fiji", new String[] {"\u6590\u6fdf\u6642\u9593", "FJT", - "\u6590\u6fdf\u590f\u4ee4\u6642\u9593", "FJST"}}, + "\u6590\u6fdf\u590f\u4ee4\u6642\u9593", "FJST", + "\u6590\u6FDF\u6642\u9593", "FJT"}}, {"Pacific/Funafuti", new String[] {"\u5410\u9b6f\u74e6\u6642\u9593", "TVT", - "\u5410\u9b6f\u74e6\u590f\u4ee4\u6642\u9593", "TVST"}}, + "\u5410\u9b6f\u74e6\u590f\u4ee4\u6642\u9593", "TVST", + "\u5410\u74E6\u9B6F\u6642\u9593", "TVT"}}, {"Pacific/Galapagos", new String[] {"\u52a0\u62c9\u5df4\u54e5\u6642\u9593", "GALT", - "\u52a0\u62c9\u5df4\u54e5\u590f\u4ee4\u6642\u9593", "GALST"}}, + "\u52a0\u62c9\u5df4\u54e5\u590f\u4ee4\u6642\u9593", "GALST", + "\u52A0\u62C9\u5DF4\u54E5\u6642\u9593", "GALT"}}, {"Pacific/Gambier", GAMBIER}, {"Pacific/Guadalcanal", SBT}, {"Pacific/Guam", ChST}, {"Pacific/Johnston", HST}, {"Pacific/Kiritimati", new String[] {"Line Is. \u6642\u9593", "LINT", - "Line Is. \u590f\u4ee4\u6642\u9593", "LINST"}}, + "Line Is. \u590f\u4ee4\u6642\u9593", "LINST", + "\u5217\u5DBC\u7FA4\u5CF6\u6642\u9593", "LINT"}}, {"Pacific/Kosrae", new String[] {"Kosrae \u6642\u9593", "KOST", - "Kosrae \u590f\u4ee4\u6642\u9593", "KOSST"}}, + "Kosrae \u590f\u4ee4\u6642\u9593", "KOSST", + "Kosrae \u6642\u9593", "KOST"}}, {"Pacific/Kwajalein", MHT}, {"Pacific/Majuro", MHT}, {"Pacific/Marquesas", new String[] {"\u99ac\u514b\u85a9\u65af\u6642\u9593", "MART", - "\u99ac\u514b\u85a9\u65af\u590f\u4ee4\u6642\u9593", "MARST"}}, + "\u99ac\u514b\u85a9\u65af\u590f\u4ee4\u6642\u9593", "MARST", + "\u99AC\u514B\u85A9\u65AF\u6642\u9593", "MART"}}, {"Pacific/Midway", SAMOA}, {"Pacific/Nauru", new String[] {"\u8afe\u9b6f\u6642\u9593", "NRT", - "\u8afe\u9b6f\u590f\u4ee4\u6642\u9593", "NRST"}}, + "\u8afe\u9b6f\u590f\u4ee4\u6642\u9593", "NRST", + "\u8AFE\u9B6F\u6642\u9593", "NRT"}}, {"Pacific/Niue", new String[] {"\u7d10\u5a01\u5cf6\u6642\u9593", "NUT", - "\u7d10\u5a01\u5cf6\u590f\u4ee4\u6642\u9593", "NUST"}}, + "\u7d10\u5a01\u5cf6\u590f\u4ee4\u6642\u9593", "NUST", + "\u7D10\u5A01\u5CF6\u6642\u9593", "NUT"}}, {"Pacific/Norfolk", new String[] {"\u8afe\u798f\u514b\u6642\u9593", "NFT", - "\u8afe\u798f\u514b\u590f\u4ee4\u6642\u9593", "NFST"}}, + "\u8afe\u798f\u514b\u590f\u4ee4\u6642\u9593", "NFST", + "\u8AFE\u798F\u514B\u6642\u9593", "NFT"}}, {"Pacific/Noumea", new String[] {"\u65b0\u52a0\u52d2\u591a\u5c3c\u4e9e\u6642\u9593", "NCT", - "\u65b0\u52a0\u52d2\u591a\u5c3c\u4e9e\u590f\u4ee4\u6642\u9593", "NCST"}}, + "\u65b0\u52a0\u52d2\u591a\u5c3c\u4e9e\u590f\u4ee4\u6642\u9593", "NCST", + "\u65B0\u52A0\u52D2\u591A\u5C3C\u4E9E\u6642\u9593", "NCT"}}, {"Pacific/Pago_Pago", SAMOA}, {"Pacific/Palau", new String[] {"\u5e1b\u7409\u6642\u9593", "PWT", - "\u5e1b\u7409\u590f\u4ee4\u6642\u9593", "PWST"}}, + "\u5e1b\u7409\u590f\u4ee4\u6642\u9593", "PWST", + "\u5E1B\u7409\u6642\u9593", "PWT"}}, {"Pacific/Pitcairn", PITCAIRN}, {"Pacific/Pohnpei", PONT}, {"Pacific/Ponape", PONT}, {"Pacific/Port_Moresby", new String[] {"\u5df4\u5e03\u4e9e\u65b0\u5e7e\u5167\u4e9e\u6642\u9593", "PGT", - "\u5df4\u5e03\u4e9e\u65b0\u5e7e\u5167\u4e9e\u590f\u4ee4\u6642\u9593", "PGST"}}, + "\u5df4\u5e03\u4e9e\u65b0\u5e7e\u5167\u4e9e\u590f\u4ee4\u6642\u9593", "PGST", + "\u5DF4\u5E03\u4E9E\u65B0\u5E7E\u5167\u4E9E\u6642\u9593", "PGT"}}, {"Pacific/Rarotonga", new String[] {"\u5eab\u514b\u7fa4\u5cf6\u6642\u9593", "CKT", - "\u5eab\u514b\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "CKHST"}}, + "\u5eab\u514b\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "CKHST", + "\u5EAB\u514B\u7FA4\u5CF6\u6642\u9593", "CKT"}}, {"Pacific/Saipan", ChST}, {"Pacific/Samoa", SAMOA}, {"Pacific/Tahiti", new String[] {"\u5927\u6eaa\u5730\u5cf6\u6642\u9593", "TAHT", - "\u5927\u6eaa\u5730\u5cf6\u590f\u4ee4\u6642\u9593", "TAHST"}}, + "\u5927\u6eaa\u5730\u5cf6\u590f\u4ee4\u6642\u9593", "TAHST", + "\u5927\u6EAA\u5730\u6642\u9593", "TAHT"}}, {"Pacific/Tarawa", new String[] {"\u5409\u4f2f\u7279\u7fa4\u5cf6\u6642\u9593", "GILT", - "\u5409\u4f2f\u7279\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "GILST"}}, + "\u5409\u4f2f\u7279\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "GILST", + "\u5409\u4F2F\u7279\u7FA4\u5CF6\u6642\u9593", "GILT"}}, {"Pacific/Tongatapu", new String[] {"\u6771\u52a0\u6642\u9593", "TOT", - "\u6771\u52a0\u590f\u4ee4\u6642\u9593", "TOST"}}, + "\u6771\u52a0\u590f\u4ee4\u6642\u9593", "TOST", + "\u6771\u52A0\u6642\u9593", "TOT"}}, {"Pacific/Truk", CHUT}, {"Pacific/Wake", new String[] {"\u5a01\u514b\u6642\u9593", "WAKT", - "\u5a01\u514b\u590f\u4ee4\u6642\u9593", "WAKST"}}, + "\u5a01\u514b\u590f\u4ee4\u6642\u9593", "WAKST", + "\u5A01\u514B\u6642\u9593", "WAKT"}}, {"Pacific/Wallis", new String[] {"\u74e6\u5229\u65af\u53ca\u798f\u675c\u7d0d\u7fa4\u5cf6\u6642\u9593", "WFT", - "\u74e6\u5229\u65af\u53ca\u798f\u675c\u7d0d\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "WFST"}}, + "\u74e6\u5229\u65af\u53ca\u798f\u675c\u7d0d\u7fa4\u5cf6\u590f\u4ee4\u6642\u9593", "WFST", + "\u74E6\u5229\u65AF\u53CA\u798F\u675C\u7D0D\u7FA4\u5CF6\u6642\u9593", "WFT"}}, {"Pacific/Yap", CHUT}, {"Poland", CET}, {"PRC", CTT}, diff --git a/jdk/src/share/javavm/export/jmm.h b/jdk/src/share/javavm/export/jmm.h index 3f938e25055..f55610d1c0a 100644 --- a/jdk/src/share/javavm/export/jmm.h +++ b/jdk/src/share/javavm/export/jmm.h @@ -153,6 +153,7 @@ typedef enum { JMM_VMGLOBAL_ORIGIN_ENVIRON_VAR = 4, /* Set via environment variables */ JMM_VMGLOBAL_ORIGIN_CONFIG_FILE = 5, /* Set via config file (such as .hotspotrc) */ JMM_VMGLOBAL_ORIGIN_ERGONOMIC = 6, /* Set via ergonomic */ + JMM_VMGLOBAL_ORIGIN_ATTACH_ON_DEMAND = 7, /* Set via attach */ JMM_VMGLOBAL_ORIGIN_OTHER = 99 /* Set via some other mechanism */ } jmmVMGlobalOrigin; diff --git a/jdk/src/share/lib/security/java.policy b/jdk/src/share/lib/security/java.policy index 3312bdf92f2..120694d6993 100644 --- a/jdk/src/share/lib/security/java.policy +++ b/jdk/src/share/lib/security/java.policy @@ -2,48 +2,48 @@ // Standard extensions get all permissions by default grant codeBase "file:${{java.ext.dirs}}/*" { - permission java.security.AllPermission; + permission java.security.AllPermission; }; // default permissions granted to all domains -grant { - // Allows any thread to stop itself using the java.lang.Thread.stop() - // method that takes no argument. - // Note that this permission is granted by default only to remain - // backwards compatible. - // It is strongly recommended that you either remove this permission - // from this policy file or further restrict it to code sources - // that you specify, because Thread.stop() is potentially unsafe. - // See the API specification of java.lang.Thread.stop() for more +grant { + // Allows any thread to stop itself using the java.lang.Thread.stop() + // method that takes no argument. + // Note that this permission is granted by default only to remain + // backwards compatible. + // It is strongly recommended that you either remove this permission + // from this policy file or further restrict it to code sources + // that you specify, because Thread.stop() is potentially unsafe. + // See the API specification of java.lang.Thread.stop() for more // information. - permission java.lang.RuntimePermission "stopThread"; + permission java.lang.RuntimePermission "stopThread"; - // allows anyone to listen on un-privileged ports - permission java.net.SocketPermission "localhost:1024-", "listen"; + // allows anyone to listen on dynamic ports + permission java.net.SocketPermission "localhost:0", "listen"; - // "standard" properies that can be read by anyone + // "standard" properies that can be read by anyone - permission java.util.PropertyPermission "java.version", "read"; - permission java.util.PropertyPermission "java.vendor", "read"; - permission java.util.PropertyPermission "java.vendor.url", "read"; - permission java.util.PropertyPermission "java.class.version", "read"; - permission java.util.PropertyPermission "os.name", "read"; - permission java.util.PropertyPermission "os.version", "read"; - permission java.util.PropertyPermission "os.arch", "read"; - permission java.util.PropertyPermission "file.separator", "read"; - permission java.util.PropertyPermission "path.separator", "read"; - permission java.util.PropertyPermission "line.separator", "read"; + permission java.util.PropertyPermission "java.version", "read"; + permission java.util.PropertyPermission "java.vendor", "read"; + permission java.util.PropertyPermission "java.vendor.url", "read"; + permission java.util.PropertyPermission "java.class.version", "read"; + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.version", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "file.separator", "read"; + permission java.util.PropertyPermission "path.separator", "read"; + permission java.util.PropertyPermission "line.separator", "read"; - permission java.util.PropertyPermission "java.specification.version", "read"; - permission java.util.PropertyPermission "java.specification.vendor", "read"; - permission java.util.PropertyPermission "java.specification.name", "read"; + permission java.util.PropertyPermission "java.specification.version", "read"; + permission java.util.PropertyPermission "java.specification.vendor", "read"; + permission java.util.PropertyPermission "java.specification.name", "read"; - permission java.util.PropertyPermission "java.vm.specification.version", "read"; - permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; - permission java.util.PropertyPermission "java.vm.specification.name", "read"; - permission java.util.PropertyPermission "java.vm.version", "read"; - permission java.util.PropertyPermission "java.vm.vendor", "read"; - permission java.util.PropertyPermission "java.vm.name", "read"; + permission java.util.PropertyPermission "java.vm.specification.version", "read"; + permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; + permission java.util.PropertyPermission "java.vm.specification.name", "read"; + permission java.util.PropertyPermission "java.vm.version", "read"; + permission java.util.PropertyPermission "java.vm.vendor", "read"; + permission java.util.PropertyPermission "java.vm.name", "read"; }; diff --git a/jdk/src/share/lib/security/java.security-linux b/jdk/src/share/lib/security/java.security-linux index fd49537f609..2734cb43a90 100644 --- a/jdk/src/share/lib/security/java.security-linux +++ b/jdk/src/share/lib/security/java.security-linux @@ -182,6 +182,7 @@ package.access=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -205,7 +206,7 @@ package.access=sun.,\ com.sun.org.glassfish.,\ com.oracle.xmlns.internal.,\ com.oracle.webservices.internal.,\ - oracle.jrockit.jfr.,\ + oracle.jrockit.jfr.,\ org.jcp.xml.dsig.internal.,\ jdk.internal.,\ jdk.nashorn.internal.,\ @@ -228,6 +229,7 @@ package.definition=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -251,7 +253,7 @@ package.definition=sun.,\ com.sun.org.glassfish.,\ com.oracle.xmlns.internal.,\ com.oracle.webservices.internal.,\ - oracle.jrockit.jfr.,\ + oracle.jrockit.jfr.,\ org.jcp.xml.dsig.internal.,\ jdk.internal.,\ jdk.nashorn.internal.,\ @@ -470,7 +472,7 @@ krb5.kdc.bad.policy = tryLast # jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 # # -jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing @@ -494,4 +496,3 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 # # Example: # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 - diff --git a/jdk/src/share/lib/security/java.security-macosx b/jdk/src/share/lib/security/java.security-macosx index 9d19d839a6d..5c3122d6420 100644 --- a/jdk/src/share/lib/security/java.security-macosx +++ b/jdk/src/share/lib/security/java.security-macosx @@ -183,6 +183,7 @@ package.access=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -229,6 +230,7 @@ package.definition=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -471,7 +473,7 @@ krb5.kdc.bad.policy = tryLast # jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 # # -jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing @@ -495,4 +497,3 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 # # Example: # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 - diff --git a/jdk/src/share/lib/security/java.security-solaris b/jdk/src/share/lib/security/java.security-solaris index ca271d735e7..1d3fb6ae428 100644 --- a/jdk/src/share/lib/security/java.security-solaris +++ b/jdk/src/share/lib/security/java.security-solaris @@ -184,6 +184,7 @@ package.access=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -207,7 +208,7 @@ package.access=sun.,\ com.sun.org.glassfish.,\ com.oracle.xmlns.internal.,\ com.oracle.webservices.internal.,\ - oracle.jrockit.jfr.,\ + oracle.jrockit.jfr.,\ org.jcp.xml.dsig.internal.,\ jdk.internal.,\ jdk.nashorn.internal.,\ @@ -229,6 +230,7 @@ package.definition=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -252,7 +254,7 @@ package.definition=sun.,\ com.sun.org.glassfish.,\ com.oracle.xmlns.internal.,\ com.oracle.webservices.internal.,\ - oracle.jrockit.jfr.,\ + oracle.jrockit.jfr.,\ org.jcp.xml.dsig.internal.,\ jdk.internal.,\ jdk.nashorn.internal.,\ @@ -470,7 +472,7 @@ krb5.kdc.bad.policy = tryLast # jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 # # -jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing @@ -494,4 +496,3 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 # # Example: # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 - diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows index 8a4cac15075..2566f113cc9 100644 --- a/jdk/src/share/lib/security/java.security-windows +++ b/jdk/src/share/lib/security/java.security-windows @@ -183,6 +183,7 @@ package.access=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -206,7 +207,7 @@ package.access=sun.,\ com.sun.org.glassfish.,\ com.oracle.xmlns.internal.,\ com.oracle.webservices.internal.,\ - oracle.jrockit.jfr.,\ + oracle.jrockit.jfr.,\ org.jcp.xml.dsig.internal.,\ jdk.internal.,\ jdk.nashorn.internal.,\ @@ -229,6 +230,7 @@ package.definition=sun.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.media.sound.,\ + com.sun.naming.internal.,\ com.sun.proxy.,\ com.sun.corba.se.,\ com.sun.org.apache.bcel.internal.,\ @@ -252,7 +254,7 @@ package.definition=sun.,\ com.sun.org.glassfish.,\ com.oracle.xmlns.internal.,\ com.oracle.webservices.internal.,\ - oracle.jrockit.jfr.,\ + oracle.jrockit.jfr.,\ org.jcp.xml.dsig.internal.,\ jdk.internal.,\ jdk.nashorn.internal.,\ @@ -471,7 +473,7 @@ krb5.kdc.bad.policy = tryLast # jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 # # -jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing @@ -495,4 +497,3 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 # # Example: # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 - diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/coding.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/coding.cpp index 6cedfd80de1..66ecc1bff63 100644 --- a/jdk/src/share/native/com/sun/java/util/jar/pack/coding.cpp +++ b/jdk/src/share/native/com/sun/java/util/jar/pack/coding.cpp @@ -32,6 +32,8 @@ #include #include +#include "jni_util.h" + #include "defines.h" #include "bytes.h" #include "utils.h" @@ -147,7 +149,7 @@ coding* coding::findBySpec(int spec) { break; } coding* ptr = NEW(coding, 1); - CHECK_NULL_0(ptr); + CHECK_NULL_RETURN(ptr, 0); coding* c = ptr->initFrom(spec); if (c == null) { mtrace('f', ptr, 0); diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h b/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h index b202892fa7e..644b9ca9af6 100644 --- a/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h +++ b/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h @@ -158,10 +158,6 @@ enum { false, true }; #define CHECK_(y) _CHECK_DO(aborting(), return y) #define CHECK_0 _CHECK_DO(aborting(), return 0) -#define CHECK_NULL(p) _CHECK_DO((p)==null, return) -#define CHECK_NULL_(y,p) _CHECK_DO((p)==null, return y) -#define CHECK_NULL_0(p) _CHECK_DO((p)==null, return 0) - #define CHECK_COUNT(t) if (t < 0){abort("bad value count");} CHECK #define STR_TRUE "true" diff --git a/jdk/src/share/native/common/jni_util.h b/jdk/src/share/native/common/jni_util.h index 4180756fccb..0dab24c3392 100644 --- a/jdk/src/share/native/common/jni_util.h +++ b/jdk/src/share/native/common/jni_util.h @@ -278,6 +278,15 @@ JNU_NotifyAll(JNIEnv *env, jobject object); #define IS_NULL(obj) ((obj) == NULL) #define JNU_IsNull(env,obj) ((obj) == NULL) +/************************************************************************ + * Miscellaneous utilities used by the class libraries to check for exceptions + */ + +#define CHECK_NULL(x) if ((x) == NULL) return; +#define CHECK_NULL_RETURN(x, y) if ((x) == NULL) return (y); + +#define CHECK_EXCEPTION(env) if ((*env)->ExceptionCheck(env)) return; +#define CHECK_EXCEPTION_RETURN(env, y) if ((*env)->ExceptionCheck(env)) return (y); /************************************************************************ * Debugging utilities diff --git a/jdk/src/share/native/java/net/net_util.h b/jdk/src/share/native/java/net/net_util.h index d38a5f52fcf..97351488877 100644 --- a/jdk/src/share/native/java/net/net_util.h +++ b/jdk/src/share/native/java/net/net_util.h @@ -42,9 +42,6 @@ #define NET_ERROR(env, ex, msg) \ { if (!(*env)->ExceptionOccurred(env)) JNU_ThrowByName(env, ex, msg) } -#define CHECK_NULL(x) if ((x) == NULL) return; -#define CHECK_NULL_RETURN(x, y) if ((x) == NULL) return y; - /************************************************************************ * Cached field IDs * diff --git a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c index 437f81a8632..021447e287f 100644 --- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c +++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c @@ -111,8 +111,9 @@ SplashDone(Splash * splash) int SplashIsStillLooping(Splash * splash) { - if (splash->currentFrame < 0) + if (splash->currentFrame < 0) { return 0; + } return splash->loopCount != 1 || splash->currentFrame + 1 < splash->frameCount; } @@ -121,17 +122,22 @@ void SplashUpdateScreenData(Splash * splash) { ImageRect srcRect, dstRect; + if (splash->currentFrame < 0) { + return; + } initRect(&srcRect, 0, 0, splash->width, splash->height, 1, splash->width * sizeof(rgbquad_t), splash->frames[splash->currentFrame].bitmapBits, &splash->imageFormat); - if (splash->screenData) + if (splash->screenData) { free(splash->screenData); + } splash->screenStride = splash->width * splash->screenFormat.depthBytes; - if (splash->byteAlignment > 1) + if (splash->byteAlignment > 1) { splash->screenStride = (splash->screenStride + splash->byteAlignment - 1) & ~(splash->byteAlignment - 1); + } splash->screenData = malloc(splash->height * splash->screenStride); initRect(&dstRect, 0, 0, splash->width, splash->height, 1, splash->screenStride, splash->screenData, &splash->screenFormat); @@ -146,16 +152,19 @@ SplashUpdateScreenData(Splash * splash) void SplashNextFrame(Splash * splash) { - if (splash->currentFrame < 0) + if (splash->currentFrame < 0) { return; + } do { - if (!SplashIsStillLooping(splash)) + if (!SplashIsStillLooping(splash)) { return; + } splash->time += splash->frames[splash->currentFrame].delay; if (++splash->currentFrame >= splash->frameCount) { splash->currentFrame = 0; - if (splash->loopCount > 0) + if (splash->loopCount > 0) { splash->loopCount--; + } } } while (splash->time + splash->frames[splash->currentFrame].delay - SplashTime() <= 0); @@ -183,8 +192,9 @@ BitmapToYXBandedRectangles(ImageRect * pSrcRect, RECT_T * out) pSrc += pSrcRect->depthBytes; ++i; } - if (i >= pSrcRect->numSamples) + if (i >= pSrcRect->numSamples) { break; + } i0 = i; while (i < pSrcRect->numSamples && getRGBA(pSrc, pSrcRect->format) >= ALPHA_THRESHOLD) { diff --git a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp index 493cea36843..3c68251d26f 100644 --- a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp @@ -55,7 +55,7 @@ le_uint32 AlternateSubstitutionSubtable::process(const LEReferenceToalternateArray[0]); - if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) { + if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate), success)) { glyphIterator->setCurrGlyphID(SWAPW(alternateSetTable->alternateArray[0])); } diff --git a/jdk/src/share/native/sun/font/layout/AnchorTables.cpp b/jdk/src/share/native/sun/font/layout/AnchorTables.cpp index 4d9c612e94d..93610b83df4 100644 --- a/jdk/src/share/native/sun/font/layout/AnchorTables.cpp +++ b/jdk/src/share/native/sun/font/layout/AnchorTables.cpp @@ -37,55 +37,54 @@ U_NAMESPACE_BEGIN -void AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, - LEPoint &anchor) const +void AnchorTable::getAnchor(const LETableReference &base, LEGlyphID glyphID, const LEFontInstance *fontInstance, + LEPoint &anchor, LEErrorCode &success) const { - switch(SWAPW(anchorFormat)) { + switch(SWAPW(anchorFormat)) { case 1: { - const Format1AnchorTable *f1 = (const Format1AnchorTable *) this; - - f1->getAnchor(fontInstance, anchor); + LEReferenceTo f1(base, success); + f1->getAnchor(f1, fontInstance, anchor, success); break; } case 2: { - const Format2AnchorTable *f2 = (const Format2AnchorTable *) this; - - f2->getAnchor(glyphID, fontInstance, anchor); + LEReferenceTo f2(base, success); + f2->getAnchor(f2, glyphID, fontInstance, anchor, success); break; } case 3: { - const Format3AnchorTable *f3 = (const Format3AnchorTable *) this; - - f3->getAnchor(fontInstance, anchor); + LEReferenceTo f3(base, success); + f3->getAnchor(f3, fontInstance, anchor, success); break; } default: + { // unknown format: just use x, y coordinate, like format 1... - const Format1AnchorTable *f1 = (const Format1AnchorTable *) this; - - f1->getAnchor(fontInstance, anchor); + LEReferenceTo f1(base, success); + f1->getAnchor(f1, fontInstance, anchor, success); break; } + } } -void Format1AnchorTable::getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const +void Format1AnchorTable::getAnchor(const LEReferenceTo& base, const LEFontInstance *fontInstance, LEPoint &anchor, LEErrorCode &success) const { le_int16 x = SWAPW(xCoordinate); le_int16 y = SWAPW(yCoordinate); LEPoint pixels; fontInstance->transformFunits(x, y, pixels); - fontInstance->pixelsToUnits(pixels, anchor); } -void Format2AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor) const +void Format2AnchorTable::getAnchor(const LEReferenceTo& base, + LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor + , LEErrorCode &success) const { LEPoint point; @@ -100,7 +99,8 @@ void Format2AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *font fontInstance->pixelsToUnits(point, anchor); } -void Format3AnchorTable::getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const +void Format3AnchorTable::getAnchor(const LEReferenceTo &base, const LEFontInstance *fontInstance, + LEPoint &anchor, LEErrorCode &success) const { le_int16 x = SWAPW(xCoordinate); le_int16 y = SWAPW(yCoordinate); @@ -111,15 +111,15 @@ void Format3AnchorTable::getAnchor(const LEFontInstance *fontInstance, LEPoint & fontInstance->transformFunits(x, y, pixels); if (dtxOffset != 0) { - const DeviceTable *dtx = (const DeviceTable *) ((char *) this + dtxOffset); - le_int16 adjx = dtx->getAdjustment((le_int16) fontInstance->getXPixelsPerEm()); + LEReferenceTo dt(base, success, dtxOffset); + le_int16 adjx = dt->getAdjustment(dt, (le_int16) fontInstance->getXPixelsPerEm(), success); pixels.fX += adjx; } if (dtyOffset != 0) { - const DeviceTable *dty = (const DeviceTable *) ((char *) this + dtyOffset); - le_int16 adjy = dty->getAdjustment((le_int16) fontInstance->getYPixelsPerEm()); + LEReferenceTo dt(base, success, dtyOffset); + le_int16 adjy = dt->getAdjustment(dt, (le_int16) fontInstance->getYPixelsPerEm(), success); pixels.fY += adjy; } diff --git a/jdk/src/share/native/sun/font/layout/AnchorTables.h b/jdk/src/share/native/sun/font/layout/AnchorTables.h index 67a87bd6f4b..72905fceff8 100644 --- a/jdk/src/share/native/sun/font/layout/AnchorTables.h +++ b/jdk/src/share/native/sun/font/layout/AnchorTables.h @@ -49,20 +49,23 @@ struct AnchorTable le_int16 xCoordinate; le_int16 yCoordinate; - void getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, - LEPoint &anchor) const; + void getAnchor(const LETableReference &base, LEGlyphID glyphID, const LEFontInstance *fontInstance, + LEPoint &anchor, LEErrorCode &success) const; }; struct Format1AnchorTable : AnchorTable { - void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const; + void getAnchor(const LEReferenceTo& base, + const LEFontInstance *fontInstance, LEPoint &anchor, LEErrorCode &success) const; }; struct Format2AnchorTable : AnchorTable { le_uint16 anchorPoint; - void getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor) const; + void getAnchor(const LEReferenceTo& base, + LEGlyphID glyphID, const LEFontInstance *fontInstance, + LEPoint &anchor, LEErrorCode &success) const; }; struct Format3AnchorTable : AnchorTable @@ -70,7 +73,9 @@ struct Format3AnchorTable : AnchorTable Offset xDeviceTableOffset; Offset yDeviceTableOffset; - void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const; + void getAnchor(const LEReferenceTo& base, + const LEFontInstance *fontInstance, LEPoint &anchor, + LEErrorCode &success) const; }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp index 834a253a4b4..c819a73517a 100644 --- a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp @@ -51,7 +51,7 @@ U_NAMESPACE_BEGIN -le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const +le_bool CharSubstitutionFilter::accept(LEGlyphID glyph, LEErrorCode &/*success*/) const { return fFontInstance->canDisplay((LEUnicode) glyph); } @@ -147,7 +147,9 @@ void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], l GDEFMarkFilter filter(fGDEFTable, success); adjustMarkGlyphs(glyphStorage, &filter, success); } else { - LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); + LEReferenceTo gdefTable(LETableReference::kStaticData, + CanonShaping::glyphDefinitionTable, + CanonShaping::glyphDefinitionTableLen); GDEFMarkFilter filter(gdefTable, success); adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success); @@ -157,9 +159,9 @@ void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], l UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG, success) { - fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable; - fGDEFTable = (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable; - /* OpenTypeLayoutEngine will allocate a substitution filter */ + fGSUBTable.setTo(LETableReference::kStaticData, (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable, CanonShaping::glyphSubstitutionTableLen); + fGDEFTable.setTo(LETableReference::kStaticData, (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); + /* OpenTypeLayoutEngine will allocate a substitution filter */ } UnicodeArabicOpenTypeLayoutEngine::~UnicodeArabicOpenTypeLayoutEngine() diff --git a/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp b/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp index 0b56b4bacf2..2bb10119736 100644 --- a/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp +++ b/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp @@ -59,7 +59,8 @@ const ArabicShaping::ShapeType ArabicShaping::shapeTypes[] = ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c) { LEErrorCode success = LE_NO_ERROR; - const LEReferenceTo joiningTypes((const ClassDefinitionTable *) ArabicShaping::shapingTypeTable, + const LEReferenceTo joiningTypes(LETableReference::kStaticData, + (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable, ArabicShaping::shapingTypeTableLen); le_int32 joiningType = joiningTypes->getGlyphClass(joiningTypes, c, success); diff --git a/jdk/src/share/native/sun/font/layout/CanonShaping.cpp b/jdk/src/share/native/sun/font/layout/CanonShaping.cpp index be011b10f37..c4538122c1a 100644 --- a/jdk/src/share/native/sun/font/layout/CanonShaping.cpp +++ b/jdk/src/share/native/sun/font/layout/CanonShaping.cpp @@ -60,7 +60,7 @@ void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount, le LEUnicode *outChars, LEGlyphStorage &glyphStorage) { LEErrorCode success = LE_NO_ERROR; - LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); + LEReferenceTo gdefTable(LETableReference::kStaticData, CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); LEReferenceTo classTable = gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success); le_int32 *combiningClasses = LE_NEW_ARRAY(le_int32, charCount); le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount); diff --git a/jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h b/jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h index 30221d6f09a..ec980b9757c 100644 --- a/jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h +++ b/jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h @@ -43,6 +43,8 @@ class LEFontInstance; * This filter is used by character-based GSUB processors. It * accepts only those characters which the given font can display. * + * Note: Implementation is in ArabicLayoutEngine.cpp + * * @internal */ class CharSubstitutionFilter : public UMemory, public LEGlyphFilter @@ -97,7 +99,7 @@ public: * * @internal */ - le_bool accept(LEGlyphID glyph) const; + le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h index 410119145a5..b796ccc116c 100644 --- a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h +++ b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h @@ -49,6 +49,7 @@ struct ClassDefinitionTable le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; le_bool hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const; +#if LE_ENABLE_RAW le_int32 getGlyphClass(LEGlyphID glyphID) const { LETableReference base((const le_uint8*)this); LEErrorCode ignored = LE_NO_ERROR; @@ -60,6 +61,7 @@ struct ClassDefinitionTable LEErrorCode ignored = LE_NO_ERROR; return hasGlyphClass(base,glyphClass,ignored); } +#endif }; struct ClassDefFormat1Table : ClassDefinitionTable diff --git a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp index 8711f63483f..67a9c092330 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp @@ -48,7 +48,7 @@ U_NAMESPACE_BEGIN */ void ContextualSubstitutionBase::applySubstitutionLookups( const LookupProcessor *lookupProcessor, - const SubstitutionLookupRecord *substLookupRecordArray, + const LEReferenceToArrayOf& substLookupRecordArray, le_uint16 substCount, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, @@ -60,10 +60,11 @@ void ContextualSubstitutionBase::applySubstitutionLookups( } GlyphIterator tempIterator(*glyphIterator); + const SubstitutionLookupRecord *substLookupRecordArrayPtr = substLookupRecordArray.getAlias(); // OK to dereference, range checked against substCount below. for (le_int16 subst = 0; subst < substCount && LE_SUCCESS(success); subst += 1) { - le_uint16 sequenceIndex = SWAPW(substLookupRecordArray[subst].sequenceIndex); - le_uint16 lookupListIndex = SWAPW(substLookupRecordArray[subst].lookupListIndex); + le_uint16 sequenceIndex = SWAPW(substLookupRecordArrayPtr[subst].sequenceIndex); + le_uint16 lookupListIndex = SWAPW(substLookupRecordArrayPtr[subst].lookupListIndex); tempIterator.setCurrStreamPosition(position); tempIterator.next(sequenceIndex); @@ -72,7 +73,7 @@ void ContextualSubstitutionBase::applySubstitutionLookups( } } -le_bool ContextualSubstitutionBase::matchGlyphIDs(const TTGlyphID *glyphArray, le_uint16 glyphCount, +le_bool ContextualSubstitutionBase::matchGlyphIDs(const LEReferenceToArrayOf& glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, le_bool backtrack) { le_int32 direction = 1; @@ -101,10 +102,13 @@ le_bool ContextualSubstitutionBase::matchGlyphIDs(const TTGlyphID *glyphArray, l return TRUE; } -le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArray, le_uint16 glyphCount, - GlyphIterator *glyphIterator, - const ClassDefinitionTable *classDefinitionTable, - le_bool backtrack) +le_bool ContextualSubstitutionBase::matchGlyphClasses( + const LEReferenceToArrayOf &classArray, + le_uint16 glyphCount, + GlyphIterator *glyphIterator, + const LEReferenceTo &classDefinitionTable, + LEErrorCode &success, + le_bool backtrack) { le_int32 direction = 1; le_int32 match = 0; @@ -120,7 +124,7 @@ le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArra } LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 glyphClass = classDefinitionTable->getGlyphClass(glyph); + le_int32 glyphClass = classDefinitionTable->getGlyphClass(classDefinitionTable, glyph, success); le_int32 matchClass = SWAPW(classArray[match]); if (glyphClass != matchClass) { @@ -128,7 +132,7 @@ le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArra // in the class array which aren't in the class definition // table. If we're looking for such a class, pretend that // we found it. - if (classDefinitionTable->hasGlyphClass(matchClass)) { + if (classDefinitionTable->hasGlyphClass(classDefinitionTable, matchClass, success)) { return FALSE; } } @@ -140,8 +144,8 @@ le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArra return TRUE; } -le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTableOffsetArray, le_uint16 glyphCount, - GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack) +le_bool ContextualSubstitutionBase::matchGlyphCoverages(const LEReferenceToArrayOf &coverageTableOffsetArray, le_uint16 glyphCount, +GlyphIterator *glyphIterator, const LETableReference &offsetBase, LEErrorCode &success, le_bool backtrack) { le_int32 direction = 1; le_int32 glyph = 0; @@ -153,13 +157,15 @@ le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTa while (glyphCount > 0) { Offset coverageTableOffset = SWAPW(coverageTableOffsetArray[glyph]); - const CoverageTable *coverageTable = (const CoverageTable *) (offsetBase + coverageTableOffset); + LEReferenceTo coverageTable(offsetBase, success, coverageTableOffset); - if (! glyphIterator->next()) { + if (LE_FAILURE(success) || ! glyphIterator->next()) { return FALSE; } - if (coverageTable->getGlyphCoverage((LEGlyphID) glyphIterator->getCurrGlyphID()) < 0) { + if (coverageTable->getGlyphCoverage(coverageTable, + (LEGlyphID) glyphIterator->getCurrGlyphID(), + success) < 0) { return FALSE; } @@ -170,7 +176,7 @@ le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTa return TRUE; } -le_uint32 ContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, +le_uint32 ContextualSubstitutionSubtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const @@ -186,20 +192,29 @@ le_uint32 ContextualSubstitutionSubtable::process(const LookupProcessor *lookupP case 1: { - const ContextualSubstitutionFormat1Subtable *subtable = (const ContextualSubstitutionFormat1Subtable *) this; - return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); + LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat1Subtable *) this); + if( LE_FAILURE(success) ) { + return 0; + } + return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); } case 2: { - const ContextualSubstitutionFormat2Subtable *subtable = (const ContextualSubstitutionFormat2Subtable *) this; - return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); + LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat2Subtable *) this); + if( LE_FAILURE(success) ) { + return 0; + } + return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); } case 3: { - const ContextualSubstitutionFormat3Subtable *subtable = (const ContextualSubstitutionFormat3Subtable *) this; - return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); + LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat3Subtable *) this); + if( LE_FAILURE(success) ) { + return 0; + } + return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); } default: @@ -207,7 +222,7 @@ le_uint32 ContextualSubstitutionSubtable::process(const LookupProcessor *lookupP } } -le_uint32 ContextualSubstitutionFormat1Subtable::process(const LookupProcessor *lookupProcessor, +le_uint32 ContextualSubstitutionFormat1Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const @@ -227,22 +242,22 @@ le_uint32 ContextualSubstitutionFormat1Subtable::process(const LookupProcessor * if (coverageIndex < srSetCount) { Offset subRuleSetTableOffset = SWAPW(subRuleSetTableOffsetArray[coverageIndex]); - const SubRuleSetTable *subRuleSetTable = - (const SubRuleSetTable *) ((char *) this + subRuleSetTableOffset); + LEReferenceTo + subRuleSetTable(base, success, (const SubRuleSetTable *) ((char *) this + subRuleSetTableOffset)); le_uint16 subRuleCount = SWAPW(subRuleSetTable->subRuleCount); le_int32 position = glyphIterator->getCurrStreamPosition(); for (le_uint16 subRule = 0; subRule < subRuleCount; subRule += 1) { Offset subRuleTableOffset = SWAPW(subRuleSetTable->subRuleTableOffsetArray[subRule]); - const SubRuleTable *subRuleTable = - (const SubRuleTable *) ((char *) subRuleSetTable + subRuleTableOffset); + LEReferenceTo + subRuleTable(subRuleSetTable, success, subRuleTableOffset); le_uint16 matchCount = SWAPW(subRuleTable->glyphCount) - 1; le_uint16 substCount = SWAPW(subRuleTable->substCount); - - if (matchGlyphIDs(subRuleTable->inputGlyphArray, matchCount, glyphIterator)) { - const SubstitutionLookupRecord *substLookupRecordArray = - (const SubstitutionLookupRecord *) &subRuleTable->inputGlyphArray[matchCount]; + LEReferenceToArrayOf inputGlyphArray(base, success, subRuleTable->inputGlyphArray, matchCount+2); + if (matchGlyphIDs(inputGlyphArray, matchCount, glyphIterator)) { + LEReferenceToArrayOf + substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &subRuleTable->inputGlyphArray[matchCount], substCount); applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); @@ -259,10 +274,11 @@ le_uint32 ContextualSubstitutionFormat1Subtable::process(const LookupProcessor * return 0; } -le_uint32 ContextualSubstitutionFormat2Subtable::process(const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success) const +le_uint32 ContextualSubstitutionFormat2Subtable::process(const LETableReference &base, + const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success) const { if (LE_FAILURE(success)) { return 0; @@ -275,29 +291,33 @@ le_uint32 ContextualSubstitutionFormat2Subtable::process(const LookupProcessor * } if (coverageIndex >= 0) { - const ClassDefinitionTable *classDefinitionTable = - (const ClassDefinitionTable *) ((char *) this + SWAPW(classDefTableOffset)); + LEReferenceTo classDefinitionTable(base, success, + (const ClassDefinitionTable *) ((char *) this + SWAPW(classDefTableOffset))); le_uint16 scSetCount = SWAPW(subClassSetCount); - le_int32 setClass = classDefinitionTable->getGlyphClass(glyphIterator->getCurrGlyphID()); + le_int32 setClass = classDefinitionTable->getGlyphClass(classDefinitionTable, + glyphIterator->getCurrGlyphID(), + success); if (setClass < scSetCount && subClassSetTableOffsetArray[setClass] != 0) { Offset subClassSetTableOffset = SWAPW(subClassSetTableOffsetArray[setClass]); - const SubClassSetTable *subClassSetTable = - (const SubClassSetTable *) ((char *) this + subClassSetTableOffset); + LEReferenceTo + subClassSetTable(base, success, (const SubClassSetTable *) ((char *) this + subClassSetTableOffset)); le_uint16 subClassRuleCount = SWAPW(subClassSetTable->subClassRuleCount); le_int32 position = glyphIterator->getCurrStreamPosition(); for (le_uint16 scRule = 0; scRule < subClassRuleCount; scRule += 1) { Offset subClassRuleTableOffset = SWAPW(subClassSetTable->subClassRuleTableOffsetArray[scRule]); - const SubClassRuleTable *subClassRuleTable = - (const SubClassRuleTable *) ((char *) subClassSetTable + subClassRuleTableOffset); + LEReferenceTo + subClassRuleTable(subClassSetTable, success, subClassRuleTableOffset); le_uint16 matchCount = SWAPW(subClassRuleTable->glyphCount) - 1; le_uint16 substCount = SWAPW(subClassRuleTable->substCount); - if (matchGlyphClasses(subClassRuleTable->classArray, matchCount, glyphIterator, classDefinitionTable)) { - const SubstitutionLookupRecord *substLookupRecordArray = - (const SubstitutionLookupRecord *) &subClassRuleTable->classArray[matchCount]; + LEReferenceToArrayOf classArray(base, success, subClassRuleTable->classArray, matchCount+1); + + if (matchGlyphClasses(classArray, matchCount, glyphIterator, classDefinitionTable, success)) { + LEReferenceToArrayOf + substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &subClassRuleTable->classArray[matchCount], substCount); applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); @@ -314,7 +334,8 @@ le_uint32 ContextualSubstitutionFormat2Subtable::process(const LookupProcessor * return 0; } -le_uint32 ContextualSubstitutionFormat3Subtable::process(const LookupProcessor *lookupProcessor, +le_uint32 ContextualSubstitutionFormat3Subtable::process(const LETableReference &base, + const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success)const @@ -333,9 +354,13 @@ le_uint32 ContextualSubstitutionFormat3Subtable::process(const LookupProcessor * // that matched when we're done. glyphIterator->prev(); - if (ContextualSubstitutionBase::matchGlyphCoverages(coverageTableOffsetArray, gCount, glyphIterator, (const char *) this)) { - const SubstitutionLookupRecord *substLookupRecordArray = - (const SubstitutionLookupRecord *) &coverageTableOffsetArray[gCount]; + LEReferenceToArrayOf covTableOffsetArray(base, success, coverageTableOffsetArray, gCount); + + if( LE_FAILURE(success) ) { return 0; } + + if (ContextualSubstitutionBase::matchGlyphCoverages(covTableOffsetArray, gCount, glyphIterator, base, success)) { + LEReferenceToArrayOf + substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &coverageTableOffsetArray[gCount], subCount); ContextualSubstitutionBase::applySubstitutionLookups(lookupProcessor, substLookupRecordArray, subCount, glyphIterator, fontInstance, position, success); @@ -347,7 +372,8 @@ le_uint32 ContextualSubstitutionFormat3Subtable::process(const LookupProcessor * return 0; } -le_uint32 ChainingContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, +le_uint32 ChainingContextualSubstitutionSubtable::process(const LEReferenceTo &base, + const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const @@ -363,20 +389,23 @@ le_uint32 ChainingContextualSubstitutionSubtable::process(const LookupProcessor case 1: { - const ChainingContextualSubstitutionFormat1Subtable *subtable = (const ChainingContextualSubstitutionFormat1Subtable *) this; - return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); + LEReferenceTo subtable(base, success, (ChainingContextualSubstitutionFormat1Subtable *) this); + if(LE_FAILURE(success)) return 0; + return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); } case 2: { - const ChainingContextualSubstitutionFormat2Subtable *subtable = (const ChainingContextualSubstitutionFormat2Subtable *) this; - return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); + LEReferenceTo subtable(base, success, (const ChainingContextualSubstitutionFormat2Subtable *) this); + if( LE_FAILURE(success) ) { return 0; } + return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); } case 3: { - const ChainingContextualSubstitutionFormat3Subtable *subtable = (const ChainingContextualSubstitutionFormat3Subtable *) this; - return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); + LEReferenceTo subtable(base, success, (const ChainingContextualSubstitutionFormat3Subtable *) this); + if( LE_FAILURE(success) ) { return 0; } + return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); } default: @@ -390,7 +419,7 @@ le_uint32 ChainingContextualSubstitutionSubtable::process(const LookupProcessor // emptyFeatureList matches an le_uint32 or an le_uint16... static const FeatureMask emptyFeatureList = 0x00000000UL; -le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupProcessor *lookupProcessor, +le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const @@ -410,8 +439,8 @@ le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupPro if (coverageIndex < srSetCount) { Offset chainSubRuleSetTableOffset = SWAPW(chainSubRuleSetTableOffsetArray[coverageIndex]); - const ChainSubRuleSetTable *chainSubRuleSetTable = - (const ChainSubRuleSetTable *) ((char *) this + chainSubRuleSetTableOffset); + LEReferenceTo + chainSubRuleSetTable(base, success, (const ChainSubRuleSetTable *) ((char *) this + chainSubRuleSetTableOffset)); le_uint16 chainSubRuleCount = SWAPW(chainSubRuleSetTable->chainSubRuleCount); le_int32 position = glyphIterator->getCurrStreamPosition(); GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); @@ -419,13 +448,19 @@ le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupPro for (le_uint16 subRule = 0; subRule < chainSubRuleCount; subRule += 1) { Offset chainSubRuleTableOffset = SWAPW(chainSubRuleSetTable->chainSubRuleTableOffsetArray[subRule]); - const ChainSubRuleTable *chainSubRuleTable = - (const ChainSubRuleTable *) ((char *) chainSubRuleSetTable + chainSubRuleTableOffset); + LEReferenceTo + chainSubRuleTable = LEReferenceTo(chainSubRuleSetTable, success, chainSubRuleTableOffset); + if( LE_FAILURE(success) ) { return 0; } le_uint16 backtrackGlyphCount = SWAPW(chainSubRuleTable->backtrackGlyphCount); + LEReferenceToArrayOf backtrackGlyphArray(base, success, chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount); + if( LE_FAILURE(success) ) { return 0; } le_uint16 inputGlyphCount = (le_uint16) SWAPW(chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount]) - 1; - const TTGlyphID *inputGlyphArray = &chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount + 1]; + LEReferenceToArrayOf inputGlyphArray(base, success, &chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount + 1], inputGlyphCount+2); + + if( LE_FAILURE(success) ) { return 0; } le_uint16 lookaheadGlyphCount = (le_uint16) SWAPW(inputGlyphArray[inputGlyphCount]); - const TTGlyphID *lookaheadGlyphArray = &inputGlyphArray[inputGlyphCount + 1]; + LEReferenceToArrayOf lookaheadGlyphArray(base, success, inputGlyphArray.getAlias(inputGlyphCount + 1,success), lookaheadGlyphCount+2); + if( LE_FAILURE(success) ) { return 0; } le_uint16 substCount = (le_uint16) SWAPW(lookaheadGlyphArray[lookaheadGlyphCount]); tempIterator.setCurrStreamPosition(position); @@ -435,7 +470,8 @@ le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupPro } tempIterator.prev(); - if (! matchGlyphIDs(chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) { + + if (! matchGlyphIDs(backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) { continue; } @@ -446,8 +482,8 @@ le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupPro } if (matchGlyphIDs(inputGlyphArray, inputGlyphCount, glyphIterator)) { - const SubstitutionLookupRecord *substLookupRecordArray = - (const SubstitutionLookupRecord *) &lookaheadGlyphArray[lookaheadGlyphCount + 1]; + LEReferenceToArrayOf + substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) lookaheadGlyphArray.getAlias(lookaheadGlyphCount + 1,success), substCount); applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); @@ -464,7 +500,7 @@ le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupPro return 0; } -le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupProcessor *lookupProcessor, +le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const @@ -480,19 +516,21 @@ le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupPro } if (coverageIndex >= 0) { - const ClassDefinitionTable *backtrackClassDefinitionTable = - (const ClassDefinitionTable *) ((char *) this + SWAPW(backtrackClassDefTableOffset)); - const ClassDefinitionTable *inputClassDefinitionTable = - (const ClassDefinitionTable *) ((char *) this + SWAPW(inputClassDefTableOffset)); - const ClassDefinitionTable *lookaheadClassDefinitionTable = - (const ClassDefinitionTable *) ((char *) this + SWAPW(lookaheadClassDefTableOffset)); + LEReferenceTo + backtrackClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(backtrackClassDefTableOffset))); + LEReferenceTo + inputClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(inputClassDefTableOffset))); + LEReferenceTo + lookaheadClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(lookaheadClassDefTableOffset))); le_uint16 scSetCount = SWAPW(chainSubClassSetCount); - le_int32 setClass = inputClassDefinitionTable->getGlyphClass(glyphIterator->getCurrGlyphID()); + le_int32 setClass = inputClassDefinitionTable->getGlyphClass(inputClassDefinitionTable, + glyphIterator->getCurrGlyphID(), + success); if (setClass < scSetCount && chainSubClassSetTableOffsetArray[setClass] != 0) { Offset chainSubClassSetTableOffset = SWAPW(chainSubClassSetTableOffsetArray[setClass]); - const ChainSubClassSetTable *chainSubClassSetTable = - (const ChainSubClassSetTable *) ((char *) this + chainSubClassSetTableOffset); + LEReferenceTo + chainSubClassSetTable(base, success, (const ChainSubClassSetTable *) ((char *) this + chainSubClassSetTableOffset)); le_uint16 chainSubClassRuleCount = SWAPW(chainSubClassSetTable->chainSubClassRuleCount); le_int32 position = glyphIterator->getCurrStreamPosition(); GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); @@ -500,13 +538,15 @@ le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupPro for (le_uint16 scRule = 0; scRule < chainSubClassRuleCount; scRule += 1) { Offset chainSubClassRuleTableOffset = SWAPW(chainSubClassSetTable->chainSubClassRuleTableOffsetArray[scRule]); - const ChainSubClassRuleTable *chainSubClassRuleTable = - (const ChainSubClassRuleTable *) ((char *) chainSubClassSetTable + chainSubClassRuleTableOffset); + LEReferenceTo + chainSubClassRuleTable(chainSubClassSetTable, success, chainSubClassRuleTableOffset); le_uint16 backtrackGlyphCount = SWAPW(chainSubClassRuleTable->backtrackGlyphCount); le_uint16 inputGlyphCount = SWAPW(chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount]) - 1; - const le_uint16 *inputClassArray = &chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount + 1]; - le_uint16 lookaheadGlyphCount = SWAPW(inputClassArray[inputGlyphCount]); - const le_uint16 *lookaheadClassArray = &inputClassArray[inputGlyphCount + 1]; + LEReferenceToArrayOf inputClassArray(base, success, &chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount + 1],inputGlyphCount+2); // +2 for the lookaheadGlyphCount count + le_uint16 lookaheadGlyphCount = SWAPW(inputClassArray.getObject(inputGlyphCount, success)); + LEReferenceToArrayOf lookaheadClassArray(base, success, inputClassArray.getAlias(inputGlyphCount + 1,success), lookaheadGlyphCount+2); // +2 for the substCount + + if( LE_FAILURE(success) ) { return 0; } le_uint16 substCount = SWAPW(lookaheadClassArray[lookaheadGlyphCount]); @@ -517,20 +557,22 @@ le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupPro } tempIterator.prev(); - if (! matchGlyphClasses(chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount, - &tempIterator, backtrackClassDefinitionTable, TRUE)) { + LEReferenceToArrayOf backtrackClassArray(base, success, chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount); + if( LE_FAILURE(success) ) { return 0; } + if (! matchGlyphClasses(backtrackClassArray, backtrackGlyphCount, + &tempIterator, backtrackClassDefinitionTable, success, TRUE)) { continue; } tempIterator.setCurrStreamPosition(position); tempIterator.next(inputGlyphCount); - if (! matchGlyphClasses(lookaheadClassArray, lookaheadGlyphCount, &tempIterator, lookaheadClassDefinitionTable)) { + if (! matchGlyphClasses(lookaheadClassArray, lookaheadGlyphCount, &tempIterator, lookaheadClassDefinitionTable, success)) { continue; } - if (matchGlyphClasses(inputClassArray, inputGlyphCount, glyphIterator, inputClassDefinitionTable)) { - const SubstitutionLookupRecord *substLookupRecordArray = - (const SubstitutionLookupRecord *) &lookaheadClassArray[lookaheadGlyphCount + 1]; + if (matchGlyphClasses(inputClassArray, inputGlyphCount, glyphIterator, inputClassDefinitionTable, success)) { + LEReferenceToArrayOf + substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) lookaheadClassArray.getAlias(lookaheadGlyphCount + 1, success), substCount); applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); @@ -547,7 +589,7 @@ le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupPro return 0; } -le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LookupProcessor *lookupProcessor, +le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode & success) const @@ -558,9 +600,13 @@ le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LookupPro le_uint16 backtrkGlyphCount = SWAPW(backtrackGlyphCount); le_uint16 inputGlyphCount = (le_uint16) SWAPW(backtrackCoverageTableOffsetArray[backtrkGlyphCount]); - const Offset *inputCoverageTableOffsetArray = &backtrackCoverageTableOffsetArray[backtrkGlyphCount + 1]; + LEReferenceToArrayOf inputCoverageTableOffsetArray(base, success, &backtrackCoverageTableOffsetArray[backtrkGlyphCount + 1], inputGlyphCount+2); // offset const le_uint16 lookaheadGlyphCount = (le_uint16) SWAPW(inputCoverageTableOffsetArray[inputGlyphCount]); - const Offset *lookaheadCoverageTableOffsetArray = &inputCoverageTableOffsetArray[inputGlyphCount + 1]; + + if( LE_FAILURE(success) ) { return 0; } + LEReferenceToArrayOf lookaheadCoverageTableOffsetArray(base, success, inputCoverageTableOffsetArray.getAlias(inputGlyphCount + 1, success), lookaheadGlyphCount+2); + + if( LE_FAILURE(success) ) { return 0; } le_uint16 substCount = (le_uint16) SWAPW(lookaheadCoverageTableOffsetArray[lookaheadGlyphCount]); le_int32 position = glyphIterator->getCurrStreamPosition(); GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); @@ -571,14 +617,14 @@ le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LookupPro tempIterator.prev(); if (! ContextualSubstitutionBase::matchGlyphCoverages(backtrackCoverageTableOffsetArray, - backtrkGlyphCount, &tempIterator, (const char *) this, TRUE)) { + backtrkGlyphCount, &tempIterator, base, success, TRUE)) { return 0; } tempIterator.setCurrStreamPosition(position); tempIterator.next(inputGlyphCount - 1); if (! ContextualSubstitutionBase::matchGlyphCoverages(lookaheadCoverageTableOffsetArray, - lookaheadGlyphCount, &tempIterator, (const char *) this)) { + lookaheadGlyphCount, &tempIterator, base, success)) { return 0; } @@ -589,9 +635,10 @@ le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LookupPro glyphIterator->prev(); if (ContextualSubstitutionBase::matchGlyphCoverages(inputCoverageTableOffsetArray, - inputGlyphCount, glyphIterator, (const char *) this)) { - const SubstitutionLookupRecord *substLookupRecordArray = - (const SubstitutionLookupRecord *) &lookaheadCoverageTableOffsetArray[lookaheadGlyphCount + 1]; + inputGlyphCount, glyphIterator, base, success)) { + LEReferenceToArrayOf + substLookupRecordArray(base, success, + (const SubstitutionLookupRecord *) lookaheadCoverageTableOffsetArray.getAlias(lookaheadGlyphCount + 1,success), substCount); ContextualSubstitutionBase::applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); diff --git a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h index d230699ec48..6d610d433af 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h +++ b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h @@ -56,20 +56,32 @@ struct SubstitutionLookupRecord struct ContextualSubstitutionBase : GlyphSubstitutionSubtable { static le_bool matchGlyphIDs( - const TTGlyphID *glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, + const LEReferenceToArrayOf &glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, le_bool backtrack = FALSE); static le_bool matchGlyphClasses( - const le_uint16 *classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, - const ClassDefinitionTable *classDefinitionTable, le_bool backtrack = FALSE); + const LEReferenceToArrayOf &classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, + const LEReferenceTo &classDefinitionTable, LEErrorCode &success, le_bool backtrack = FALSE); static le_bool matchGlyphCoverages( - const Offset *coverageTableOffsetArray, le_uint16 glyphCount, - GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack = FALSE); + const LEReferenceToArrayOf &coverageTableOffsetArray, le_uint16 glyphCount, + GlyphIterator *glyphIterator, const LETableReference& offsetBase, LEErrorCode &success, le_bool backtrack = FALSE); + + /** + * little shim to wrap the Offset array in range checking + * @private + */ + static le_bool matchGlyphCoverages( + const Offset *coverageTableOffsetArray, le_uint16 glyphCount, + GlyphIterator *glyphIterator, const LETableReference& offsetBase, LEErrorCode &success, le_bool backtrack = FALSE) { + LEReferenceToArrayOf ref(offsetBase, success, coverageTableOffsetArray, glyphCount); + if( LE_FAILURE(success) ) { return FALSE; } + return matchGlyphCoverages(ref, glyphCount, glyphIterator, offsetBase, success, backtrack); + } static void applySubstitutionLookups( const LookupProcessor *lookupProcessor, - const SubstitutionLookupRecord *substLookupRecordArray, + const LEReferenceToArrayOf& substLookupRecordArray, le_uint16 substCount, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, @@ -79,7 +91,8 @@ struct ContextualSubstitutionBase : GlyphSubstitutionSubtable struct ContextualSubstitutionSubtable : ContextualSubstitutionBase { - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; struct ContextualSubstitutionFormat1Subtable : ContextualSubstitutionSubtable @@ -87,7 +100,8 @@ struct ContextualSubstitutionFormat1Subtable : ContextualSubstitutionSubtable le_uint16 subRuleSetCount; Offset subRuleSetTableOffsetArray[ANY_NUMBER]; - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode& success) const; }; LE_VAR_ARRAY(ContextualSubstitutionFormat1Subtable, subRuleSetTableOffsetArray) @@ -116,7 +130,7 @@ struct ContextualSubstitutionFormat2Subtable : ContextualSubstitutionSubtable le_uint16 subClassSetCount; Offset subClassSetTableOffsetArray[ANY_NUMBER]; - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; LE_VAR_ARRAY(ContextualSubstitutionFormat2Subtable, subClassSetTableOffsetArray) @@ -152,13 +166,15 @@ struct ContextualSubstitutionFormat3Subtable Offset coverageTableOffsetArray[ANY_NUMBER]; //SubstitutionLookupRecord substLookupRecord[ANY_NUMBER]; - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode& success) const; }; LE_VAR_ARRAY(ContextualSubstitutionFormat3Subtable, coverageTableOffsetArray) struct ChainingContextualSubstitutionSubtable : ContextualSubstitutionBase { - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LEReferenceTo &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode& success) const; }; struct ChainingContextualSubstitutionFormat1Subtable : ChainingContextualSubstitutionSubtable @@ -166,7 +182,8 @@ struct ChainingContextualSubstitutionFormat1Subtable : ChainingContextualSubstit le_uint16 chainSubRuleSetCount; Offset chainSubRuleSetTableOffsetArray[ANY_NUMBER]; - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode& success) const; }; LE_VAR_ARRAY(ChainingContextualSubstitutionFormat1Subtable, chainSubRuleSetTableOffsetArray) @@ -201,7 +218,8 @@ struct ChainingContextualSubstitutionFormat2Subtable : ChainingContextualSubstit le_uint16 chainSubClassSetCount; Offset chainSubClassSetTableOffsetArray[ANY_NUMBER]; - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode& success) const; }; LE_VAR_ARRAY(ChainingContextualSubstitutionFormat2Subtable, chainSubClassSetTableOffsetArray) @@ -243,7 +261,8 @@ struct ChainingContextualSubstitutionFormat3Subtable //le_uint16 substCount; //SubstitutionLookupRecord substLookupRecord[ANY_NUMBER]; - le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; LE_VAR_ARRAY(ChainingContextualSubstitutionFormat3Subtable, backtrackCoverageTableOffsetArray) diff --git a/jdk/src/share/native/sun/font/layout/CoverageTables.cpp b/jdk/src/share/native/sun/font/layout/CoverageTables.cpp index 2d7c10baec5..36d083bcd77 100644 --- a/jdk/src/share/native/sun/font/layout/CoverageTables.cpp +++ b/jdk/src/share/native/sun/font/layout/CoverageTables.cpp @@ -37,8 +37,10 @@ U_NAMESPACE_BEGIN -le_int32 CoverageTable::getGlyphCoverage(LEGlyphID glyphID) const +le_int32 CoverageTable::getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const { + if(LE_FAILURE(success)) return -1; + switch(SWAPW(coverageFormat)) { case 0: @@ -46,16 +48,16 @@ le_int32 CoverageTable::getGlyphCoverage(LEGlyphID glyphID) const case 1: { - const CoverageFormat1Table *f1Table = (const CoverageFormat1Table *) this; + LEReferenceTo f1Table(base, success); - return f1Table->getGlyphCoverage(glyphID); + return f1Table->getGlyphCoverage(f1Table, glyphID, success); } case 2: { - const CoverageFormat2Table *f2Table = (const CoverageFormat2Table *) this; + LEReferenceTo f2Table(base, success); - return f2Table->getGlyphCoverage(glyphID); + return f2Table->getGlyphCoverage(f2Table, glyphID, success); } default: @@ -63,8 +65,10 @@ le_int32 CoverageTable::getGlyphCoverage(LEGlyphID glyphID) const } } -le_int32 CoverageFormat1Table::getGlyphCoverage(LEGlyphID glyphID) const +le_int32 CoverageFormat1Table::getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const { + if(LE_FAILURE(success)) return -1; + TTGlyphID ttGlyphID = (TTGlyphID) LE_GET_GLYPH(glyphID); le_uint16 count = SWAPW(glyphCount); le_uint8 bit = OpenTypeUtilities::highBit(count); @@ -73,37 +77,45 @@ le_int32 CoverageFormat1Table::getGlyphCoverage(LEGlyphID glyphID) const le_uint16 probe = power; le_uint16 index = 0; - if (count == 0) { - return -1; - } + if (count == 0) { + return -1; + } + + LEReferenceToArrayOf(base, success, glyphArray, count); + if(LE_FAILURE(success)) return -1; // range checks array + if (SWAPW(glyphArray[extra]) <= ttGlyphID) { - index = extra; + index = extra; } while (probe > (1 << 0)) { - probe >>= 1; + probe >>= 1; - if (SWAPW(glyphArray[index + probe]) <= ttGlyphID) { - index += probe; - } + if (SWAPW(glyphArray[index + probe]) <= ttGlyphID) { + index += probe; + } } if (SWAPW(glyphArray[index]) == ttGlyphID) { - return index; + return index; } return -1; } -le_int32 CoverageFormat2Table::getGlyphCoverage(LEGlyphID glyphID) const +le_int32 CoverageFormat2Table::getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const { + if(LE_FAILURE(success)) return -1; + TTGlyphID ttGlyphID = (TTGlyphID) LE_GET_GLYPH(glyphID); le_uint16 count = SWAPW(rangeCount); - le_int32 rangeIndex = - OpenTypeUtilities::getGlyphRangeIndex(ttGlyphID, rangeRecordArray, count); - if (rangeIndex < 0) { + LEReferenceToArrayOf rangeRecordArrayRef(base, success, rangeRecordArray, count); + le_int32 rangeIndex = + OpenTypeUtilities::getGlyphRangeIndex(ttGlyphID, rangeRecordArrayRef, success); + + if (rangeIndex < 0 || LE_FAILURE(success)) { // could fail if array out of bounds return -1; } diff --git a/jdk/src/share/native/sun/font/layout/CoverageTables.h b/jdk/src/share/native/sun/font/layout/CoverageTables.h index dd47716a101..619a71ea65c 100644 --- a/jdk/src/share/native/sun/font/layout/CoverageTables.h +++ b/jdk/src/share/native/sun/font/layout/CoverageTables.h @@ -46,7 +46,7 @@ struct CoverageTable { le_uint16 coverageFormat; - le_int32 getGlyphCoverage(LEGlyphID glyphID) const; + le_int32 getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; }; struct CoverageFormat1Table : CoverageTable @@ -54,7 +54,7 @@ struct CoverageFormat1Table : CoverageTable le_uint16 glyphCount; TTGlyphID glyphArray[ANY_NUMBER]; - le_int32 getGlyphCoverage(LEGlyphID glyphID) const; + le_int32 getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const; }; LE_VAR_ARRAY(CoverageFormat1Table, glyphArray) @@ -64,7 +64,7 @@ struct CoverageFormat2Table : CoverageTable le_uint16 rangeCount; GlyphRangeRecord rangeRecordArray[ANY_NUMBER]; - le_int32 getGlyphCoverage(LEGlyphID glyphID) const; + le_int32 getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const; }; LE_VAR_ARRAY(CoverageFormat2Table, rangeRecordArray) diff --git a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp index 5d338e85fd2..63583289fd7 100644 --- a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp @@ -51,23 +51,27 @@ le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo entryAnchorTable(base, success, entryOffset); - entryAnchorTable->getAnchor(glyphID, fontInstance, entryAnchor); - glyphIterator->setCursiveEntryPoint(entryAnchor); + if( LE_SUCCESS(success) ) { + entryAnchorTable->getAnchor(entryAnchorTable, glyphID, fontInstance, entryAnchor, success); + glyphIterator->setCursiveEntryPoint(entryAnchor); + } } else { //glyphIterator->clearCursiveEntryPoint(); } if (exitOffset != 0) { - const AnchorTable *exitAnchorTable = (const AnchorTable *) ((char *) this + exitOffset); + LEReferenceTo exitAnchorTable(base, success, exitOffset); - exitAnchorTable->getAnchor(glyphID, fontInstance, exitAnchor); - glyphIterator->setCursiveExitPoint(exitAnchor); + if( LE_SUCCESS(success) ) { + exitAnchorTable->getAnchor(exitAnchorTable, glyphID, fontInstance, exitAnchor, success); + glyphIterator->setCursiveExitPoint(exitAnchor); + } } else { //glyphIterator->clearCursiveExitPoint(); } diff --git a/jdk/src/share/native/sun/font/layout/DeviceTables.cpp b/jdk/src/share/native/sun/font/layout/DeviceTables.cpp index c0a16cdd463..df4df194fcf 100644 --- a/jdk/src/share/native/sun/font/layout/DeviceTables.cpp +++ b/jdk/src/share/native/sun/font/layout/DeviceTables.cpp @@ -43,7 +43,7 @@ const le_uint16 DeviceTable::fieldBits[] = { 2, 4, 8}; #define FORMAT_COUNT LE_ARRAY_SIZE(fieldBits) -le_int16 DeviceTable::getAdjustment(le_uint16 ppem) const +le_int16 DeviceTable::getAdjustment(const LEReferenceTo&base, le_uint16 ppem, LEErrorCode &success) const { le_uint16 start = SWAPW(startSize); le_uint16 format = SWAPW(deltaFormat) - 1; @@ -53,6 +53,13 @@ le_int16 DeviceTable::getAdjustment(le_uint16 ppem) const le_uint16 sizeIndex = ppem - start; le_uint16 bits = fieldBits[format]; le_uint16 count = 16 / bits; + + LEReferenceToArrayOf deltaValuesRef(base, success, deltaValues, (sizeIndex / count)); + + if(LE_FAILURE(success)) { + return result; + } + le_uint16 word = SWAPW(deltaValues[sizeIndex / count]); le_uint16 fieldIndex = sizeIndex % count; le_uint16 shift = 16 - (bits * (fieldIndex + 1)); diff --git a/jdk/src/share/native/sun/font/layout/DeviceTables.h b/jdk/src/share/native/sun/font/layout/DeviceTables.h index ba9e534249f..1cd7056610d 100644 --- a/jdk/src/share/native/sun/font/layout/DeviceTables.h +++ b/jdk/src/share/native/sun/font/layout/DeviceTables.h @@ -50,7 +50,7 @@ struct DeviceTable le_uint16 deltaFormat; le_uint16 deltaValues[ANY_NUMBER]; - le_int16 getAdjustment(le_uint16 ppem) const; + le_int16 getAdjustment(const LEReferenceTo &base, le_uint16 ppem, LEErrorCode &success) const; private: static const le_uint16 fieldMasks[]; diff --git a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp index 81056db9c91..13f97a96d5b 100644 --- a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp @@ -48,7 +48,6 @@ le_uint32 ExtensionSubtable::process(const LEReferenceTo &thi const LookupProcessor *lookupProcessor, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const { - if (LE_FAILURE(success)) { return 0; } diff --git a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h index d629ade7afa..ff23ce3a48e 100644 --- a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h +++ b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.h @@ -52,8 +52,7 @@ struct ExtensionSubtable //: GlyphSubstitutionSubtable le_uint16 extensionLookupType; le_uint32 extensionOffset; - le_uint32 process(const LEReferenceTo &extRef, - const LookupProcessor *lookupProcessor, le_uint16 lookupType, + le_uint32 process(const LEReferenceTo &base, const LookupProcessor *lookupProcessor, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; diff --git a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp index ddd56b44494..b5c7a2c400d 100644 --- a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp +++ b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp @@ -49,11 +49,11 @@ GDEFMarkFilter::~GDEFMarkFilter() // nothing to do? } -le_bool GDEFMarkFilter::accept(LEGlyphID glyph) const +le_bool GDEFMarkFilter::accept(LEGlyphID glyph, LEErrorCode &success) const { - le_int32 glyphClass = classDefTable->getGlyphClass(glyph); + le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success); - return glyphClass == gcdMarkGlyph; + return glyphClass == gcdMarkGlyph; } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h index c2ee9e758a2..d922bb215fa 100644 --- a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h +++ b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h @@ -55,7 +55,7 @@ public: GDEFMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); virtual ~GDEFMarkFilter(); - virtual le_bool accept(LEGlyphID glyph) const; + virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp b/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp index 3ccf66fdc60..87f6d597482 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp @@ -41,14 +41,13 @@ U_NAMESPACE_BEGIN GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, - FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader) + FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader, LEErrorCode &success) : direction(1), position(-1), nextLimit(-1), prevLimit(-1), glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments), srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask), glyphGroup(0), glyphClassDefinitionTable(), markAttachClassDefinitionTable() { - LEErrorCode success = LE_NO_ERROR; // TODO le_int32 glyphCount = glyphStorage.getGlyphCount(); if (theGlyphDefinitionTableHeader.isValid()) { @@ -388,7 +387,7 @@ void GlyphIterator::setCursiveGlyph() void GlyphIterator::filterResetCache(void) { filterCacheValid = FALSE; - } +} le_bool GlyphIterator::filterGlyph(le_uint32 index) { @@ -399,53 +398,53 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) le_bool &filterResult = filterCache.result; // NB: Making this a reference to accept the updated value, in case // we want more fancy cacheing in the future. - if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { + if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { filterResult = TRUE; } else { LEErrorCode success = LE_NO_ERROR; le_int32 glyphClass = gcdNoGlyphClass; - if (glyphClassDefinitionTable.isValid()) { - glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success); - } + if (glyphClassDefinitionTable.isValid()) { + glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success); + } switch (glyphClass) { - case gcdNoGlyphClass: + case gcdNoGlyphClass: filterResult = FALSE; break; - case gcdSimpleGlyph: + case gcdSimpleGlyph: filterResult = (lookupFlags & lfIgnoreBaseGlyphs) != 0; break; - case gcdLigatureGlyph: + case gcdLigatureGlyph: filterResult = (lookupFlags & lfIgnoreLigatures) != 0; break; - case gcdMarkGlyph: - if ((lookupFlags & lfIgnoreMarks) != 0) { + case gcdMarkGlyph: + if ((lookupFlags & lfIgnoreMarks) != 0) { filterResult = TRUE; } else { - le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift; + le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift; - if ((markAttachType != 0) && (markAttachClassDefinitionTable.isValid())) { + if ((markAttachType != 0) && (markAttachClassDefinitionTable.isValid())) { filterResult = (markAttachClassDefinitionTable -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType); } else { filterResult = FALSE; - } - } + } + } break; - case gcdComponentGlyph: + case gcdComponentGlyph: filterResult = ((lookupFlags & lfIgnoreBaseGlyphs) != 0); break; - default: + default: filterResult = FALSE; break; - } + } } filterCacheValid = TRUE; - } + } return filterCache.result; } diff --git a/jdk/src/share/native/sun/font/layout/GlyphIterator.h b/jdk/src/share/native/sun/font/layout/GlyphIterator.h index 666b94dbcf3..937bb30ce0c 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphIterator.h +++ b/jdk/src/share/native/sun/font/layout/GlyphIterator.h @@ -49,7 +49,7 @@ class GlyphPositionAdjustments; class GlyphIterator : public UMemory { public: GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, - FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader); + FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader, LEErrorCode &success); GlyphIterator(GlyphIterator &that); diff --git a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp index 9c6666d47a9..52520bfae12 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp @@ -95,6 +95,8 @@ le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(this, glyphIterator, fontInstance, success); + delta = subtable->process(subtable, this , glyphIterator, fontInstance, success); break; } case gpstChainedContext: { - LEReferenceTo subtable(lookupSubtable, success); + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(this, glyphIterator, fontInstance, success); + delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); break; } case gpstExtension: { - LEReferenceTo subtable(lookupSubtable, success); + const LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(subtable, this, lookupType, glyphIterator, fontInstance, success); break; @@ -176,6 +178,12 @@ le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LEReferenceTo delta %d @ %d", lookupType, delta, glyphIterator->getCurrStreamPosition()); + } +#endif + return delta; } diff --git a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp index d4fe59075fa..92961f993f7 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp @@ -123,7 +123,7 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(this, glyphIterator, fontInstance, success); + delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); break; } @@ -131,7 +131,7 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(this, glyphIterator, fontInstance, success); + delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); break; } diff --git a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp index 61ab8b3a321..d45ebb65985 100644 --- a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp @@ -44,7 +44,7 @@ #include "LEGlyphStorage.h" #include "IndicReordering.h" -#include + U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine) @@ -53,14 +53,14 @@ IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontI le_int32 typoFlags, le_bool version2, const LEReferenceTo &gsubTable, LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success), fMPreFixups(NULL) { - if ( version2 ) { - fFeatureMap = IndicReordering::getv2FeatureMap(fFeatureMapCount); - } else { + if ( version2 ) { + fFeatureMap = IndicReordering::getv2FeatureMap(fFeatureMapCount); + } else { fFeatureMap = IndicReordering::getFeatureMap(fFeatureMapCount); - } - fFeatureOrder = TRUE; - fVersion2 = version2; - fFilterZeroWidth = IndicReordering::getFilterZeroWidth(fScriptCode); + } + fFeatureOrder = TRUE; + fVersion2 = version2; + fFilterZeroWidth = IndicReordering::getFilterZeroWidth(fScriptCode); } IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) @@ -68,7 +68,7 @@ IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontI { fFeatureMap = IndicReordering::getFeatureMap(fFeatureMapCount); fFeatureOrder = TRUE; - fVersion2 = FALSE; + fVersion2 = FALSE; } IndicOpenTypeLayoutEngine::~IndicOpenTypeLayoutEngine() @@ -90,6 +90,7 @@ le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_ return 0; } + _LETRACE("IOTLE::gp, calling parent"); le_int32 retCount = OpenTypeLayoutEngine::glyphProcessing(chars, offset, count, max, rightToLeft, glyphStorage, success); if (LE_FAILURE(success)) { @@ -97,11 +98,15 @@ le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_ } if (fVersion2) { - IndicReordering::finalReordering(glyphStorage,retCount); - IndicReordering::applyPresentationForms(glyphStorage,retCount); - OpenTypeLayoutEngine::glyphSubstitution(count,max, rightToLeft, glyphStorage, success); + _LETRACE("IOTLE::gp, v2 final,"); + IndicReordering::finalReordering(glyphStorage,retCount); + _LETRACE("IOTLE::gp, v2 pres"); + IndicReordering::applyPresentationForms(glyphStorage,retCount); + _LETRACE("IOTLE::gp, parent gsub"); + OpenTypeLayoutEngine::glyphSubstitution(count,max, rightToLeft, glyphStorage, success); } else { - IndicReordering::adjustMPres(fMPreFixups, glyphStorage, success); + _LETRACE("IOTLE::gp, adjust mpres"); + IndicReordering::adjustMPres(fMPreFixups, glyphStorage, success); } return retCount; } @@ -116,6 +121,8 @@ le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], return 0; } + _LETRACE("IOTLE: charProc"); + if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) { success = LE_ILLEGAL_ARGUMENT_ERROR; return 0; @@ -143,8 +150,10 @@ le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 outCharCount; if (fVersion2) { + _LETRACE("v2process"); outCharCount = IndicReordering::v2process(&chars[offset], count, fScriptCode, outChars, glyphStorage); } else { + _LETRACE("reorder"); outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups, success); } diff --git a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp index 7ebabe141d2..7753e246535 100644 --- a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp @@ -254,8 +254,8 @@ public: return fGlyphStorage.getAuxData(charIndex,success); } - void decomposeReorderMatras ( const IndicClassTable *classTable, le_int32 beginSyllable, le_int32 nextSyllable, le_int32 inv_count ) { - le_int32 i; + void decomposeReorderMatras ( const IndicClassTable *classTable, le_int32 beginSyllable, le_int32 nextSyllable, le_int32 inv_count ) { + le_int32 i; LEErrorCode success = LE_NO_ERROR; for ( i = beginSyllable ; i < nextSyllable ; i++ ) { diff --git a/jdk/src/share/native/sun/font/layout/KernTable.cpp b/jdk/src/share/native/sun/font/layout/KernTable.cpp index 2d946513fb8..1a5c1f92676 100644 --- a/jdk/src/share/native/sun/font/layout/KernTable.cpp +++ b/jdk/src/share/native/sun/font/layout/KernTable.cpp @@ -39,7 +39,7 @@ #include -#define DEBUG 0 +#define DEBUG_KERN_TABLE 0 U_NAMESPACE_BEGIN @@ -99,14 +99,14 @@ KernTable::KernTable(const LETableReference& base, LEErrorCode &success) : pairsSwapped(NULL), fTable(base) { if(LE_FAILURE(success) || (fTable.isEmpty())) { -#if DEBUG +#if DEBUG_KERN_TABLE fprintf(stderr, "no kern data\n"); #endif return; } LEReferenceTo header(fTable, success); -#if DEBUG +#if DEBUG_KERN_TABLE // dump first 32 bytes of header for (int i = 0; i < 64; ++i) { fprintf(stderr, "%0.2x ", ((const char*)header.getAlias())[i]&0xff); @@ -171,13 +171,13 @@ KernTable::KernTable(const LETableReference& base, LEErrorCode &success) fprintf(stderr, " searchRange: %d entrySelector: %d rangeShift: %d\n", searchRange, entrySelector, rangeShift); fprintf(stderr, "[[ ignored font table entries: range %d selector %d shift %d ]]\n", SWAPW(table->searchRange), SWAPW(table->entrySelector), SWAPW(table->rangeShift)); #endif -#if DEBUG +#if DEBUG_KERN_TABLE fprintf(stderr, "coverage: %0.4x nPairs: %d pairs 0x%x\n", coverage, nPairs, pairsSwapped); fprintf(stderr, " searchRange(pairs): %d entrySelector: %d rangeShift(pairs): %d\n", searchRange, entrySelector, rangeShift); - { + if (LE_SUCCESS(success)) { // dump part of the pair list char ids[256]; for (int i = 256; --i >= 0;) { @@ -242,7 +242,7 @@ void KernTable::process(LEGlyphStorage& storage, LEErrorCode &success) p = tp; } -#if DEBUG +#if DEBUG_KERN_TABLE fprintf(stderr, "binary search for %0.8x\n", key); #endif @@ -251,13 +251,13 @@ void KernTable::process(LEGlyphStorage& storage, LEErrorCode &success) probe >>= 1; tp = (const PairInfo*)(p + (probe/KERN_PAIRINFO_SIZE)); le_uint32 tkey = tp->key; -#if DEBUG +#if DEBUG_KERN_TABLE fprintf(stdout, " %.3d (%0.8x)\n", (tp - pairsSwapped), tkey); #endif if (tkey <= key) { if (tkey == key) { le_int16 value = SWAPW(tp->value); -#if DEBUG +#if DEBUG_KERN_TABLE fprintf(stdout, "binary found kerning pair %x:%x at %d, value: 0x%x (%g)\n", storage[i-1], storage[i], i, value & 0xffff, font->xUnitsToPoints(value)); fflush(stdout); diff --git a/jdk/src/share/native/sun/font/layout/LEFontInstance.h b/jdk/src/share/native/sun/font/layout/LEFontInstance.h index c03b77c8cd4..2baf2d6c85e 100644 --- a/jdk/src/share/native/sun/font/layout/LEFontInstance.h +++ b/jdk/src/share/native/sun/font/layout/LEFontInstance.h @@ -181,6 +181,10 @@ public: * * Subclasses which represent composite fonts should always return NULL. * + * Note that implementing this function does not allow for range checking. + * Subclasses that desire the safety of range checking must implement the + * variation which has a length parameter. + * * @param tableTag - the four byte table tag. (e.g. 'cmap') * * @return the address of the table in memory, or NULL @@ -200,6 +204,8 @@ public: * Subclasses which represent composite fonts should always return NULL. * * This version sets a length, for range checking. + * Note that range checking can only be accomplished if this function is + * implemented in subclasses. * * @param tableTag - the four byte table tag. (e.g. 'cmap') * @param length - ignored on entry, on exit will be the length of the table if known, or -1 if unknown. @@ -572,5 +578,3 @@ inline le_int32 LEFontInstance::floatToFixed(float theFloat) U_NAMESPACE_END #endif - - diff --git a/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h b/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h index 7f1662a0050..0f4fa110afe 100644 --- a/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h +++ b/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h @@ -62,7 +62,7 @@ public: * * @internal */ - virtual le_bool accept(LEGlyphID glyph) const = 0; + virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const = 0; }; #endif /* U_HIDE_INTERNAL_API */ diff --git a/jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp b/jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp index e9172f2150f..2e50aad55e4 100644 --- a/jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp +++ b/jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp @@ -458,7 +458,7 @@ void LEGlyphStorage::setPosition(le_int32 glyphIndex, float x, float y, LEErrorC success = LE_INDEX_OUT_OF_BOUNDS_ERROR; return; } - + _LETRACE("set%-4d\t(%.2f, %.2f)", glyphIndex, x, y); fPositions[glyphIndex * 2] = x; fPositions[glyphIndex * 2 + 1] = y; } @@ -688,10 +688,9 @@ le_bool LEGlyphStorage::applyInsertion(le_int32 atPosition, le_int32 count, LEGl // the source glyph we're pointing at // just got replaced by the insertion - fSrcIndex -= 1; + fSrcIndex -= 1; return FALSE; } U_NAMESPACE_END - diff --git a/jdk/src/share/native/sun/font/layout/LEGlyphStorage.h b/jdk/src/share/native/sun/font/layout/LEGlyphStorage.h index 71869ebb075..23c1c086d4a 100644 --- a/jdk/src/share/native/sun/font/layout/LEGlyphStorage.h +++ b/jdk/src/share/native/sun/font/layout/LEGlyphStorage.h @@ -568,4 +568,3 @@ inline LEGlyphID &LEGlyphStorage::operator[](le_int32 glyphIndex) const U_NAMESPACE_END #endif - diff --git a/jdk/src/share/native/sun/font/layout/LEScripts.h b/jdk/src/share/native/sun/font/layout/LEScripts.h index 804c8f64610..5524ef31ae3 100644 --- a/jdk/src/share/native/sun/font/layout/LEScripts.h +++ b/jdk/src/share/native/sun/font/layout/LEScripts.h @@ -30,7 +30,7 @@ * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS * YOU REALLY KNOW WHAT YOU'RE DOING. * - * Generated on: 10/26/2010 02:53:33 PM PDT + * Generated on: 11/01/2011 04:08:09 PM PDT */ #ifndef __LESCRIPTS_H @@ -262,7 +262,16 @@ enum ScriptCodes { khojScriptCode = 157, tirhScriptCode = 158, - scriptCodeCount = 159 +/** + * @stable ICU 52 + */ + aghbScriptCode = 159, + mahjScriptCode = 160, + +/** + * @stable ICU 2.2 + */ + scriptCodeCount }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/LEStandalone.h b/jdk/src/share/native/sun/font/layout/LEStandalone.h index b0ccec6481a..1e96076814a 100644 --- a/jdk/src/share/native/sun/font/layout/LEStandalone.h +++ b/jdk/src/share/native/sun/font/layout/LEStandalone.h @@ -132,6 +132,9 @@ enum LEErrorCode { #define uprv_memcpy memcpy #define uprv_realloc realloc +#define U_EXPORT2 +#define U_CAPI extern "C" + #if !defined(U_IS_BIG_ENDIAN) #ifdef _LITTLE_ENDIAN #define U_IS_BIG_ENDIAN 0 diff --git a/jdk/src/share/native/sun/font/layout/LETableReference.h b/jdk/src/share/native/sun/font/layout/LETableReference.h index dbee61fba7f..ea12c18cb06 100644 --- a/jdk/src/share/native/sun/font/layout/LETableReference.h +++ b/jdk/src/share/native/sun/font/layout/LETableReference.h @@ -37,34 +37,47 @@ #include "LETypes.h" #include "LEFontInstance.h" +/** + * \def LE_ENABLE_RAW + * If this is 1, enables old non-safe raw access + */ +#ifndef LE_ENABLE_RAW +#define LE_ENABLE_RAW 0 +#endif -#define kQuestionmarkTableTag 0x3F3F3F3FUL -#define kTildeTableTag 0x7e7e7e7eUL +#define kQuestionmarkTableTag 0x3F3F3F3FUL /* ???? */ +#define kStaticTableTag 0x30303030UL /* 0000 */ +#define kTildeTableTag 0x7e7e7e7eUL /* ~~~~ */ #ifdef __cplusplus // internal - interface for range checking U_NAMESPACE_BEGIN #if LE_ASSERT_BAD_FONT + +#ifndef LE_TRACE_TR +#define LE_TRACE_TR 0 +#endif + class LETableReference; // fwd /** * defined in OpenTypeUtilities.cpp * @internal */ -extern void _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len); +U_CAPI void U_EXPORT2 _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len); #define LE_DEBUG_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); #define LE_DEBUG_TR3(x,y,z) _debug_LETableReference(__FILE__, __LINE__, x, this, (const void*)y, (size_t)z); -#if 0 -#define LE_TRACE_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); +#if LE_TRACE_TR +#define _TRTRACE(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); #else -#define LE_TRACE_TR(x) +#define _TRTRACE(x) #endif #else #define LE_DEBUG_TR(x) #define LE_DEBUG_TR3(x,y,z) -#define LE_TRACE_TR(x) +#define _TRTRACE(x) #endif /** @@ -72,6 +85,13 @@ extern void _debug_LETableReference(const char *f, int l, const char *msg, const */ class LETableReference { public: + + /** + * Dummy enum asserting that a value is actually static data + * and does not need to be range checked + */ + enum EStaticData { kStaticData = 0 }; + /** * @internal * Construct from a specific tag @@ -79,28 +99,42 @@ public: LETableReference(const LEFontInstance* font, LETag tableTag, LEErrorCode &success) : fFont(font), fTag(tableTag), fParent(NULL), fStart(NULL),fLength(LE_UINTPTR_MAX) { loadTable(success); - LE_TRACE_TR("INFO: new table load") + _TRTRACE("INFO: new table load") } LETableReference(const LETableReference &parent, LEErrorCode &success) : fFont(parent.fFont), fTag(parent.fTag), fParent(&parent), fStart(parent.fStart), fLength(parent.fLength) { if(LE_FAILURE(success)) { clear(); } - LE_TRACE_TR("INFO: new clone") + _TRTRACE("INFO: new clone") } +#if LE_ENABLE_RAW + /** + * Construct without a parent LETR. + */ LETableReference(const le_uint8* data, size_t length = LE_UINTPTR_MAX) : fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) { - LE_TRACE_TR("INFO: new raw") + _TRTRACE("INFO: new raw") } +#endif + + /** + * Construct without a parent LETR. + */ + LETableReference(EStaticData /* NOTUSED */, const le_uint8* data, size_t length) : + fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) { + _TRTRACE("INFO: new EStaticData") + } + LETableReference() : fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(NULL), fLength(0) { - LE_TRACE_TR("INFO: new empty") + _TRTRACE("INFO: new empty") } ~LETableReference() { - fTag=kTildeTableTag; - LE_TRACE_TR("INFO: new dtor") + fTag= (LETag)kTildeTableTag; + _TRTRACE("INFO: new dtor") } /** @@ -126,7 +160,7 @@ public: fLength = (fParent->fLength) - offset; // decrement length as base address is incremented } if(fLength != LE_UINTPTR_MAX) { // if we have bounds: - if(offset+fLength > fParent->fLength) { + if((offset+fLength < offset) || (offset+fLength > fParent->fLength)) { LE_DEBUG_TR3("offset+fLength out of range: (%p) +%d", NULL, offset+fLength); err = LE_INDEX_OUT_OF_BOUNDS_ERROR; // exceeded clear(); @@ -136,11 +170,13 @@ public: } else { clear(); } - LE_TRACE_TR("INFO: new subset") + _TRTRACE("INFO: new subset") } const void* getAlias() const { return (const void*)fStart; } - const void* getAliasTODO() const { LE_DEBUG_TR("getAliasTODO()"); return (const void*)fStart; } +#ifndef LE_ENABLE_RAW + const void* getAliasRAW() const { LE_DEBUG_TR("getAliasRAW()"); return (const void*)fStart; } +#endif le_bool isEmpty() const { return fStart==NULL || fLength==0; } le_bool isValid() const { return !isEmpty(); } le_bool hasBounds() const { return fLength!=LE_UINTPTR_MAX; } @@ -233,7 +269,18 @@ protected: void setRaw(const void *data, size_t length = LE_UINTPTR_MAX) { fFont = NULL; - fTag = kQuestionmarkTableTag; + fTag = (LETag)kQuestionmarkTableTag; + fParent = NULL; + fStart = (const le_uint8*)data; + fLength = length; + } + + /** + * set this object pointing to static data + */ + void setTo(EStaticData /*notused*/, const void *data, size_t length) { + fFont = NULL; + fTag = (LETag)kStaticTableTag; fParent = NULL; fStart = (const le_uint8*)data; fLength = length; @@ -276,97 +323,6 @@ size_t LETableVarSizer::getSize() { * Open a new entry based on an existing table */ -/** - * \def LE_UNBOUNDED_ARRAY - * define an array with no *known* bound. Will trim to available size. - * @internal - */ -#define LE_UNBOUNDED_ARRAY LE_UINT32_MAX - -template -class LEReferenceToArrayOf : public LETableReference { -public: - LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, size_t offset, le_uint32 count) - : LETableReference(parent, offset, LE_UINTPTR_MAX, success), fCount(count) { - LE_TRACE_TR("INFO: new RTAO by offset") - if(LE_SUCCESS(success)) { - if(count == LE_UNBOUNDED_ARRAY) { // not a known length - count = getLength()/LETableVarSizer::getSize(); // fit to max size - } - LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); - } - if(LE_FAILURE(success)) { - fCount=0; - clear(); - } - } - - LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, le_uint32 count) - : LETableReference(parent, parent.ptrToOffset(array, success), LE_UINTPTR_MAX, success), fCount(count) { -LE_TRACE_TR("INFO: new RTAO") - if(LE_SUCCESS(success)) { - if(count == LE_UNBOUNDED_ARRAY) { // not a known length - count = getLength()/LETableVarSizer::getSize(); // fit to max size - } - LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); - } - if(LE_FAILURE(success)) clear(); - } - LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, size_t offset, le_uint32 count) - : LETableReference(parent, parent.ptrToOffset(array, success)+offset, LE_UINTPTR_MAX, success), fCount(count) { -LE_TRACE_TR("INFO: new RTAO") - if(LE_SUCCESS(success)) { - if(count == LE_UNBOUNDED_ARRAY) { // not a known length - count = getLength()/LETableVarSizer::getSize(); // fit to max size - } - LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); - } - if(LE_FAILURE(success)) clear(); - } - - LEReferenceToArrayOf() :LETableReference(), fCount(0) {} - - le_uint32 getCount() const { return fCount; } - - using LETableReference::getAlias; - - const T *getAlias(le_uint32 i, LEErrorCode &success) const { - return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success))); - } - - const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } - - const T& getObject(le_uint32 i, LEErrorCode &success) const { - return *getAlias(i,success); - } - - const T& operator()(le_uint32 i, LEErrorCode &success) const { - return *getAlias(i,success); - } - - size_t getOffsetFor(le_uint32 i, LEErrorCode &success) const { - if(LE_SUCCESS(success)&&i::getSize()*i; - } else { - success = LE_INDEX_OUT_OF_BOUNDS_ERROR; - } - return 0; - } - - LEReferenceToArrayOf &reparent(const LETableReference &base) { - fParent = &base; - return *this; - } - - LEReferenceToArrayOf(const LETableReference& parent, LEErrorCode & success) : LETableReference(parent,0, LE_UINTPTR_MAX, success), fCount(0) { - LE_TRACE_TR("INFO: null RTAO") - } - -private: - le_uint32 fCount; -}; - - template class LEReferenceTo : public LETableReference { public: @@ -404,14 +360,26 @@ public: verifyLength(0, LETableVarSizer::getSize(), success); if(LE_FAILURE(success)) clear(); } +#if LE_ENABLE_RAW inline LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} inline LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} - inline LEReferenceTo() : LETableReference(NULL) {} +#endif + inline LEReferenceTo(EStaticData staticData, const le_uint8 *data, size_t length) : LETableReference(staticData, data, length) {} + inline LEReferenceTo(EStaticData staticData, const T *data, size_t length) : LETableReference(staticData, (const le_uint8*)data, length) {} + inline LEReferenceTo() : LETableReference() {} + +#if LE_ENABLE_RAW inline LEReferenceTo& operator=(const T* other) { setRaw(other); return *this; } +#endif + + LEReferenceTo& setTo(LETableReference::EStaticData staticData, const T* other, size_t length) { + LETableReference::setTo(staticData, other, length); + return *this; + } LEReferenceTo &reparent(const LETableReference &base) { fParent = &base; @@ -430,11 +398,135 @@ public: } const T *operator->() const { return getAlias(); } + const T *operator*() const { return getAlias(); } const T *getAlias() const { return (const T*)fStart; } - const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } +#if LE_ENABLE_RAW + const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; } +#endif + }; +/** + * \def LE_UNBOUNDED_ARRAY + * define an array with no *known* bound. Will trim to available size. + * @internal + */ +#define LE_UNBOUNDED_ARRAY LE_UINT32_MAX + +template +class LEReferenceToArrayOf : public LETableReference { +public: + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, size_t offset, le_uint32 count) + : LETableReference(parent, offset, LE_UINTPTR_MAX, success), fCount(count) { + _TRTRACE("INFO: new RTAO by offset") + if(LE_SUCCESS(success)) { + if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length + fCount = getLength()/LETableVarSizer::getSize(); // fit to max size + } + LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); + } + if(LE_FAILURE(success)) { + fCount=0; + clear(); + } + } + + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, le_uint32 count) + : LETableReference(parent, parent.ptrToOffset(array, success), LE_UINTPTR_MAX, success), fCount(count) { +_TRTRACE("INFO: new RTAO") + if(LE_SUCCESS(success)) { + if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length + fCount = getLength()/LETableVarSizer::getSize(); // fit to max size + } + LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); + } + if(LE_FAILURE(success)) clear(); + } + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, size_t offset, le_uint32 count) + : LETableReference(parent, parent.ptrToOffset(array, success)+offset, LE_UINTPTR_MAX, success), fCount(count) { +_TRTRACE("INFO: new RTAO") + if(LE_SUCCESS(success)) { + if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length + fCount = getLength()/LETableVarSizer::getSize(); // fit to max size + } + LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); + } + if(LE_FAILURE(success)) clear(); + } + + LEReferenceToArrayOf() :LETableReference(), fCount(0) {} + + le_uint32 getCount() const { return fCount; } + + const T *getAlias() const { return (const T*)fStart; } + + const T *getAlias(le_uint32 i, LEErrorCode &success) const { + return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success))); + } + +#ifndef LE_ENABLE_RAW + const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; } +#endif + + const T& getObject(le_uint32 i, LEErrorCode &success) const { + return *getAlias(i,success); + } + + /** + * by-value array accessor for integral types. + */ + const T operator[](le_uint32 i) const { + LEErrorCode success = LE_NO_ERROR; + const T *ret = getAlias(i, success); + if(LE_FAILURE(success) || ret==NULL) { +#if LE_ASSERT_BAD_FONT + LE_DEBUG_TR3("Range error, out of bounds? (%p) #%d", NULL, i); +#endif + return T(0); // will not work for all types. + } + return *ret; + } + + const LEReferenceTo getReference(le_uint32 i, LEErrorCode &success) const { + if(LE_FAILURE(success)) return LEReferenceTo(); + return LEReferenceTo(*this, success, getAlias(i,success)); + } + + const T& operator()(le_uint32 i, LEErrorCode &success) const { + return *getAlias(i,success); + } + + size_t getOffsetFor(le_uint32 i, LEErrorCode &success) const { + if(LE_SUCCESS(success)&&i::getSize()*i; + } else { + LE_DEBUG_TR3("getOffsetFor failed (%p) index=%d",NULL, i); + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; + } + return 0; + } + + LEReferenceToArrayOf &reparent(const LETableReference &base) { + fParent = &base; + return *this; + } + + LEReferenceToArrayOf(const LETableReference& parent, LEErrorCode & success) : LETableReference(parent,0, LE_UINTPTR_MAX, success), fCount(0) { + _TRTRACE("INFO: null RTAO") + } + +private: + le_uint32 fCount; +}; + + + + +#ifdef _TRTRACE +#undef _TRTRACE +#endif + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/LETypes.h b/jdk/src/share/native/sun/font/layout/LETypes.h index 130f72fd742..d86a0aa44f3 100644 --- a/jdk/src/share/native/sun/font/layout/LETypes.h +++ b/jdk/src/share/native/sun/font/layout/LETypes.h @@ -337,6 +337,20 @@ struct LEPoint typedef struct LEPoint LEPoint; #endif +/** + * \def LE_TRACE + * @internal + */ +#ifndef LE_TRACE +# define LE_TRACE 0 +#endif + +#if LE_TRACE +# include +# define _LETRACE printf("\n%s:%d: LE: ", __FILE__, __LINE__),printf +#else +# define _LETRACE 0&& +#endif #ifndef U_HIDE_INTERNAL_API @@ -553,7 +567,7 @@ enum LEFeatureTags { LE_CALT_FEATURE_TAG = 0x63616C74UL, /**< 'calt' */ LE_CASE_FEATURE_TAG = 0x63617365UL, /**< 'case' */ LE_CCMP_FEATURE_TAG = 0x63636D70UL, /**< 'ccmp' */ - LE_CJCT_FEATURE_TAG = 0x636A6374UL, /**< 'cjct' */ + LE_CJCT_FEATURE_TAG = 0x636A6374UL, /**< 'cjct' */ LE_CLIG_FEATURE_TAG = 0x636C6967UL, /**< 'clig' */ LE_CPSP_FEATURE_TAG = 0x63707370UL, /**< 'cpsp' */ LE_CSWH_FEATURE_TAG = 0x63737768UL, /**< 'cswh' */ @@ -701,6 +715,12 @@ enum LEFeatureENUMs { LE_FEATURE_ENUM_MAX = LE_CHAR_FILTER_FEATURE_ENUM }; + +/** + * Flags for typographic features. + * @internal + * @{ + */ #define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM) #define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM) #define LE_NoCanon_FEATURE_FLAG (1 << LE_NoCanon_FEATURE_ENUM) @@ -727,6 +747,9 @@ enum LEFeatureENUMs { #define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM) #define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM) +/** + * @} + */ #define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG) /**< default features */ @@ -768,7 +791,7 @@ typedef enum LEErrorCode LEErrorCode; * * @stable ICU 2.4 */ -#ifndef LE_FAILURE +#ifndef LE_SUCCESS #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code)) #endif @@ -781,4 +804,4 @@ typedef enum LEErrorCode LEErrorCode; #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code)) #endif -#endif /* __LETYPES_H */ +#endif diff --git a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp index 30fb0bbede5..d97fba41a8b 100644 --- a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp @@ -156,7 +156,7 @@ public: CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); virtual ~CanonMarkFilter(); - virtual le_bool accept(LEGlyphID glyph) const; + virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; }; CanonMarkFilter::CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success) @@ -169,9 +169,8 @@ CanonMarkFilter::~CanonMarkFilter() // nothing to do? } -le_bool CanonMarkFilter::accept(LEGlyphID glyph) const +le_bool CanonMarkFilter::accept(LEGlyphID glyph, LEErrorCode &success) const { - LEErrorCode success = LE_NO_ERROR; le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success); if(LE_FAILURE(success)) return false; return glyphClass != 0; @@ -207,7 +206,7 @@ LayoutEngine::LayoutEngine(const LEFontInstance *fontInstance, fGlyphStorage = new LEGlyphStorage(); if (fGlyphStorage == NULL) { success = LE_MEMORY_ALLOCATION_ERROR; -} + } } le_int32 LayoutEngine::getGlyphCount() const @@ -263,7 +262,9 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off return count; } - LEReferenceTo canonGSUBTable((GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable); + LEReferenceTo canonGSUBTable(LETableReference::kStaticData, + (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable, + CanonShaping::glyphSubstitutionTableLen); LETag scriptTag = OpenTypeLayoutEngine::getScriptTag(fScriptCode); LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode); le_int32 i, dir = 1, out = 0, outCharCount = count; @@ -300,7 +301,7 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, reordered, fakeGlyphStorage); inChars = reordered; - } + } fakeGlyphStorage.allocateAuxData(success); @@ -323,7 +324,8 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off LE_DELETE_ARRAY(reordered); } - outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, (const GlyphDefinitionTableHeader*)NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); + const LEReferenceTo noGDEF; // empty gdef header + outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, noGDEF, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); if (LE_FAILURE(success)) { delete substitutionFilter; @@ -403,10 +405,13 @@ void LayoutEngine::positionGlyphs(LEGlyphStorage &glyphStorage, float x, float y LEPoint advance; glyphStorage.setPosition(i, x, y, success); + _LETRACE("g#%-4d (%.2f, %.2f)", i, x, y); fFontInstance->getGlyphAdvance(glyphStorage[i], advance); x += advance.fX; y += advance.fY; + + } glyphStorage.setPosition(glyphCount, x, y, success); @@ -424,7 +429,7 @@ void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset return; } - LEReferenceTo gdefTable((GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, + LEReferenceTo gdefTable(LETableReference::kStaticData, (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); CanonMarkFilter filter(gdefTable, success); @@ -464,9 +469,10 @@ void LayoutEngine::adjustMarkGlyphs(LEGlyphStorage &glyphStorage, LEGlyphFilter glyphStorage.getGlyphPosition(p + 1, next, ignore, success); xAdvance = next - prev; + _LETRACE("p#%d (%.2f,%.2f)", p, xAdvance, 0); glyphStorage.adjustPosition(p, xAdjust, 0, success); - if (markFilter->accept(glyphStorage[p])) { + if (markFilter->accept(glyphStorage[p], success)) { xAdjust -= xAdvance; } @@ -506,9 +512,13 @@ void LayoutEngine::adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, glyphStorage.getGlyphPosition(p + 1, next, ignore, success); xAdvance = next - prev; + + _LETRACE("p#%d (%.2f,%.2f)", p, xAdvance, 0); + + glyphStorage.adjustPosition(p, xAdjust, 0, success); - if (markFilter->accept(chars[c])) { + if (markFilter->accept(chars[c], success)) { xAdjust -= xAdvance; } @@ -662,8 +672,10 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan break; } } else { - MorphTableHeader2 *morxTable = (MorphTableHeader2 *)fontInstance->getFontTable(morxTableTag); - if (morxTable != NULL && SWAPL(morxTable->version)==0x00020000) { + LEReferenceTo morxTable(fontInstance, morxTableTag, success); + if (LE_SUCCESS(success) && + morxTable.isValid() && + SWAPL(morxTable->version)==0x00020000) { result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success); } else { LEReferenceTo mortTable(fontInstance, mortTableTag, success); @@ -686,21 +698,20 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan break; } - case arabScriptCode: - //case hebrScriptCode: - result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); - break; + case arabScriptCode: + result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); + break; - //case hebrScriptCode: - // return new HebrewOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags); + //case hebrScriptCode: + // return new HebrewOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags); - case thaiScriptCode: - result = new ThaiLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); - break; + case thaiScriptCode: + result = new ThaiLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); + break; - case hangScriptCode: - result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); - break; + case hangScriptCode: + result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); + break; default: result = new LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); @@ -711,9 +722,9 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan } if (result && LE_FAILURE(success)) { - delete result; - result = NULL; - } + delete result; + result = NULL; + } if (result == NULL) { success = LE_MEMORY_ALLOCATION_ERROR; diff --git a/jdk/src/share/native/sun/font/layout/LayoutEngine.h b/jdk/src/share/native/sun/font/layout/LayoutEngine.h index 2f5487f382d..0d4e1c7f504 100644 --- a/jdk/src/share/native/sun/font/layout/LayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.h @@ -156,8 +156,8 @@ protected: * @param fontInstance - the font for the text * @param scriptCode - the script for the text * @param languageCode - the language for the text - * @param typoFlags - the typographic control flags for the text. Set bit 1 if kerning - * is desired, set bit 2 if ligature formation is desired. Others are reserved. + * @param typoFlags - the typographic control flags for the text (a bitfield). Use kTypoFlagKern + * if kerning is desired, kTypoFlagLiga if ligature formation is desired. Others are reserved. * @param success - set to an error code if the operation fails * * @see LEFontInstance diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp index 5eacf1c5e0c..2e570bfe62d 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp @@ -105,7 +105,7 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp LEReferenceToArrayOf componentTable(stHeader, success, componentOffset, LE_UNBOUNDED_ARRAY); if(LE_FAILURE(success)) { currGlyph+= dir; - return nextStateIndex; // get out! bad font + return nextStateIndex; // get out! bad font } do { diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp index 3a036c50772..9e7120eb64b 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp @@ -49,14 +49,20 @@ le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, Gl return 0; } - if (coverageIndex >= 0) { + LEReferenceToArrayOf ligSetTableOffsetArrayRef(base, success, ligSetTableOffsetArray, SWAPW(ligSetCount)); + + if (coverageIndex >= 0 && LE_SUCCESS(success) && (le_uint32)coverageIndex < ligSetTableOffsetArrayRef.getCount()) { Offset ligSetTableOffset = SWAPW(ligSetTableOffsetArray[coverageIndex]); - const LigatureSetTable *ligSetTable = (const LigatureSetTable *) ((char *) this + ligSetTableOffset); + LEReferenceTo ligSetTable(base, success, ligSetTableOffset); + + if( LE_FAILURE(success) ) { return 0; } le_uint16 ligCount = SWAPW(ligSetTable->ligatureCount); - for (le_uint16 lig = 0; lig < ligCount; lig += 1) { + LEReferenceTo ligatureTableOffsetArray(base, success, ligSetTable->ligatureTableOffsetArray, ligCount); + for (le_uint16 lig = 0; LE_SUCCESS(success) && lig < ligCount; lig += 1) { Offset ligTableOffset = SWAPW(ligSetTable->ligatureTableOffsetArray[lig]); - const LigatureTable *ligTable = (const LigatureTable *) ((char *)ligSetTable + ligTableOffset); + LEReferenceTo ligTable(ligSetTable, success, ligTableOffset); + if(LE_FAILURE(success)) { return 0; } le_uint16 compCount = SWAPW(ligTable->compCount) - 1; le_int32 startPosition = glyphIterator->getCurrStreamPosition(); TTGlyphID ligGlyph = SWAPW(ligTable->ligGlyph); @@ -72,7 +78,7 @@ le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, Gl } } - if (comp == compCount && (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, ligGlyph)))) { + if (comp == compCount && (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, ligGlyph), success))) { GlyphIterator tempIterator(*glyphIterator); TTGlyphID deletedGlyph = tempIterator.ignoresMarks()? 0xFFFE : 0xFFFF; diff --git a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp index 29bedfa352c..44c78c389d4 100644 --- a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp @@ -60,9 +60,11 @@ le_uint32 LookupProcessor::applyLookupTable(const LEReferenceTo &lo LEReferenceTo lookupSubtable = lookupTable->getLookupSubtable(lookupTable, subtable, success); delta = applySubtable(lookupSubtable, lookupType, glyphIterator, fontInstance, success); - - if (delta > 0 || LE_FAILURE(success)) { - return 1; + if (delta > 0 && LE_FAILURE(success)) { +#if LE_TRACE + _LETRACE("Posn #%d, type %X, applied subtable #%d/%d - %s\n", startPosition, lookupType, subtable, subtableCount, u_errorName((UErrorCode)success)); +#endif + return 1; } glyphIterator->setCurrStreamPosition(startPosition); @@ -86,7 +88,7 @@ le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdj } GlyphIterator glyphIterator(glyphStorage, glyphPositionAdjustments, - rightToLeft, 0, 0, glyphDefinitionTableHeader); + rightToLeft, 0, 0, glyphDefinitionTableHeader, success); le_int32 newGlyphCount = glyphCount; for (le_uint16 order = 0; order < lookupOrderCount && LE_SUCCESS(success); order += 1) { @@ -94,6 +96,7 @@ le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdj FeatureMask selectMask = lookupSelectArray[lookup]; if (selectMask != 0) { + _LETRACE("Processing order#%d/%d", order, lookupOrderCount); const LEReferenceTo lookupTable = lookupListTable->getLookupTable(lookupListTable, lookup, success); if (!lookupTable.isValid() ||LE_FAILURE(success) ) { continue; @@ -103,8 +106,11 @@ le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdj glyphIterator.reset(lookupFlags, selectMask); while (glyphIterator.findFeatureTag()) { - applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); // TODO + applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); if (LE_FAILURE(success)) { +#if LE_TRACE + _LETRACE("Failure for lookup 0x%x - %s\n", lookup, u_errorName((UErrorCode)success)); +#endif return 0; } } @@ -138,7 +144,7 @@ le_uint32 LookupProcessor::applySingleLookup(le_uint16 lookupTableIndex, GlyphIt le_int32 LookupProcessor::selectLookups(const LEReferenceTo &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success) { le_uint16 lookupCount = featureTable.isValid()? SWAPW(featureTable->lookupCount) : 0; - le_int32 store = order; + le_uint32 store = (le_uint32)order; LEReferenceToArrayOf lookupListIndexArray(featureTable, success, featureTable->lookupListIndexArray, lookupCount); @@ -147,6 +153,9 @@ le_int32 LookupProcessor::selectLookups(const LEReferenceTo &featu if (lookupListIndex >= lookupSelectCount) { continue; } + if (store >= lookupOrderCount) { + continue; + } lookupSelectArray[lookupListIndex] |= featureMask; lookupOrderArray[store++] = lookupListIndex; @@ -246,7 +255,7 @@ LookupProcessor::LookupProcessor(const LETableReference &baseAddress, if (requiredFeatureIndex != 0xFFFF) { requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success); - featureReferences += SWAPW(featureTable->lookupCount); + featureReferences += SWAPW(requiredFeatureTable->lookupCount); } lookupOrderArray = LE_NEW_ARRAY(le_uint16, featureReferences); @@ -254,6 +263,7 @@ LookupProcessor::LookupProcessor(const LETableReference &baseAddress, success = LE_MEMORY_ALLOCATION_ERROR; return; } + lookupOrderCount = featureReferences; for (le_int32 f = 0; f < featureMapCount; f += 1) { FeatureMap fm = featureMap[f]; diff --git a/jdk/src/share/native/sun/font/layout/Lookups.cpp b/jdk/src/share/native/sun/font/layout/Lookups.cpp index 2c04cdfe44c..f914f2d7ee0 100644 --- a/jdk/src/share/native/sun/font/layout/Lookups.cpp +++ b/jdk/src/share/native/sun/font/layout/Lookups.cpp @@ -65,7 +65,7 @@ le_int32 LookupSubtable::getGlyphCoverage(const LEReferenceTo &b if(LE_FAILURE(success)) return 0; - return coverageTable->getGlyphCoverage(glyphID); + return coverageTable->getGlyphCoverage(coverageTable, glyphID, success); } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/MarkArrays.cpp b/jdk/src/share/native/sun/font/layout/MarkArrays.cpp index d06b1d18bc2..b69f2727478 100644 --- a/jdk/src/share/native/sun/font/layout/MarkArrays.cpp +++ b/jdk/src/share/native/sun/font/layout/MarkArrays.cpp @@ -38,20 +38,28 @@ U_NAMESPACE_BEGIN -le_int32 MarkArray::getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, - LEPoint &anchor) const +le_int32 MarkArray::getMarkClass(const LETableReference &base, LEGlyphID glyphID, + le_int32 coverageIndex, const LEFontInstance *fontInstance, + LEPoint &anchor, LEErrorCode &success) const { le_int32 markClass = -1; - if (coverageIndex >= 0) { + if ( coverageIndex >= 0 && LE_SUCCESS(success) ) { le_uint16 mCount = SWAPW(markCount); - if (coverageIndex < mCount) { + LEReferenceToArrayOf markRecordArrayRef(base, success, markRecordArray, mCount); + if(LE_FAILURE(success)) { + return markClass; + } const MarkRecord *markRecord = &markRecordArray[coverageIndex]; Offset anchorTableOffset = SWAPW(markRecord->markAnchorTableOffset); - const AnchorTable *anchorTable = (AnchorTable *) ((char *) this + anchorTableOffset); + LEReferenceTo anchorTable(base, success, anchorTableOffset); - anchorTable->getAnchor(glyphID, fontInstance, anchor); + if(LE_FAILURE(success)) { + return markClass; + } + + anchorTable->getAnchor(anchorTable, glyphID, fontInstance, anchor, success); markClass = SWAPW(markRecord->markClass); } diff --git a/jdk/src/share/native/sun/font/layout/MarkArrays.h b/jdk/src/share/native/sun/font/layout/MarkArrays.h index badeb4f162e..01fff9f0768 100644 --- a/jdk/src/share/native/sun/font/layout/MarkArrays.h +++ b/jdk/src/share/native/sun/font/layout/MarkArrays.h @@ -54,8 +54,9 @@ struct MarkArray le_uint16 markCount; MarkRecord markRecordArray[ANY_NUMBER]; - le_int32 getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, - LEPoint &anchor) const; + le_int32 getMarkClass(const LETableReference &base, LEGlyphID glyphID, + le_int32 coverageIndex, const LEFontInstance *fontInstance, + LEPoint &anchor, LEErrorCode &success) const; }; LE_VAR_ARRAY(MarkArray, markRecordArray) diff --git a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp index 50df2704a88..aaa99fd5b25 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp @@ -66,11 +66,11 @@ le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, Gl } LEPoint markAnchor; - const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); - le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); + LEReferenceTo markArray(base, success, (const MarkArray *) ((char *) this + SWAPW(markArrayOffset))); + le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); le_uint16 mcCount = SWAPW(classCount); - if (markClass < 0 || markClass >= mcCount) { + if (markClass < 0 || markClass >= mcCount || LE_FAILURE(success)) { // markGlyph isn't in the mark array or its // mark class is too big. The table is mal-formed! return 0; @@ -80,7 +80,8 @@ le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, Gl GlyphIterator baseIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreLigatures*/)); LEGlyphID baseGlyph = findBaseGlyph(&baseIterator); le_int32 baseCoverage = getBaseCoverage(base, (LEGlyphID) baseGlyph, success); - const BaseArray *baseArray = (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset)); + LEReferenceTo baseArray(base, success, (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset))); + if(LE_FAILURE(success)) return 0; le_uint16 baseCount = SWAPW(baseArray->baseRecordCount); if (baseCoverage < 0 || baseCoverage >= baseCount) { @@ -89,19 +90,23 @@ le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, Gl // table is mal-formed... return 0; } + LEReferenceTo baseRecord(base, success, &baseArray->baseRecordArray[baseCoverage * mcCount]); + if( LE_FAILURE(success) ) { return 0; } + LEReferenceToArrayOf baseAnchorTableOffsetArray(base, success, &(baseRecord->baseAnchorTableOffsetArray[0]), markClass+1); - const BaseRecord *baseRecord = &baseArray->baseRecordArray[baseCoverage * mcCount]; + if( LE_FAILURE(success) ) { return 0; } Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]); - const AnchorTable *anchorTable = (const AnchorTable *) ((char *) baseArray + anchorTableOffset); - LEPoint baseAnchor, markAdvance, pixels; - - if (anchorTableOffset == 0) { + if (anchorTableOffset <= 0) { // this means the table is mal-formed... glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); return 0; } - anchorTable->getAnchor(baseGlyph, fontInstance, baseAnchor); + LEReferenceTo anchorTable(baseArray, success, anchorTableOffset); + LEPoint baseAnchor, markAdvance, pixels; + + + anchorTable->getAnchor(anchorTable, baseGlyph, fontInstance, baseAnchor, success); fontInstance->getGlyphAdvance(markGlyph, pixels); fontInstance->pixelsToUnits(pixels, markAdvance); @@ -109,6 +114,8 @@ le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, Gl float anchorDiffX = baseAnchor.fX - markAnchor.fX; float anchorDiffY = baseAnchor.fY - markAnchor.fY; + _LETRACE("Offset: (%.2f, %.2f) glyph 0x%X", anchorDiffX, anchorDiffY, markGlyph); + glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); if (glyphIterator->isRightToLeft()) { @@ -132,7 +139,6 @@ le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, Gl gi.next(); } // end of JK patch - fontInstance->pixelsToUnits(pixels, baseAdvance); glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY); diff --git a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp index ab21f86d1c5..55fadf3b5f0 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp @@ -65,8 +65,11 @@ le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base } LEPoint markAnchor; - const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); - le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); + LEReferenceTo markArray(base, success, SWAPW(markArrayOffset)); + if( LE_FAILURE(success) ) { + return 0; + } + le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); le_uint16 mcCount = SWAPW(classCount); if (markClass < 0 || markClass >= mcCount) { @@ -79,7 +82,7 @@ le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base GlyphIterator ligatureIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreBaseGlyphs*/)); LEGlyphID ligatureGlyph = findLigatureGlyph(&ligatureIterator); le_int32 ligatureCoverage = getBaseCoverage(base, (LEGlyphID) ligatureGlyph, success); - const LigatureArray *ligatureArray = (const LigatureArray *) ((char *) this + SWAPW(baseArrayOffset)); + LEReferenceTo ligatureArray(base, success, SWAPW(baseArrayOffset)); le_uint16 ligatureCount = SWAPW(ligatureArray->ligatureCount); if (ligatureCoverage < 0 || ligatureCoverage >= ligatureCount) { @@ -91,7 +94,7 @@ le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base le_int32 markPosition = glyphIterator->getCurrStreamPosition(); Offset ligatureAttachOffset = SWAPW(ligatureArray->ligatureAttachTableOffsetArray[ligatureCoverage]); - const LigatureAttachTable *ligatureAttachTable = (const LigatureAttachTable *) ((char *) ligatureArray + ligatureAttachOffset); + LEReferenceTo ligatureAttachTable(ligatureArray, success, ligatureAttachOffset); le_int32 componentCount = SWAPW(ligatureAttachTable->componentCount); le_int32 component = ligatureIterator.getMarkComponent(markPosition); @@ -100,12 +103,14 @@ le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base component = componentCount - 1; } - const ComponentRecord *componentRecord = &ligatureAttachTable->componentRecordArray[component * mcCount]; + LEReferenceTo componentRecord(base, success, &ligatureAttachTable->componentRecordArray[component * mcCount]); + LEReferenceToArrayOf ligatureAnchorTableOffsetArray(base, success, &(componentRecord->ligatureAnchorTableOffsetArray[0]), markClass+1); + if( LE_FAILURE(success) ) { return 0; } Offset anchorTableOffset = SWAPW(componentRecord->ligatureAnchorTableOffsetArray[markClass]); - const AnchorTable *anchorTable = (const AnchorTable *) ((char *) ligatureAttachTable + anchorTableOffset); + LEReferenceTo anchorTable(ligatureAttachTable, success, anchorTableOffset); LEPoint ligatureAnchor, markAdvance, pixels; - anchorTable->getAnchor(ligatureGlyph, fontInstance, ligatureAnchor); + anchorTable->getAnchor(anchorTable, ligatureGlyph, fontInstance, ligatureAnchor, success); fontInstance->getGlyphAdvance(markGlyph, pixels); fontInstance->pixelsToUnits(pixels, markAdvance); diff --git a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp index b06a287e5d9..4ed835453af 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp @@ -66,8 +66,11 @@ le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, Gl } LEPoint markAnchor; - const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); - le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); + LEReferenceTo markArray(base, success, SWAPW(markArrayOffset)); + if(LE_FAILURE(success)) { + return 0; + } + le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); le_uint16 mcCount = SWAPW(classCount); if (markClass < 0 || markClass >= mcCount) { @@ -79,7 +82,8 @@ le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, Gl GlyphIterator mark2Iterator(*glyphIterator); LEGlyphID mark2Glyph = findMark2Glyph(&mark2Iterator); le_int32 mark2Coverage = getBaseCoverage(base, (LEGlyphID) mark2Glyph, success); - const Mark2Array *mark2Array = (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset)); + LEReferenceTo mark2Array(base, success, (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset))); + if(LE_FAILURE(success)) return 0; le_uint16 mark2Count = SWAPW(mark2Array->mark2RecordCount); if (mark2Coverage < 0 || mark2Coverage >= mark2Count) { @@ -89,9 +93,11 @@ le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, Gl return 0; } - const Mark2Record *mark2Record = &mark2Array->mark2RecordArray[mark2Coverage * mcCount]; + LEReferenceTo mark2Record(base, success, &mark2Array->mark2RecordArray[mark2Coverage * mcCount]); + if(LE_FAILURE(success)) return 0; Offset anchorTableOffset = SWAPW(mark2Record->mark2AnchorTableOffsetArray[markClass]); - const AnchorTable *anchorTable = (const AnchorTable *) ((char *) mark2Array + anchorTableOffset); + LEReferenceTo anchorTable(mark2Array, success, anchorTableOffset); + if(LE_FAILURE(success)) return 0; LEPoint mark2Anchor, markAdvance, pixels; if (anchorTableOffset == 0) { @@ -99,7 +105,7 @@ le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, Gl return 0; } - anchorTable->getAnchor(mark2Glyph, fontInstance, mark2Anchor); + anchorTable->getAnchor(anchorTable, mark2Glyph, fontInstance, mark2Anchor, success); fontInstance->getGlyphAdvance(markGlyph, pixels); fontInstance->pixelsToUnits(pixels, markAdvance); @@ -107,6 +113,8 @@ le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, Gl float anchorDiffX = mark2Anchor.fX - markAnchor.fX; float anchorDiffY = mark2Anchor.fY - markAnchor.fY; + _LETRACE("Offset: (%.2f, %.2f) glyph 0x%X mark2 0x%X", anchorDiffX, anchorDiffY, markGlyph, mark2Glyph); + glyphIterator->setCurrGlyphBaseOffset(mark2Iterator.getCurrStreamPosition()); if (glyphIterator->isRightToLeft()) { diff --git a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp index af94e623bab..5ff16fe48b2 100644 --- a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp @@ -54,9 +54,10 @@ le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, Gl // FIXME: is this always the right thing to do? // FIXME: should this only be done for a non-zero // glyphCount? - if (filter != NULL && filter->accept(glyph)) { + if (filter != NULL && filter->accept(glyph, success)) { return 0; } + if(LE_FAILURE(success)) return 0; le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); le_uint16 seqCount = SWAPW(sequenceCount); @@ -67,7 +68,7 @@ le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, Gl if (coverageIndex >= 0 && coverageIndex < seqCount) { Offset sequenceTableOffset = SWAPW(sequenceTableOffsetArray[coverageIndex]); - const SequenceTable *sequenceTable = (const SequenceTable *) ((char *) this + sequenceTableOffset); + LEReferenceTo sequenceTable(base, success, sequenceTableOffset); le_uint16 glyphCount = SWAPW(sequenceTable->glyphCount); if (glyphCount == 0) { @@ -76,7 +77,7 @@ le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, Gl } else if (glyphCount == 1) { TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[0]); - if (filter != NULL && ! filter->accept(LE_SET_GLYPH(glyph, substitute))) { + if (filter != NULL && ! filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { return 0; } @@ -89,7 +90,7 @@ le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, Gl for (le_int32 i = 0; i < glyphCount; i += 1) { TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[i]); - if (! filter->accept(substitute)) { + if (! filter->accept(substitute, success)) { return 0; } } diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp index 707fb21eceb..b4c9122c5e2 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp @@ -470,6 +470,7 @@ le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 o void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphStorage &glyphStorage, LEErrorCode &success) { + _LETRACE("OTLE::adjustGPOS"); if (LE_FAILURE(success)) { return; } @@ -510,14 +511,17 @@ void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int3 if (!fGPOSTable.isEmpty()) { if (fScriptTagV2 != nullScriptTag && fGPOSTable->coversScriptAndLanguage(fGPOSTable, fScriptTagV2,fLangSysTag,success)) { + _LETRACE("OTLE::process [0]"); fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTagV2, fLangSysTag, fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); } else { + _LETRACE("OTLE::process [1]"); fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); } } else if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */ + _LETRACE("OTLE::kerning"); LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success); KernTable kt(kernTable, success); kt.process(glyphStorage, success); @@ -546,6 +550,7 @@ void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int3 xPlacement = fFontInstance->xUnitsToPoints(xPlacement); yPlacement = fFontInstance->yUnitsToPoints(yPlacement); + _LETRACE("OTLE GPOS: #%d, (%.2f,%.2f)", i, xPlacement, yPlacement); glyphStorage.adjustPosition(i, xAdjust + xPlacement, -(yAdjust + yPlacement), success); xAdjust += fFontInstance->xUnitsToPoints(xAdvance); diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h index 1965a6517ba..0cd795cedcf 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h +++ b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h @@ -46,15 +46,14 @@ class OpenTypeUtilities /* not : public UObject because all methods are static * public: static le_int8 highBit(le_int32 value); static Offset getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success); - /** - * @deprecated TODO remove - */ +#if LE_ENABLE_RAW static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount) { LEErrorCode success = LE_NO_ERROR; LETableReference recordRef0((const le_uint8*)records); LEReferenceToArrayOf recordRef(recordRef0, success, (size_t)0, recordCount); return getGlyphRangeIndex(glyphID, recordRef, success); } +#endif static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const LEReferenceToArrayOf &records, LEErrorCode &success); static le_int32 search(le_uint16 value, const le_uint16 array[], le_int32 count); static le_int32 search(le_uint32 value, const le_uint32 array[], le_int32 count); diff --git a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp index bba2b8707ad..894cb44c476 100644 --- a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp @@ -76,19 +76,17 @@ le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTogetCurrGlyphID(); le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success); - - if (LE_FAILURE(success)) { - return 0; - } GlyphIterator tempIterator(*glyphIterator); - if (coverageIndex >= 0 && glyphIterator->next()) { + LEReferenceToArrayOf pairSetTableOffsetArrayRef(base, success, pairSetTableOffsetArray, SWAPW(pairSetCount)); + + if (LE_SUCCESS(success) && coverageIndex >= 0 && glyphIterator->next() && (le_uint32)coverageIndex < pairSetTableOffsetArrayRef.getCount()) { Offset pairSetTableOffset = SWAPW(pairSetTableOffsetArray[coverageIndex]); - LEReferenceTo pairSetTable(base, success, ((char *) this + pairSetTableOffset)); - if (LE_FAILURE(success)) { - return 0; - } + LEReferenceTo pairSetTable(base, success, pairSetTableOffset); + if( LE_FAILURE(success) ) return 0; le_uint16 pairValueCount = SWAPW(pairSetTable->pairValueCount); + LEReferenceTo pairValueRecordArray(pairSetTable, success, pairSetTable->pairValueRecordArray); + if( LE_FAILURE(success) ) return 0; le_int16 valueRecord1Size = ValueRecord::getSize(SWAPW(valueFormat1)); le_int16 valueRecord2Size = ValueRecord::getSize(SWAPW(valueFormat2)); le_int16 recordSize = sizeof(PairValueRecord) - sizeof(ValueRecord) + valueRecord1Size + valueRecord2Size; @@ -96,21 +94,22 @@ le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTo pairValueRecord; if (pairValueCount != 0) { - pairValueRecord = findPairValueRecord(base, (TTGlyphID) LE_GET_GLYPH(secondGlyph), pairSetTable->pairValueRecordArray, pairValueCount, recordSize, success); + pairValueRecord = findPairValueRecord((TTGlyphID) LE_GET_GLYPH(secondGlyph), pairValueRecordArray, pairValueCount, recordSize, success); } - if (pairValueRecord.isEmpty()) { + if (pairValueRecord.isEmpty() || LE_FAILURE(success)) { return 0; } if (valueFormat1 != 0) { - pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); + pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), base, tempIterator, fontInstance, success); } if (valueFormat2 != 0) { - const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &pairValueRecord->valueRecord1 + valueRecord1Size); - - valueRecord2->adjustPosition(SWAPW(valueFormat2), (char *) this, *glyphIterator, fontInstance); + LEReferenceTo valueRecord2(base, success, ((char *) &pairValueRecord->valueRecord1 + valueRecord1Size)); + if(LE_SUCCESS(success)) { + valueRecord2->adjustPosition(SWAPW(valueFormat2), base, *glyphIterator, fontInstance, success); + } } // back up glyphIterator so second glyph can be @@ -135,26 +134,28 @@ le_uint32 PairPositioningFormat2Subtable::process(const LEReferenceTo= 0 && glyphIterator->next()) { LEGlyphID secondGlyph = glyphIterator->getCurrGlyphID(); - const ClassDefinitionTable *classDef1 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef1Offset)); - const ClassDefinitionTable *classDef2 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef2Offset)); - le_int32 class1 = classDef1->getGlyphClass(firstGlyph); - le_int32 class2 = classDef2->getGlyphClass(secondGlyph); + const LEReferenceTo classDef1(base, success, SWAPW(classDef1Offset)); + const LEReferenceTo classDef2(base, success, SWAPW(classDef2Offset)); + le_int32 class1 = classDef1->getGlyphClass(classDef1, firstGlyph, success); + le_int32 class2 = classDef2->getGlyphClass(classDef2, secondGlyph, success); le_int16 valueRecord1Size = ValueRecord::getSize(SWAPW(valueFormat1)); le_int16 valueRecord2Size = ValueRecord::getSize(SWAPW(valueFormat2)); le_int16 class2RecordSize = valueRecord1Size + valueRecord2Size; le_int16 class1RecordSize = class2RecordSize * SWAPW(class2Count); - const Class1Record *class1Record = (const Class1Record *) ((char *) class1RecordArray + (class1RecordSize * class1)); - const Class2Record *class2Record = (const Class2Record *) ((char *) class1Record->class2RecordArray + (class2RecordSize * class2)); + const LEReferenceTo class1Record(base, success, (const Class1Record *) ((char *) class1RecordArray + (class1RecordSize * class1))); + const LEReferenceTo class2Record(base, success, (const Class2Record *) ((char *) class1Record->class2RecordArray + (class2RecordSize * class2))); - - if (valueFormat1 != 0) { - class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); - } - - if (valueFormat2 != 0) { - const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &class2Record->valueRecord1 + valueRecord1Size); - - valueRecord2->adjustPosition(SWAPW(valueFormat2), (const char *) this, *glyphIterator, fontInstance); + if( LE_SUCCESS(success) ) { + if (valueFormat1 != 0) { + class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), base, tempIterator, fontInstance, success); + } + if (valueFormat2 != 0) { + const LEReferenceTo valueRecord2(base, success, ((char *) &class2Record->valueRecord1) + valueRecord1Size); + LEReferenceTo thisRef(base, success, this); + if(LE_SUCCESS(success)) { + valueRecord2->adjustPosition(SWAPW(valueFormat2), thisRef, *glyphIterator, fontInstance, success); + } + } } // back up glyphIterator so second glyph can be @@ -166,23 +167,24 @@ le_uint32 PairPositioningFormat2Subtable::process(const LEReferenceTo PairPositioningFormat1Subtable::findPairValueRecord(const LETableReference &base, TTGlyphID glyphID, const PairValueRecord *records, le_uint16 recordCount, le_uint16 recordSize, LEErrorCode &success) const +LEReferenceTo +PairPositioningFormat1Subtable::findPairValueRecord(TTGlyphID glyphID, LEReferenceTo& records, + le_uint16 recordCount, + le_uint16 recordSize, LEErrorCode &success) const { #if 1 // The OpenType spec. says that the ValueRecord table is // sorted by secondGlyph. Unfortunately, there are fonts // around that have an unsorted ValueRecord table. - LEReferenceTo record(base, success, records); - record.verifyLength(0, recordSize, success); + LEReferenceTo record(records); for(le_int32 r = 0; r < recordCount; r += 1) { - if (LE_FAILURE(success)) return (const PairValueRecord*)NULL; - if (SWAPW(record->secondGlyph) == glyphID) { - return record; - } + if(LE_FAILURE(success)) return LEReferenceTo(); + if (SWAPW(record->secondGlyph) == glyphID) { + return record; + } - record = LEReferenceTo(base, success, ((const char*)record.getAlias())+ recordSize); - record.verifyLength(0, recordSize, success); + record.addOffset(recordSize, success); } #else #error dead code - not updated. @@ -211,7 +213,7 @@ LEReferenceTo PairPositioningFormat1Subtable::findPairValueReco } #endif - return (const PairValueRecord*)NULL; + return LEReferenceTo(); } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h index 755dd819713..6fb46e73732 100644 --- a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h +++ b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h @@ -77,9 +77,8 @@ struct PairPositioningFormat1Subtable : PairPositioningSubtable le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; private: - LEReferenceTo findPairValueRecord(const LETableReference &base, TTGlyphID glyphID, const PairValueRecord *records, + LEReferenceTo findPairValueRecord(TTGlyphID glyphID, LEReferenceTo &records, le_uint16 recordCount, le_uint16 recordSize, LEErrorCode &success) const; - }; LE_VAR_ARRAY(PairPositioningFormat1Subtable, pairSetTableOffsetArray) diff --git a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp index dc16ed288de..bc3200007ad 100644 --- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp +++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp @@ -106,7 +106,8 @@ LEReferenceTo ScriptListTable::findScript(const LETableReference &b } } else { LEReferenceToArrayOf scriptRecordArrayRef(base, success, &scriptRecordArray[0], count); - scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); // TODO + + scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); } if (scriptTableOffset != 0) { diff --git a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp index 3f89c46e4da..57d8ac43ac9 100644 --- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp +++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp @@ -126,13 +126,13 @@ const LETag OpenTypeLayoutEngine::scriptTags[] = { linaScriptTag, /* 'lina' (LINA) */ mandScriptTag, /* 'mand' (MANDAIC) */ mayaScriptTag, /* 'maya' (MAYA) */ - meroScriptTag, /* 'mero' (MERO) */ + meroScriptTag, /* 'mero' (MEROITIC_HIEROGLYPHS) */ nkooScriptTag, /* 'nko ' (NKO) */ orkhScriptTag, /* 'orkh' (OLD_TURKIC) */ permScriptTag, /* 'perm' (PERM) */ phagScriptTag, /* 'phag' (PHAGS_PA) */ phnxScriptTag, /* 'phnx' (PHOENICIAN) */ - plrdScriptTag, /* 'plrd' (PLRD) */ + plrdScriptTag, /* 'plrd' (MIAO/POLLARD) */ roroScriptTag, /* 'roro' (RORO) */ saraScriptTag, /* 'sara' (SARA) */ syreScriptTag, /* 'syre' (SYRE) */ @@ -158,7 +158,7 @@ const LETag OpenTypeLayoutEngine::scriptTags[] = { mteiScriptTag, /* 'mtei' (MEETEI_MAYEK) */ armiScriptTag, /* 'armi' (IMPERIAL_ARAMAIC) */ avstScriptTag, /* 'avst' (AVESTAN) */ - cakmScriptTag, /* 'cakm' (CAKM) */ + cakmScriptTag, /* 'cakm' (CHAKMA) */ koreScriptTag, /* 'kore' (KORE) */ kthiScriptTag, /* 'kthi' (KAITHI) */ maniScriptTag, /* 'mani' (MANI) */ @@ -181,7 +181,7 @@ const LETag OpenTypeLayoutEngine::scriptTags[] = { kpelScriptTag, /* 'kpel' (KPEL) */ lomaScriptTag, /* 'loma' (LOMA) */ mendScriptTag, /* 'mend' (MEND) */ - mercScriptTag, /* 'merc' (MERC) */ + mercScriptTag, /* 'merc' (MEROITIC_CURSIVE) */ narbScriptTag, /* 'narb' (NARB) */ nbatScriptTag, /* 'nbat' (NBAT) */ palmScriptTag, /* 'palm' (PALM) */ diff --git a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h index d70a3e49ee9..7077265817d 100644 --- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h +++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h @@ -140,13 +140,13 @@ const LETag lepcScriptTag = 0x6C657063; /* 'lepc' (LEPCHA) */ const LETag linaScriptTag = 0x6C696E61; /* 'lina' (LINA) */ const LETag mandScriptTag = 0x6D616E64; /* 'mand' (MANDAIC) */ const LETag mayaScriptTag = 0x6D617961; /* 'maya' (MAYA) */ -const LETag meroScriptTag = 0x6D65726F; /* 'mero' (MERO) */ +const LETag meroScriptTag = 0x6D65726F; /* 'mero' (MEROITIC_HIEROGLYPHS) */ const LETag nkooScriptTag = 0x6E6B6F20; /* 'nko ' (NKO) */ const LETag orkhScriptTag = 0x6F726B68; /* 'orkh' (OLD_TURKIC) */ const LETag permScriptTag = 0x7065726D; /* 'perm' (PERM) */ const LETag phagScriptTag = 0x70686167; /* 'phag' (PHAGS_PA) */ const LETag phnxScriptTag = 0x70686E78; /* 'phnx' (PHOENICIAN) */ -const LETag plrdScriptTag = 0x706C7264; /* 'plrd' (PLRD) */ +const LETag plrdScriptTag = 0x706C7264; /* 'plrd' (MIAO) */ const LETag roroScriptTag = 0x726F726F; /* 'roro' (RORO) */ const LETag saraScriptTag = 0x73617261; /* 'sara' (SARA) */ const LETag syreScriptTag = 0x73797265; /* 'syre' (SYRE) */ @@ -172,7 +172,7 @@ const LETag moonScriptTag = 0x6D6F6F6E; /* 'moon' (MOON) */ const LETag mteiScriptTag = 0x6D746569; /* 'mtei' (MEETEI_MAYEK) */ const LETag armiScriptTag = 0x61726D69; /* 'armi' (IMPERIAL_ARAMAIC) */ const LETag avstScriptTag = 0x61767374; /* 'avst' (AVESTAN) */ -const LETag cakmScriptTag = 0x63616B6D; /* 'cakm' (CAKM) */ +const LETag cakmScriptTag = 0x63616B6D; /* 'cakm' (CHAKMA) */ const LETag koreScriptTag = 0x6B6F7265; /* 'kore' (KORE) */ const LETag kthiScriptTag = 0x6B746869; /* 'kthi' (KAITHI) */ const LETag maniScriptTag = 0x6D616E69; /* 'mani' (MANI) */ @@ -195,7 +195,7 @@ const LETag granScriptTag = 0x6772616E; /* 'gran' (GRAN) */ const LETag kpelScriptTag = 0x6B70656C; /* 'kpel' (KPEL) */ const LETag lomaScriptTag = 0x6C6F6D61; /* 'loma' (LOMA) */ const LETag mendScriptTag = 0x6D656E64; /* 'mend' (MEND) */ -const LETag mercScriptTag = 0x6D657263; /* 'merc' (MERC) */ +const LETag mercScriptTag = 0x6D657263; /* 'merc' (MEROITIC_CURSIVE) */ const LETag narbScriptTag = 0x6E617262; /* 'narb' (NARB) */ const LETag nbatScriptTag = 0x6E626174; /* 'nbat' (NBAT) */ const LETag palmScriptTag = 0x70616C6D; /* 'palm' (PALM) */ diff --git a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp index 0a052217979..6526f270ef8 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp @@ -65,17 +65,18 @@ void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode & for (glyph = 0; glyph < glyphCount; glyph += 1) { LEGlyphID thisGlyph = glyphStorage[glyph]; + // lookupSegment already range checked by lookupSegment() function. const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success); - if (lookupSegment != NULL) { + if (lookupSegment != NULL&& LE_SUCCESS(success)) { TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph); + TTGlyphID lastGlyph = SWAPW(lookupSegment->lastGlyph); le_int16 offset = SWAPW(lookupSegment->value); - - if (offset != 0) { - TTGlyphID *glyphArray = (TTGlyphID *) ((char *) subtableHeader.getAliasTODO() + offset); - TTGlyphID newGlyph = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]); - - glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + TTGlyphID thisGlyphId= LE_GET_GLYPH(thisGlyph); + LEReferenceToArrayOf glyphArray(subtableHeader, success, offset, lastGlyph - firstGlyph + 1); + if (offset != 0 && thisGlyphId <= lastGlyph && thisGlyphId >= firstGlyph && LE_SUCCESS(success) ) { + TTGlyphID newGlyph = SWAPW(glyphArray[thisGlyphId]); + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); } } } diff --git a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp index 2d2fe342cfe..fd912b4481b 100644 --- a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp @@ -75,7 +75,7 @@ le_uint32 SinglePositioningFormat1Subtable::process(const LEReferenceTo= 0) { - valueRecord.adjustPosition(SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); + valueRecord.adjustPosition(SWAPW(valueFormat), base, *glyphIterator, fontInstance, success); return 1; } @@ -92,7 +92,7 @@ le_uint32 SinglePositioningFormat2Subtable::process(const LEReferenceTo= 0) { - valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); + valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), base, *glyphIterator, fontInstance, success); return 1; } diff --git a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp index c32377d5071..5b99174b150 100644 --- a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp @@ -76,7 +76,7 @@ le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo= 0) { TTGlyphID substitute = ((TTGlyphID) LE_GET_GLYPH(glyph)) + SWAPW(deltaGlyphID); - if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute))) { + if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { glyphIterator->setCurrGlyphID(substitute); } @@ -97,7 +97,7 @@ le_uint32 SingleSubstitutionFormat2Subtable::process(const LEReferenceTo= 0) { TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]); - if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute))) { + if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { glyphIterator->setCurrGlyphID(substitute); } diff --git a/jdk/src/share/native/sun/font/layout/TibetanReordering.h b/jdk/src/share/native/sun/font/layout/TibetanReordering.h index 26a7ce4bb9a..939649801ab 100644 --- a/jdk/src/share/native/sun/font/layout/TibetanReordering.h +++ b/jdk/src/share/native/sun/font/layout/TibetanReordering.h @@ -39,7 +39,7 @@ */ #ifndef __TIBETANREORDERING_H -#define __TIBETANORDERING_H +#define __TIBETANREORDERING_H /** * \file diff --git a/jdk/src/share/native/sun/font/layout/ValueRecords.cpp b/jdk/src/share/native/sun/font/layout/ValueRecords.cpp index ac153a83935..7863369a0f7 100644 --- a/jdk/src/share/native/sun/font/layout/ValueRecords.cpp +++ b/jdk/src/share/native/sun/font/layout/ValueRecords.cpp @@ -59,8 +59,8 @@ le_int16 ValueRecord::getFieldValue(le_int16 index, ValueFormat valueFormat, Val return SWAPW(value); } -void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, - const LEFontInstance *fontInstance) const +void ValueRecord::adjustPosition(ValueFormat valueFormat, const LETableReference& base, GlyphIterator &glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode &success) const { float xPlacementAdjustment = 0; float yPlacementAdjustment = 0; @@ -118,8 +118,8 @@ void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, Glyp Offset dtOffset = getFieldValue(valueFormat, vrfXPlaDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 xAdj = dt->getAdjustment(xppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 xAdj = dt->getAdjustment(dt, xppem, success); xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj); } @@ -129,8 +129,8 @@ void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, Glyp Offset dtOffset = getFieldValue(valueFormat, vrfYPlaDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 yAdj = dt->getAdjustment(yppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 yAdj = dt->getAdjustment(dt, yppem, success); yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj); } @@ -140,8 +140,8 @@ void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, Glyp Offset dtOffset = getFieldValue(valueFormat, vrfXAdvDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 xAdj = dt->getAdjustment(xppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 xAdj = dt->getAdjustment(dt, xppem, success); xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj); } @@ -151,10 +151,10 @@ void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, Glyp Offset dtOffset = getFieldValue(valueFormat, vrfYAdvDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 yAdj = dt->getAdjustment(yppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 yAdj = dt->getAdjustment(dt, yppem, success); - yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj); + yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj); } } } @@ -163,8 +163,8 @@ void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, Glyp xPlacementAdjustment, yPlacementAdjustment, xAdvanceAdjustment, yAdvanceAdjustment); } -void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, - const LEFontInstance *fontInstance) const +void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const LETableReference& base, GlyphIterator &glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode &success) const { float xPlacementAdjustment = 0; float yPlacementAdjustment = 0; @@ -222,8 +222,8 @@ void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const Offset dtOffset = getFieldValue(index, valueFormat, vrfXPlaDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 xAdj = dt->getAdjustment(xppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 xAdj = dt->getAdjustment(dt, xppem, success); xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj); } @@ -233,8 +233,8 @@ void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const Offset dtOffset = getFieldValue(index, valueFormat, vrfYPlaDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 yAdj = dt->getAdjustment(yppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 yAdj = dt->getAdjustment(dt, yppem, success); yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj); } @@ -244,8 +244,8 @@ void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const Offset dtOffset = getFieldValue(index, valueFormat, vrfXAdvDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 xAdj = dt->getAdjustment(xppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 xAdj = dt->getAdjustment(dt, xppem, success); xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj); } @@ -255,8 +255,8 @@ void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const Offset dtOffset = getFieldValue(index, valueFormat, vrfYAdvDevice); if (dtOffset != 0) { - const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); - le_int16 yAdj = dt->getAdjustment(yppem); + LEReferenceTo dt(base, success, dtOffset); + le_int16 yAdj = dt->getAdjustment(dt, yppem, success); yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj); } diff --git a/jdk/src/share/native/sun/font/layout/ValueRecords.h b/jdk/src/share/native/sun/font/layout/ValueRecords.h index ac89b8acdd5..f6d6ceb57f4 100644 --- a/jdk/src/share/native/sun/font/layout/ValueRecords.h +++ b/jdk/src/share/native/sun/font/layout/ValueRecords.h @@ -53,10 +53,10 @@ struct ValueRecord le_int16 getFieldValue(ValueFormat valueFormat, ValueRecordField field) const; le_int16 getFieldValue(le_int16 index, ValueFormat valueFormat, ValueRecordField field) const; - void adjustPosition(ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, - const LEFontInstance *fontInstance) const; - void adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, - const LEFontInstance *fontInstance) const; + void adjustPosition(ValueFormat valueFormat, const LETableReference &base, GlyphIterator &glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode &success) const; + void adjustPosition(le_int16 index, ValueFormat valueFormat, const LETableReference &base, GlyphIterator &glyphIterator, + const LEFontInstance *fontInstance, LEErrorCode &success) const; static le_int16 getSize(ValueFormat valueFormat); diff --git a/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c b/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c index 183d2f84d01..51ec140cfbe 100644 --- a/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c +++ b/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c @@ -215,6 +215,11 @@ void LinLerp1D(register const cmsUInt16Number Value[], Output[0] = LinearInterp(rest, y0, y1); } +// To prevent out of bounds indexing +cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v) +{ + return v < 0.0f ? 0.0f : (v > 1.0f ? 1.0f : v); +} // Floating-point version of 1D interpolation static @@ -227,13 +232,15 @@ void LinLerp1Dfloat(const cmsFloat32Number Value[], int cell0, cell1; const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table; + val2 = fclamp(Value[0]); + // if last value... - if (Value[0] == 1.0) { + if (val2 == 1.0) { Output[0] = LutTable[p -> Domain[0]]; return; } - val2 = p -> Domain[0] * Value[0]; + val2 *= p -> Domain[0]; cell0 = (int) floor(val2); cell1 = (int) ceil(val2); @@ -292,13 +299,15 @@ void Eval1InputFloat(const cmsFloat32Number Value[], cmsUInt32Number OutChan; const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table; + val2 = fclamp(Value[0]); + // if last value... - if (Value[0] == 1.0) { + if (val2 == 1.0) { Output[0] = LutTable[p -> Domain[0]]; return; } - val2 = p -> Domain[0] * Value[0]; + val2 *= p -> Domain[0]; cell0 = (int) floor(val2); cell1 = (int) ceil(val2); @@ -339,8 +348,8 @@ void BilinearInterpFloat(const cmsFloat32Number Input[], dxy; TotalOut = p -> nOutputs; - px = Input[0] * p->Domain[0]; - py = Input[1] * p->Domain[1]; + px = fclamp(Input[0]) * p->Domain[0]; + py = fclamp(Input[1]) * p->Domain[1]; x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0; y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0; @@ -454,20 +463,9 @@ void TrilinearInterpFloat(const cmsFloat32Number Input[], TotalOut = p -> nOutputs; // We need some clipping here - px = Input[0]; - py = Input[1]; - pz = Input[2]; - - if (px < 0) px = 0; - if (px > 1) px = 1; - if (py < 0) py = 0; - if (py > 1) py = 1; - if (pz < 0) pz = 0; - if (pz > 1) pz = 1; - - px *= p->Domain[0]; - py *= p->Domain[1]; - pz *= p->Domain[2]; + px = fclamp(Input[0]) * p->Domain[0]; + py = fclamp(Input[1]) * p->Domain[1]; + pz = fclamp(Input[2]) * p->Domain[2]; x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0; y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0; @@ -609,20 +607,9 @@ void TetrahedralInterpFloat(const cmsFloat32Number Input[], TotalOut = p -> nOutputs; // We need some clipping here - px = Input[0]; - py = Input[1]; - pz = Input[2]; - - if (px < 0) px = 0; - if (px > 1) px = 1; - if (py < 0) py = 0; - if (py > 1) py = 1; - if (pz < 0) pz = 0; - if (pz > 1) pz = 1; - - px *= p->Domain[0]; - py *= p->Domain[1]; - pz *= p->Domain[2]; + px = fclamp(Input[0]) * p->Domain[0]; + py = fclamp(Input[1]) * p->Domain[1]; + pz = fclamp(Input[2]) * p->Domain[2]; x0 = (int) _cmsQuickFloor(px); rx = (px - (cmsFloat32Number) x0); y0 = (int) _cmsQuickFloor(py); ry = (py - (cmsFloat32Number) y0); @@ -1039,8 +1026,7 @@ void Eval4InputsFloat(const cmsFloat32Number Input[], cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; cmsInterpParams p1; - - pk = Input[0] * p->Domain[0]; + pk = fclamp(Input[0]) * p->Domain[0]; k0 = _cmsQuickFloor(pk); rest = pk - (cmsFloat32Number) k0; @@ -1127,7 +1113,7 @@ void Eval5InputsFloat(const cmsFloat32Number Input[], cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; cmsInterpParams p1; - pk = Input[0] * p->Domain[0]; + pk = fclamp(Input[0]) * p->Domain[0]; k0 = _cmsQuickFloor(pk); rest = pk - (cmsFloat32Number) k0; @@ -1214,7 +1200,7 @@ void Eval6InputsFloat(const cmsFloat32Number Input[], cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; cmsInterpParams p1; - pk = Input[0] * p->Domain[0]; + pk = fclamp(Input[0]) * p->Domain[0]; k0 = _cmsQuickFloor(pk); rest = pk - (cmsFloat32Number) k0; @@ -1299,7 +1285,7 @@ void Eval7InputsFloat(const cmsFloat32Number Input[], cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; cmsInterpParams p1; - pk = Input[0] * p->Domain[0]; + pk = fclamp(Input[0]) * p->Domain[0]; k0 = _cmsQuickFloor(pk); rest = pk - (cmsFloat32Number) k0; @@ -1384,7 +1370,7 @@ void Eval8InputsFloat(const cmsFloat32Number Input[], cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; cmsInterpParams p1; - pk = Input[0] * p->Domain[0]; + pk = fclamp(Input[0]) * p->Domain[0]; k0 = _cmsQuickFloor(pk); rest = pk - (cmsFloat32Number) k0; diff --git a/jdk/src/share/native/sun/management/Flag.c b/jdk/src/share/native/sun/management/Flag.c index cda64d51f8f..82aaaa77578 100644 --- a/jdk/src/share/native/sun/management/Flag.c +++ b/jdk/src/share/native/sun/management/Flag.c @@ -36,6 +36,7 @@ static jobject mgmt_origin = NULL; static jobject envvar_origin = NULL; static jobject config_file_origin = NULL; static jobject ergo_origin = NULL; +static jobject attach_origin = NULL; static jobject other_origin = NULL; JNIEXPORT jint JNICALL @@ -74,6 +75,7 @@ Java_sun_management_Flag_initialize envvar_origin = find_origin_constant(env, "ENVIRON_VAR"); config_file_origin = find_origin_constant(env, "CONFIG_FILE"); ergo_origin = find_origin_constant(env, "ERGONOMIC"); + attach_origin = find_origin_constant(env, "ATTACH_ON_DEMAND"); other_origin = find_origin_constant(env, "OTHER"); } @@ -154,6 +156,9 @@ Java_sun_management_Flag_getFlags case JMM_VMGLOBAL_ORIGIN_ERGONOMIC: origin = ergo_origin; break; + case JMM_VMGLOBAL_ORIGIN_ATTACH_ON_DEMAND: + origin = attach_origin; + break; case JMM_VMGLOBAL_ORIGIN_OTHER: origin = other_origin; break; diff --git a/jdk/src/share/native/sun/misc/MessageUtils.c b/jdk/src/share/native/sun/misc/MessageUtils.c index b1500e35305..49315dc894d 100644 --- a/jdk/src/share/native/sun/misc/MessageUtils.c +++ b/jdk/src/share/native/sun/misc/MessageUtils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, 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 @@ #include #include +#include #include #include #include @@ -35,7 +36,7 @@ static void printToFile(JNIEnv *env, jstring s, FILE *file) { char *sConverted; - int length; + int length = 0; int i; const jchar *sAsArray; @@ -45,8 +46,20 @@ printToFile(JNIEnv *env, jstring s, FILE *file) } sAsArray = (*env)->GetStringChars(env, s, NULL); + if (!sAsArray) + return; length = (*env)->GetStringLength(env, s); + if (length == 0) { + (*env)->ReleaseStringChars(env, s, sAsArray); + return; + } sConverted = (char *) malloc(length + 1); + if (!sConverted) { + (*env)->ReleaseStringChars(env, s, sAsArray); + JNU_ThrowOutOfMemoryError(env, NULL); + return; + } + for(i = 0; i < length; i++) { sConverted[i] = (0x7f & sAsArray[i]); } diff --git a/jdk/src/share/native/sun/misc/VM.c b/jdk/src/share/native/sun/misc/VM.c index f7b752f3f2d..1968a06b01b 100644 --- a/jdk/src/share/native/sun/misc/VM.c +++ b/jdk/src/share/native/sun/misc/VM.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2014, 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,84 +33,6 @@ #include "sun_misc_VM.h" -typedef jintArray (JNICALL *GET_THREAD_STATE_VALUES_FN)(JNIEnv *, jint); -typedef jobjectArray (JNICALL *GET_THREAD_STATE_NAMES_FN)(JNIEnv *, jint, jintArray); - -static GET_THREAD_STATE_VALUES_FN GetThreadStateValues_fp = NULL; -static GET_THREAD_STATE_NAMES_FN GetThreadStateNames_fp = NULL; - -static void get_thread_state_info(JNIEnv *env, jint state, - jobjectArray stateValues, - jobjectArray stateNames) { - char errmsg[128]; - jintArray values; - jobjectArray names; - - values = (*GetThreadStateValues_fp)(env, state); - if (values == NULL) { - sprintf(errmsg, "Mismatched VM version: Thread state (%d) " - "not supported", state); - JNU_ThrowInternalError(env, errmsg); - return; - } - /* state is also used as the index in the array */ - (*env)->SetObjectArrayElement(env, stateValues, state, values); - - names = (*GetThreadStateNames_fp)(env, state, values); - if (names == NULL) { - sprintf(errmsg, "Mismatched VM version: Thread state (%d) " - "not supported", state); - JNU_ThrowInternalError(env, errmsg); - return; - } - (*env)->SetObjectArrayElement(env, stateNames, state, names); -} - -JNIEXPORT void JNICALL -Java_sun_misc_VM_getThreadStateValues(JNIEnv *env, jclass cls, - jobjectArray values, - jobjectArray names) -{ - char errmsg[128]; - - // check if the number of Thread.State enum constants - // matches the number of states defined in jvm.h - jsize len1 = (*env)->GetArrayLength(env, values); - jsize len2 = (*env)->GetArrayLength(env, names); - if (len1 != JAVA_THREAD_STATE_COUNT || len2 != JAVA_THREAD_STATE_COUNT) { - sprintf(errmsg, "Mismatched VM version: JAVA_THREAD_STATE_COUNT = %d " - " but JDK expects %d / %d", - JAVA_THREAD_STATE_COUNT, len1, len2); - JNU_ThrowInternalError(env, errmsg); - return; - } - - if (GetThreadStateValues_fp == NULL) { - GetThreadStateValues_fp = (GET_THREAD_STATE_VALUES_FN) - JDK_FindJvmEntry("JVM_GetThreadStateValues"); - if (GetThreadStateValues_fp == NULL) { - JNU_ThrowInternalError(env, - "Mismatched VM version: JVM_GetThreadStateValues not found"); - return; - } - - GetThreadStateNames_fp = (GET_THREAD_STATE_NAMES_FN) - JDK_FindJvmEntry("JVM_GetThreadStateNames"); - if (GetThreadStateNames_fp == NULL) { - JNU_ThrowInternalError(env, - "Mismatched VM version: JVM_GetThreadStateNames not found"); - return ; - } - } - - get_thread_state_info(env, JAVA_THREAD_STATE_NEW, values, names); - get_thread_state_info(env, JAVA_THREAD_STATE_RUNNABLE, values, names); - get_thread_state_info(env, JAVA_THREAD_STATE_BLOCKED, values, names); - get_thread_state_info(env, JAVA_THREAD_STATE_WAITING, values, names); - get_thread_state_info(env, JAVA_THREAD_STATE_TIMED_WAITING, values, names); - get_thread_state_info(env, JAVA_THREAD_STATE_TERMINATED, values, names); -} - JNIEXPORT jobject JNICALL Java_sun_misc_VM_latestUserDefinedLoader(JNIEnv *env, jclass cls) { return JVM_LatestUserDefinedLoader(env); diff --git a/jdk/src/share/native/sun/misc/Version.c b/jdk/src/share/native/sun/misc/Version.c index 7edba49ff22..d37010e15d5 100644 --- a/jdk/src/share/native/sun/misc/Version.c +++ b/jdk/src/share/native/sun/misc/Version.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, 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,44 +34,13 @@ char jvm_special_version = '\0'; char jdk_special_version = '\0'; static void setStaticIntField(JNIEnv* env, jclass cls, const char* name, jint value) { - char errmsg[100]; jfieldID fid; fid = (*env)->GetStaticFieldID(env, cls, name, "I"); if (fid != 0) { (*env)->SetStaticIntField(env, cls, fid, value); - } else { - sprintf(errmsg, "Static int field %s not found", name); - JNU_ThrowInternalError(env, errmsg); } } -static void setStaticBooleanField(JNIEnv* env, jclass cls, const char* name, jboolean value) -{ - char errmsg[100]; - jfieldID fid; - fid = (*env)->GetStaticFieldID(env, cls, name, "Z"); - if (fid != 0) { - (*env)->SetStaticBooleanField(env, cls, fid, value); - } else { - sprintf(errmsg, "Static boolean field %s not found", name); - JNU_ThrowInternalError(env, errmsg); - } -} - -static void setStaticStringField(JNIEnv* env, jclass cls, const char* name, jstring value) -{ - char errmsg[100]; - jfieldID fid; - fid = (*env)->GetStaticFieldID(env, cls, name, "Ljava/lang/String"); - if (fid != 0) { - (*env)->SetStaticObjectField(env, cls, fid, value); - } else { - sprintf(errmsg, "Static String field %s not found", name); - JNU_ThrowInternalError(env, errmsg); - } -} - - typedef void (JNICALL *GetJvmVersionInfo_fp)(JNIEnv*, jvm_version_info*, size_t); JNIEXPORT jboolean JNICALL @@ -82,6 +51,7 @@ Java_sun_misc_Version_getJvmVersionInfo(JNIEnv *env, jclass cls) if (!JDK_InitJvmHandle()) { JNU_ThrowInternalError(env, "Handle for JVM not found for symbol lookup"); + return JNI_FALSE; } func_p = (GetJvmVersionInfo_fp) JDK_FindJvmEntry("JVM_GetVersionInfo"); if (func_p == NULL) { @@ -90,10 +60,15 @@ Java_sun_misc_Version_getJvmVersionInfo(JNIEnv *env, jclass cls) (*func_p)(env, &info, sizeof(info)); setStaticIntField(env, cls, "jvm_major_version", JVM_VERSION_MAJOR(info.jvm_version)); + CHECK_EXCEPTION_RETURN(env, JNI_FALSE); setStaticIntField(env, cls, "jvm_minor_version", JVM_VERSION_MINOR(info.jvm_version)); + CHECK_EXCEPTION_RETURN(env, JNI_FALSE); setStaticIntField(env, cls, "jvm_micro_version", JVM_VERSION_MICRO(info.jvm_version)); + CHECK_EXCEPTION_RETURN(env, JNI_FALSE); setStaticIntField(env, cls, "jvm_build_number", JVM_VERSION_BUILD(info.jvm_version)); + CHECK_EXCEPTION_RETURN(env, JNI_FALSE); setStaticIntField(env, cls, "jvm_update_version", info.update_version); + CHECK_EXCEPTION_RETURN(env, JNI_FALSE); jvm_special_version = info.special_update_version; return JNI_TRUE; @@ -116,10 +91,15 @@ Java_sun_misc_Version_getJdkVersionInfo(JNIEnv *env, jclass cls) JDK_GetVersionInfo0(&info, sizeof(info)); setStaticIntField(env, cls, "jdk_major_version", JDK_VERSION_MAJOR(info.jdk_version)); + CHECK_EXCEPTION(env); setStaticIntField(env, cls, "jdk_minor_version", JDK_VERSION_MINOR(info.jdk_version)); + CHECK_EXCEPTION(env); setStaticIntField(env, cls, "jdk_micro_version", JDK_VERSION_MICRO(info.jdk_version)); + CHECK_EXCEPTION(env); setStaticIntField(env, cls, "jdk_build_number", JDK_VERSION_BUILD(info.jdk_version)); + CHECK_EXCEPTION(env); setStaticIntField(env, cls, "jdk_update_version", info.update_version); + CHECK_EXCEPTION(env); jdk_special_version = info.special_update_version; } diff --git a/jdk/src/solaris/classes/sun/net/PortConfig.java b/jdk/src/solaris/classes/sun/net/PortConfig.java new file mode 100644 index 00000000000..0f4ca744257 --- /dev/null +++ b/jdk/src/solaris/classes/sun/net/PortConfig.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.net; + +import java.security.AccessController; + +/** + * Determines the ephemeral port range in use on this system. + * If this cannot be determined, then the default settings + * of the OS are returned. + */ + +public final class PortConfig { + + private static int defaultUpper, defaultLower; + private final static int upper, lower; + + private PortConfig() {} + + static { + AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + String os = System.getProperty("os.name"); + if (os.startsWith("Linux")) { + defaultLower = 32768; + defaultUpper = 61000; + } else if (os.startsWith("SunOS")) { + defaultLower = 32768; + defaultUpper = 65535; + } else if (os.contains("OS X")) { + defaultLower = 49152; + defaultUpper = 65535; + } else { + throw new InternalError( + "sun.net.PortConfig: unknown OS"); + } + return null; + } + }); + + int v = getLower0(); + if (v == -1) { + v = defaultLower; + } + lower = v; + + v = getUpper0(); + if (v == -1) { + v = defaultUpper; + } + upper = v; + } + + static native int getLower0(); + static native int getUpper0(); + + public static int getLower() { + return lower; + } + + public static int getUpper() { + return upper; + } +} diff --git a/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java index 73c96cfc22b..3b375686335 100644 --- a/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java +++ b/jdk/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java @@ -187,6 +187,10 @@ public class SctpChannelImpl extends SctpChannel SctpNet.throwAlreadyBoundException(); InetSocketAddress isa = (local == null) ? new InetSocketAddress(0) : Net.checkAddress(local); + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkListen(isa.getPort()); + } Net.bind(fd, isa.getAddress(), isa.getPort()); InetSocketAddress boundIsa = Net.localAddress(fd); port = boundIsa.getPort(); diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java b/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java index bd8253e94e5..d14569e8808 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java @@ -375,11 +375,12 @@ public abstract class UnixFileSystemProvider UnixPath dir = UnixPath.toUnixPath(obj); dir.checkWrite(); - int mode = UnixFileModeAttribute - .toUnixMode(UnixFileModeAttribute.ALL_PERMISSIONS, attrs); + int mode = UnixFileModeAttribute.toUnixMode(UnixFileModeAttribute.ALL_PERMISSIONS, attrs); try { mkdir(dir, mode); } catch (UnixException x) { + if (x.errno() == EISDIR) + throw new FileAlreadyExistsException(dir.toString()); x.rethrowAsIOException(dir); } } diff --git a/jdk/src/solaris/native/java/net/net_util_md.c b/jdk/src/solaris/native/java/net/net_util_md.c index d7ebbd5a7c9..2ea6fd11932 100644 --- a/jdk/src/solaris/native/java/net/net_util_md.c +++ b/jdk/src/solaris/native/java/net/net_util_md.c @@ -138,8 +138,7 @@ static int useExclBind = 0; * of the parameter is assumed to be an 'int'. If the parameter * cannot be obtained return -1 */ -static int -getParam(char *driver, char *param) +int net_getParam(char *driver, char *param) { struct strioctl stri; char buf [64]; @@ -166,7 +165,7 @@ getParam(char *driver, char *param) /* * Iterative way to find the max value that SO_SNDBUF or SO_RCVBUF - * for Solaris versions that do not support the ioctl() in getParam(). + * for Solaris versions that do not support the ioctl() in net_getParam(). * Ugly, but only called once (for each sotype). * * As an optimization, we make a guess using the default values for Solaris @@ -1359,7 +1358,7 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg, * If that fails, we use the search algorithm in findMaxBuf() */ if (!init_tcp_max_buf && sotype == SOCK_STREAM) { - tcp_max_buf = getParam("/dev/tcp", "tcp_max_buf"); + tcp_max_buf = net_getParam("/dev/tcp", "tcp_max_buf"); if (tcp_max_buf == -1) { tcp_max_buf = findMaxBuf(fd, opt, SOCK_STREAM); if (tcp_max_buf == -1) { @@ -1368,7 +1367,7 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg, } init_tcp_max_buf = 1; } else if (!init_udp_max_buf && sotype == SOCK_DGRAM) { - udp_max_buf = getParam("/dev/udp", "udp_max_buf"); + udp_max_buf = net_getParam("/dev/udp", "udp_max_buf"); if (udp_max_buf == -1) { udp_max_buf = findMaxBuf(fd, opt, SOCK_DGRAM); if (udp_max_buf == -1) { diff --git a/jdk/src/solaris/native/java/net/net_util_md.h b/jdk/src/solaris/native/java/net/net_util_md.h index 4470a49b1e2..f7bec897c7d 100644 --- a/jdk/src/solaris/native/java/net/net_util_md.h +++ b/jdk/src/solaris/native/java/net/net_util_md.h @@ -81,6 +81,9 @@ extern int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout); int getDefaultIPv6Interface(struct in6_addr *target_addr); #endif +#ifdef __solaris__ +extern int net_getParam(char *driver, char *param); +#endif /* needed from libsocket on Solaris 8 */ diff --git a/jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c b/jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c index e43ebcaf236..930f7ebbeb9 100644 --- a/jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c +++ b/jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c @@ -577,8 +577,8 @@ SplashEventLoop(Splash * splash) { SplashUnlock(splash); rc = poll(pfd, 2, timeout); SplashLock(splash); - if (splash->isVisible>0 && SplashTime() >= splash->time + - splash->frames[splash->currentFrame].delay) { + if (splash->isVisible > 0 && splash->currentFrame >= 0 && + SplashTime() >= splash->time + splash->frames[splash->currentFrame].delay) { SplashNextFrame(splash); SplashUpdateShape(splash); SplashRedrawWindow(splash); diff --git a/jdk/src/solaris/native/sun/net/portconfig.c b/jdk/src/solaris/native/sun/net/portconfig.c new file mode 100644 index 00000000000..56730f0f40a --- /dev/null +++ b/jdk/src/solaris/native/sun/net/portconfig.c @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include +#include +#include +#include + +#if defined(_ALLBSD_SOURCE) +#include +#endif + +#include "jni.h" +#include "net_util.h" +#include "sun_net_PortConfig.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct portrange { + int lower; + int higher; +}; + +static int getPortRange(struct portrange *range) +{ +#ifdef __linux__ + { + FILE *f; + int ret; + + f = fopen("/proc/sys/net/ipv4/ip_local_port_range", "r"); + if (f != NULL) { + ret = fscanf(f, "%d %d", &range->lower, &range->higher); + fclose(f); + return ret == 2 ? 0 : -1; + } + return -1; + } + +#elif defined(__solaris__) + { + range->higher = net_getParam("/dev/tcp", "tcp_largest_anon_port"); + range->lower = net_getParam("/dev/tcp", "tcp_smallest_anon_port"); + return 0; + } +#elif defined(_ALLBSD_SOURCE) + { + int ret; + size_t size = sizeof(range->lower); + ret = sysctlbyname( + "net.inet.ip.portrange.first", &range->lower, &size, 0, 0 + ); + if (ret == -1) { + return -1; + } + size = sizeof(range->higher); + ret = sysctlbyname( + "net.inet.ip.portrange.last", &range->higher, &size, 0, 0 + ); + return ret; + } +#else + return -1; +#endif +} + +/* + * Class: sun_net_PortConfig + * Method: getLower0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getLower0 + (JNIEnv *env, jclass clazz) +{ + struct portrange range; + if (getPortRange(&range) < 0) { + return -1; + } + return range.lower; +} + +/* + * Class: sun_net_PortConfig + * Method: getUpper0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getUpper0 + (JNIEnv *env, jclass clazz) +{ + struct portrange range; + if (getPortRange(&range) < 0) { + return -1; + } + return range.higher; +} + +#ifdef __cplusplus +} +#endif diff --git a/jdk/src/windows/bin/java_md.c b/jdk/src/windows/bin/java_md.c index d08f2bf9bbe..c6a525f101d 100644 --- a/jdk/src/windows/bin/java_md.c +++ b/jdk/src/windows/bin/java_md.c @@ -1475,7 +1475,7 @@ CreateApplicationArgs(JNIEnv *env, char **strv, int argc) // expand the arguments that require expansion, the java method will strip // out the indicator character. - inArray = NewPlatformStringArray(env, nargv, argc); + NULL_CHECK0(inArray = NewPlatformStringArray(env, nargv, argc)); outArray = (*env)->CallStaticObjectMethod(env, cls, mid, inArray); for (i = 0; i < argc; i++) { JLI_MemFree(nargv[i]); diff --git a/jdk/src/windows/classes/sun/net/PortConfig.java b/jdk/src/windows/classes/sun/net/PortConfig.java new file mode 100644 index 00000000000..e2ba12fee85 --- /dev/null +++ b/jdk/src/windows/classes/sun/net/PortConfig.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.net; + +import java.security.AccessController; + +/** + * Determines the ephemeral port range in use on this system. + * If this cannot be determined, then the default settings + * of the OS are returned. + */ + +public final class PortConfig { + + private static int defaultUpper, defaultLower; + private final static int upper, lower; + + static { + AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Void run() { + System.loadLibrary("net"); + return null; + } + }); + + int v = getLower0(); + if (v == -1) { + v = defaultLower; + } + lower = v; + + v = getUpper0(); + if (v == -1) { + v = defaultUpper; + } + upper = v; + } + + static native int getLower0(); + static native int getUpper0(); + + public static int getLower() { + return lower; + } + + public static int getUpper() { + return upper; + } +} diff --git a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java index 124205a65f7..8e193a888b4 100644 --- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java +++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java @@ -31,6 +31,9 @@ import java.nio.BufferOverflowException; import java.net.*; import java.util.concurrent.*; import java.io.IOException; +import java.security.AccessController; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; import sun.misc.Unsafe; /** @@ -300,6 +303,19 @@ class WindowsAsynchronousSocketChannelImpl } } + private void doPrivilegedBind(final SocketAddress sa) throws IOException { + try { + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Void run() throws IOException { + bind(sa); + return null; + } + }); + } catch (PrivilegedActionException e) { + throw (IOException) e.getException(); + } + } + @Override Future implConnect(SocketAddress remote, A attachment, @@ -330,7 +346,12 @@ class WindowsAsynchronousSocketChannelImpl throw new ConnectionPendingException(); if (localAddress == null) { try { - bind(new InetSocketAddress(0)); + SocketAddress any = new InetSocketAddress(0); + if (sm == null) { + bind(any); + } else { + doPrivilegedBind(any); + } } catch (IOException x) { bindException = x; } diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java b/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java index 1f2f22e326d..2e6484b7ba7 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java @@ -493,6 +493,14 @@ public class WindowsFileSystemProvider try { CreateDirectory(dir.getPathForWin32Calls(), sd.address()); } catch (WindowsException x) { + // convert ERROR_ACCESS_DENIED to FileAlreadyExistsException if we can + // verify that the directory exists + if (x.lastError() == ERROR_ACCESS_DENIED) { + try { + if (WindowsFileAttributes.get(dir, false).isDirectory()) + throw new FileAlreadyExistsException(dir.toString()); + } catch (WindowsException ignore) { } + } x.rethrowAsIOException(dir); } finally { sd.release(); diff --git a/jdk/src/windows/native/sun/net/portconfig.c b/jdk/src/windows/native/sun/net/portconfig.c new file mode 100644 index 00000000000..f786ef7b511 --- /dev/null +++ b/jdk/src/windows/native/sun/net/portconfig.c @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include +#include "jni.h" +#include "net_util.h" +#include "sun_net_PortConfig.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct portrange { + int lower; + int higher; +}; + +static int getPortRange(struct portrange *range) +{ + OSVERSIONINFO ver; + ver.dwOSVersionInfoSize = sizeof(ver); + GetVersionEx(&ver); + + /* Check for major version 5 or less = Windows XP/2003 or older */ + if (ver.dwMajorVersion <= 5) { + LONG ret; + HKEY hKey; + range->lower = 1024; + range->higher = 4999; + + /* check registry to see if upper limit was raised */ + ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, + "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", + 0, KEY_READ, (PHKEY)&hKey + ); + if (ret == ERROR_SUCCESS) { + DWORD maxuserport; + ULONG ulType; + DWORD dwLen = sizeof(maxuserport); + ret = RegQueryValueEx(hKey, "MaxUserPort", NULL, &ulType, + (LPBYTE)&maxuserport, &dwLen); + RegCloseKey(hKey); + if (ret == ERROR_SUCCESS) { + range->higher = maxuserport; + } + } + } else { + /* There doesn't seem to be an API to access this. "MaxUserPort" + * is affected, but is not sufficient to determine. + * so we just use the defaults, which are less likely to change + */ + range->lower = 49152; + range->higher = 65535; + } + return 0; +} + +/* + * Class: sun_net_PortConfig + * Method: getLower0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getLower0 + (JNIEnv *env, jclass clazz) +{ + struct portrange range; + getPortRange(&range); + return range.lower; +} + +/* + * Class: sun_net_PortConfig + * Method: getUpper0 + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getUpper0 + (JNIEnv *env, jclass clazz) +{ + struct portrange range; + getPortRange(&range); + return range.higher; +} +#ifdef __cplusplus +} +#endif diff --git a/jdk/src/windows/native/sun/security/krb5/NativeCreds.c b/jdk/src/windows/native/sun/security/krb5/NativeCreds.c index b2537be03e8..9f0db518c82 100644 --- a/jdk/src/windows/native/sun/security/krb5/NativeCreds.c +++ b/jdk/src/windows/native/sun/security/krb5/NativeCreds.c @@ -388,7 +388,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ jobject ticketFlags, startTime, endTime, krbCreds = NULL; jobject authTime, renewTillTime, hostAddresses = NULL; KERB_EXTERNAL_TICKET *msticket; - int found_in_cache = 0; + int found = 0; FILETIME Now, EndTime, LocalEndTime; int i, netypes; @@ -476,7 +476,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ if (CompareFileTime(&Now, &LocalEndTime) < 0) { for (i=0; iSessionKey.KeyType) { - found_in_cache = 1; + found = 1; if (native_debug) { printf("LSA: Valid etype found: %d\n", etypes[i]); } @@ -486,7 +486,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ } } - if (!found_in_cache) { + if (!found) { if (native_debug) { printf("LSA: MS TGT in cache is invalid/not supported; request new ticket\n"); } @@ -529,6 +529,14 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ // got the native MS Kerberos TGT msticket = &(pTicketResponse->Ticket); + + if (msticket->SessionKey.KeyType != etypes[i]) { + if (native_debug) { + printf("LSA: Response etype is %d for %d. Retry.\n", msticket->SessionKey.KeyType, etypes[i]); + } + continue; + } + found = 1; break; } } @@ -583,6 +591,10 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ } KERB_CRYPTO_KEY, *PKERB_CRYPTO_KEY; */ + if (!found) { + break; + } + // Build a com.sun.security.krb5.Ticket ticket = BuildTicket(env, msticket->EncodedTicket, msticket->EncodedTicketSize); diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index bbd135c4020..2a90ff98b67 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -123,11 +123,6 @@ # 8029415 java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java generic-all -# 8030656 -java/lang/reflect/Parameter/GetAnnotatedTypeTest.java generic-all -java/lang/reflect/Parameter/WithParameters.java generic-all -java/lang/reflect/Parameter/BadClassFiles.java generic-all - ############################################################################ # jdk_management @@ -150,12 +145,6 @@ sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh windows-all # 6988950 demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java generic-all -# 7027502 -demo/jvmti/hprof/MonitorTest.java generic-all - -# 8027973 -javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java windows-all - ############################################################################ # jdk_net @@ -283,3 +272,10 @@ tools/launcher/FXLauncherTest.java linux-all # jdk_util ############################################################################ + +# svc_tools + +# 8031482 +sun/tools/jcmd/TestJcmdSanity.java windows-all + +############################################################################ diff --git a/jdk/test/TEST.groups b/jdk/test/TEST.groups index 6e6e2da828b..b624ca9b6eb 100644 --- a/jdk/test/TEST.groups +++ b/jdk/test/TEST.groups @@ -379,7 +379,6 @@ needs_jre = \ java/util/ResourceBundle/Control/Bug6530694.java \ java/text/Bidi/BidiConformance.java \ java/text/Bidi/BidiEmbeddingTest.java \ - java/text/Bidi/Bug6665028.java \ java/text/Bidi/Bug7042148.java \ java/text/Bidi/Bug7051769.java \ javax/crypto/Cipher/CipherStreamClose.java \ diff --git a/jdk/test/com/sun/jdi/BadHandshakeTest.java b/jdk/test/com/sun/jdi/BadHandshakeTest.java index 8e35442ebb3..35afb33567a 100644 --- a/jdk/test/com/sun/jdi/BadHandshakeTest.java +++ b/jdk/test/com/sun/jdi/BadHandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, 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 @@ -85,7 +85,7 @@ public class BadHandshakeTest { success.set(line.contains("Listening for transport dt_socket at address:")); return true; }, - 1500, + Integer.MAX_VALUE, TimeUnit.MILLISECONDS ); diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java new file mode 100644 index 00000000000..8c28db26cf9 --- /dev/null +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8028994 + * @author Staffan Larsen + * @library /lib/testlibrary + * @run main CheckOrigin + */ + +import com.sun.management.HotSpotDiagnosticMXBean; +import com.sun.management.VMOption; +import com.sun.management.VMOption.Origin; +import com.sun.tools.attach.VirtualMachine; +import java.io.File; +import java.io.FileWriter; +import java.io.InputStream; +import java.io.PrintWriter; +import java.lang.management.ManagementFactory; +import java.util.Map; +import jdk.testlibrary.ProcessTools; +import sun.tools.attach.HotSpotVirtualMachine; + +public class CheckOrigin { + + private static HotSpotDiagnosticMXBean mbean; + + public static void main(String... args) throws Exception { + if (args.length == 0) { + // start a process that has options set in a number of different ways + + File flagsFile = File.createTempFile("CheckOriginFlags", null); + try (PrintWriter pw = + new PrintWriter(new FileWriter(flagsFile))) { + pw.println("+PrintSafepointStatistics"); + } + + ProcessBuilder pb = ProcessTools. + createJavaProcessBuilder( + "-XX:+PrintGCDetails", + "-XX:Flags=" + flagsFile.getAbsolutePath(), + "-cp", System.getProperty("test.class.path") + File.pathSeparator + getToolsJarPath(), + "CheckOrigin", + "-runtests"); + + Map env = pb.environment(); + env.put("_JAVA_OPTIONS", "-XX:+PrintOopAddress"); + + pb.redirectOutput(ProcessBuilder.Redirect.INHERIT); + pb.redirectError(ProcessBuilder.Redirect.INHERIT); + Process p = pb.start(); + int exit = p.waitFor(); + System.out.println("sub process exit == " + exit); + if (exit != 0) { + throw new Exception("Unexpected exit code from subprocess == " + exit); + } + } else { + mbean = + ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class); + + // set a few more options + mbean.setVMOption("HeapDumpOnOutOfMemoryError", "true"); + setOptionUsingAttach("HeapDumpPath", "/a/sample/path"); + + // check the origin field for all the options we set + checkOrigin("ManagementServer", Origin.DEFAULT); + checkOrigin("PrintGCDetails", Origin.VM_CREATION); + checkOrigin("PrintOopAddress", Origin.ENVIRON_VAR); + checkOrigin("PrintSafepointStatistics", Origin.CONFIG_FILE); + checkOrigin("HeapDumpOnOutOfMemoryError", Origin.MANAGEMENT); + checkOrigin("NewSize", Origin.ERGONOMIC); + checkOrigin("HeapDumpPath", Origin.ATTACH_ON_DEMAND); + } + } + + private static void checkOrigin(String option, Origin origin) throws Exception + { + Origin o = mbean.getVMOption(option).getOrigin(); + if (!o.equals(origin)) { + throw new Exception("Option '" + option + "' should have origin '" + origin + "' but had '" + o + "'"); + } + System.out.println("Option '" + option + "' verified origin = '" + origin + "'"); + } + + // use attach to set a manageable vm option + private static void setOptionUsingAttach(String option, String value) throws Exception { + HotSpotVirtualMachine vm = (HotSpotVirtualMachine) VirtualMachine.attach(ProcessTools.getProcessId()+""); + InputStream in = vm.setFlag(option, value); + System.out.println("Result from setting '" + option + "' to '" + value + "' using attach:"); + drain(vm, in); + System.out.println("-- end -- "); + } + + // Read the stream from the target VM until EOF, print to output, then detach + private static void drain(VirtualMachine vm, InputStream in) throws Exception { + byte b[] = new byte[256]; + int n; + do { + n = in.read(b); + if (n > 0) { + String s = new String(b, 0, n, "UTF-8"); + System.out.print(s); + } + } while (n > 0); + in.close(); + vm.detach(); + } + + private static String getToolsJarPath() { + return System.getProperty("java.home") + + "/../lib/tools.jar".replace("/", File.separator); + } +} diff --git a/jdk/test/demo/jvmti/Context.java b/jdk/test/demo/jvmti/Context.java index 611d80588bb..2bb822ffbaa 100644 --- a/jdk/test/demo/jvmti/Context.java +++ b/jdk/test/demo/jvmti/Context.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2014, 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 @@ -167,11 +167,16 @@ public final class Context extends Thread { turn.notifyAll(); } /* If we've had all our turns, break out of this loop */ - if ( thread_turns == turns_taken ) { + if (thread_turns == turns_taken) { + System.out.println("Loop end: thread got " + turns_taken + + " turns, expected " + thread_turns); break; } } - } catch (InterruptedException intEx) { /* skip */ } + } catch (InterruptedException intEx) { + System.out.println("Got an InterruptedException:" + intEx); + /* skip */ + } /* Make sure we got all our turns */ if ( thread_turns != turns_taken ) { diff --git a/jdk/test/demo/jvmti/hprof/StackMapTableTest.java b/jdk/test/demo/jvmti/hprof/StackMapTableTest.java index eb3fae1300b..758fdaec57e 100644 --- a/jdk/test/demo/jvmti/hprof/StackMapTableTest.java +++ b/jdk/test/demo/jvmti/hprof/StackMapTableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, 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,7 @@ * @summary Test jvmti hprof and java_crw_demo with StackMapTable attributes * * @compile ../DemoRun.java - * @compile -source 7 -g:lines HelloWorld.java + * @compile -g:lines HelloWorld.java * @build StackMapTableTest * @run main StackMapTableTest HelloWorld */ diff --git a/jdk/test/java/lang/Long/Unsigned.java b/jdk/test/java/lang/Long/Unsigned.java index 2ccbc8d509a..3686457ffe6 100644 --- a/jdk/test/java/lang/Long/Unsigned.java +++ b/jdk/test/java/lang/Long/Unsigned.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4504839 4215269 6322074 + * @bug 4504839 4215269 6322074 8030814 * @summary Basic tests for unsigned operations * @author Joseph D. Darcy */ @@ -310,6 +310,55 @@ public class Unsigned { } } + // test case known at one time to fail + errors += testUnsignedOverflow("1234567890abcdef1", 16, true); + + // largest value with guard = 91 = 13*7; radix = 13 + errors += testUnsignedOverflow("196a78a44c3bba320c", 13, false); + + // smallest value with guard = 92 = 23*2*2; radix = 23 + errors += testUnsignedOverflow("137060c6g1c1dg0", 23, false); + + // guard in [92,98]: no overflow + + // one less than smallest guard value to overflow: guard = 99 = 11*3*3, radix = 33 + errors += testUnsignedOverflow("b1w8p7j5q9r6f", 33, false); + + // smallest guard value to overflow: guard = 99 = 11*3*3, radix = 33 + errors += testUnsignedOverflow("b1w8p7j5q9r6g", 33, true); + + // test overflow of overflow + BigInteger maxUnsignedLong = + BigInteger.ONE.shiftLeft(64).subtract(BigInteger.ONE); + for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { + BigInteger quotient = maxUnsignedLong.divide(BigInteger.valueOf(radix)); + for (int addend = 2; addend <= radix; addend++) { + BigInteger b = quotient.multiply(BigInteger.valueOf(radix + addend)); + errors += testUnsignedOverflow(b.toString(radix), radix, b.compareTo(maxUnsignedLong) > 0); + } + } + + return errors; + } + + // test for missing or unexpected unsigned overflow exception + private static int testUnsignedOverflow(String s, int radix, boolean exception) { + int errors = 0; + long result; + try { + result = Long.parseUnsignedLong(s, radix); + if (exception) { + System.err.printf("Unexpected result %d for Long.parseUnsignedLong(%s,%d)\n", + result, s, radix); + errors++; + } + } catch (NumberFormatException nfe) { + if (!exception) { + System.err.printf("Unexpected exception %s for Long.parseUnsignedLong(%s,%d)\n", + nfe.toString(), s, radix); + errors++; + } + } return errors; } diff --git a/jdk/test/java/lang/ProcessBuilder/Basic.java b/jdk/test/java/lang/ProcessBuilder/Basic.java index ff4c3744321..515c6ec18e1 100644 --- a/jdk/test/java/lang/ProcessBuilder/Basic.java +++ b/jdk/test/java/lang/ProcessBuilder/Basic.java @@ -38,6 +38,9 @@ import static java.lang.ProcessBuilder.Redirect.*; import java.io.*; import java.lang.reflect.Field; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; import java.util.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -58,6 +61,15 @@ public class Basic { /* used for Mac OS X only */ static final String cfUserTextEncoding = System.getenv("__CF_USER_TEXT_ENCODING"); + /** + * Returns the number of milliseconds since time given by + * startNanoTime, which must have been previously returned from a + * call to {@link System.nanoTime()}. + */ + private static long millisElapsedSince(long startNanoTime) { + return TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanoTime); + } + private static String commandOutput(Reader r) throws Throwable { StringBuilder sb = new StringBuilder(); int c; @@ -515,18 +527,9 @@ public class Basic { } } - private static void copy(String src, String dst) { - system("/bin/cp", "-fp", src, dst); - } - - private static void system(String... command) { - try { - ProcessBuilder pb = new ProcessBuilder(command); - ProcessResults r = run(pb.start()); - equal(r.exitValue(), 0); - equal(r.out(), ""); - equal(r.err(), ""); - } catch (Throwable t) { unexpected(t); } + private static void copy(String src, String dst) throws IOException { + Files.copy(Paths.get(src), Paths.get(dst), + StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES); } private static String javaChildOutput(ProcessBuilder pb, String...args) { @@ -2232,40 +2235,66 @@ public class Basic { //---------------------------------------------------------------- // Check that Process.waitFor(timeout, TimeUnit.MILLISECONDS) - // interrupt works as expected. + // interrupt works as expected, if interrupted while waiting. //---------------------------------------------------------------- try { List childArgs = new ArrayList(javaChildArgs); childArgs.add("sleep"); final Process p = new ProcessBuilder(childArgs).start(); final long start = System.nanoTime(); - final CountDownLatch ready = new CountDownLatch(1); - final CountDownLatch done = new CountDownLatch(1); + final CountDownLatch aboutToWaitFor = new CountDownLatch(1); final Thread thread = new Thread() { public void run() { try { - final boolean result; - try { - ready.countDown(); - result = p.waitFor(30000, TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - return; - } + aboutToWaitFor.countDown(); + boolean result = p.waitFor(30L * 1000L, TimeUnit.MILLISECONDS); fail("waitFor() wasn't interrupted, its return value was: " + result); - } catch (Throwable t) { - unexpected(t); - } finally { - done.countDown(); - } + } catch (InterruptedException success) { + } catch (Throwable t) { unexpected(t); } } }; thread.start(); - ready.await(); + aboutToWaitFor.await(); Thread.sleep(1000); thread.interrupt(); - done.await(); + thread.join(10L * 1000L); + check(millisElapsedSince(start) < 10L * 1000L); + check(!thread.isAlive()); + p.destroy(); + } catch (Throwable t) { unexpected(t); } + + //---------------------------------------------------------------- + // Check that Process.waitFor(timeout, TimeUnit.MILLISECONDS) + // interrupt works as expected, if interrupted before waiting. + //---------------------------------------------------------------- + try { + List childArgs = new ArrayList(javaChildArgs); + childArgs.add("sleep"); + final Process p = new ProcessBuilder(childArgs).start(); + final long start = System.nanoTime(); + final CountDownLatch threadStarted = new CountDownLatch(1); + + final Thread thread = new Thread() { + public void run() { + try { + threadStarted.countDown(); + do { Thread.yield(); } + while (!Thread.currentThread().isInterrupted()); + boolean result = p.waitFor(30L * 1000L, TimeUnit.MILLISECONDS); + fail("waitFor() wasn't interrupted, its return value was: " + result); + } catch (InterruptedException success) { + } catch (Throwable t) { unexpected(t); } + } + }; + + thread.start(); + threadStarted.await(); + thread.interrupt(); + thread.join(10L * 1000L); + check(millisElapsedSince(start) < 10L * 1000L); + check(!thread.isAlive()); p.destroy(); } catch (Throwable t) { unexpected(t); } @@ -2441,7 +2470,7 @@ public class Basic { static void check(boolean cond, String m) {if (cond) pass(); else fail(m);} static void equal(Object x, Object y) { if (x == null ? y == null : x.equals(y)) pass(); - else fail(x + " not equal to " + y);} + else fail(">'" + x + "'<" + " not equal to " + "'" + y + "'");} public static void main(String[] args) throws Throwable { try {realMain(args);} catch (Throwable t) {unexpected(t);} diff --git a/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java b/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java index ac206c6c705..a8e75896a6f 100644 --- a/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java +++ b/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java @@ -23,7 +23,7 @@ /* * @test - * @bug 6741606 7146431 8000450 8019830 + * @bug 6741606 7146431 8000450 8019830 8022945 * @summary Make sure all restricted packages listed in the package.access * property in the java.security file are blocked * @run main/othervm CheckPackageAccess @@ -56,6 +56,7 @@ public class CheckPackageAccess { "com.sun.istack.internal.", "com.sun.jmx.", "com.sun.media.sound.", + "com.sun.naming.internal.", "com.sun.proxy.", "com.sun.corba.se.", "com.sun.org.apache.bcel.internal.", diff --git a/jdk/test/java/lang/invoke/ObjectMethodInInterfaceTest.java b/jdk/test/java/lang/invoke/ObjectMethodInInterfaceTest.java new file mode 100644 index 00000000000..2ba7116200a --- /dev/null +++ b/jdk/test/java/lang/invoke/ObjectMethodInInterfaceTest.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8031502 + * @summary JSR292: IncompatibleClassChangeError in LambdaForm for CharSequence.toString() method handle type converter + * @compile ObjectMethodInInterfaceTest.java + * @run main/othervm -Djava.lang.invoke.MethodHandle.COMPILE_THRESHOLD=0 test.java.lang.invoke.ObjectMethodInInterfaceTest + */ +package test.java.lang.invoke; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; + +public class ObjectMethodInInterfaceTest { + public static void main(String[] args) throws Throwable { + MethodHandle mh = MethodHandles.lookup().findVirtual(CharSequence.class, "toString", MethodType.methodType(String.class)); + MethodType mt = MethodType.methodType(Object.class, CharSequence.class); + mh = mh.asType(mt); + + Object res = mh.invokeExact((CharSequence)"123"); + + System.out.println("TEST PASSED"); + } +} diff --git a/jdk/test/java/lang/management/ThreadMXBean/ThreadBlockedCount.java b/jdk/test/java/lang/management/ThreadMXBean/ThreadBlockedCount.java index 0bd709b28ce..7fed519de59 100644 --- a/jdk/test/java/lang/management/ThreadMXBean/ThreadBlockedCount.java +++ b/jdk/test/java/lang/management/ThreadMXBean/ThreadBlockedCount.java @@ -27,7 +27,6 @@ * @summary Basic unit test of ThreadInfo.getBlockedCount() * @author Alexei Guibadoulline and Mandy Chung * @author Jaroslav Bachorik - * * @run main ThreadBlockedCount */ @@ -35,7 +34,7 @@ import java.lang.management.*; import java.util.concurrent.Phaser; public class ThreadBlockedCount { - final static long EXPECTED_BLOCKED_COUNT = 3; + final static long EXPECTED_BLOCKED_COUNT = 3; final static int DEPTH = 10; private static final ThreadMXBean mbean = ManagementFactory.getThreadMXBean(); @@ -47,13 +46,20 @@ public class ThreadBlockedCount { private static final Object blockedObj1 = new Object(); private static final Object blockedObj2 = new Object(); private static final Object blockedObj3 = new Object(); - private static volatile boolean testOk = false; + private static volatile boolean testOk = true; private static BlockingThread blocking; private static BlockedThread blocked; - - public static void main(String args[]) throws Exception { + // real run + runTest(); + if (!testOk) { + throw new RuntimeException("TEST FAILED."); + } + System.out.println("Test passed."); + } + + private static void runTest() throws Exception { final Phaser p = new Phaser(2); blocking = new BlockingThread(p); @@ -73,11 +79,6 @@ public class ThreadBlockedCount { e.printStackTrace(System.err); throw e; } - - if (!testOk) { - throw new RuntimeException("TEST FAILED."); - } - System.out.println("Test passed."); } @@ -90,6 +91,7 @@ public class ThreadBlockedCount { } public void run() { + int accumulator = 0; p.arriveAndAwaitAdvance(); // #1 // Enter lock a without blocking @@ -99,7 +101,7 @@ public class ThreadBlockedCount { // Block to enter blockedObj1 // blockedObj1 should be owned by BlockingThread synchronized (blockedObj1) { - System.out.println("BlockedThread entered lock blockedObj1."); + accumulator++; // filler } } @@ -111,7 +113,7 @@ public class ThreadBlockedCount { // Block to enter blockedObj2 // blockedObj2 should be owned by BlockingThread synchronized (blockedObj2) { - System.out.println("BlockedThread entered lock blockedObj2."); + accumulator++; // filler } } @@ -123,11 +125,12 @@ public class ThreadBlockedCount { // Block to enter blockedObj3 // blockedObj3 should be owned by BlockingThread synchronized (blockedObj3) { - System.out.println("BlockedThread entered lock blockedObj3."); + accumulator++; // filler } } // wait for the main thread to check the blocked count + System.out.println("Acquired " + accumulator + " monitors"); p.arriveAndAwaitAdvance(); // #5 // ... and we can leave now } // run() @@ -197,7 +200,7 @@ public class ThreadBlockedCount { long count = -1; for (int i = 0; i < 100; i++) { count = getBlockedCount(); - if (count == EXPECTED_BLOCKED_COUNT) { + if (count >= EXPECTED_BLOCKED_COUNT) { return true; } try { @@ -209,7 +212,7 @@ public class ThreadBlockedCount { } } System.err.println("TEST FAILED: Blocked thread has " + count + - " blocked counts. Expected " + + " blocked counts. Expected at least " + EXPECTED_BLOCKED_COUNT); return false; } diff --git a/jdk/test/java/lang/reflect/OldenCompilingWithDefaults.java b/jdk/test/java/lang/reflect/OldenCompilingWithDefaults.java index c8609b35f9d..0d82520b517 100644 --- a/jdk/test/java/lang/reflect/OldenCompilingWithDefaults.java +++ b/jdk/test/java/lang/reflect/OldenCompilingWithDefaults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, 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,7 +25,6 @@ * @test * @bug 8009267 * @summary Verify uses of isAnnotationPresent compile under older source versions - * @compile -source 1.5 -target 1.5 OldenCompilingWithDefaults.java * @compile -source 1.6 -target 1.6 OldenCompilingWithDefaults.java * @compile -source 1.7 -target 1.7 OldenCompilingWithDefaults.java * @compile OldenCompilingWithDefaults.java diff --git a/jdk/test/java/net/Socks/SocksIPv6Test.java b/jdk/test/java/net/Socks/SocksIPv6Test.java new file mode 100644 index 00000000000..1b4dc82ff58 --- /dev/null +++ b/jdk/test/java/net/Socks/SocksIPv6Test.java @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2013, 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 7100957 + * @summary Java doesn't correctly handle the SOCKS protocol when used over IPv6. + * @run testng SocksIPv6Test + */ + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.net.Authenticator; +import java.net.InetSocketAddress; +import java.net.URL; +import java.net.Proxy; +import java.lang.Override; +import java.net.InetAddress; +import java.net.Inet6Address; +import java.net.ServerSocket; +import java.net.SocketException; +import java.net.NetworkInterface; +import java.net.UnknownHostException; +import java.util.Collections; +import java.util.List; +import com.sun.net.httpserver.*; +import java.io.BufferedWriter; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import static org.testng.Assert.*; + +public class SocksIPv6Test { + + private HttpServer server; + private SocksServer socks; + private String response = "Hello."; + private static boolean shouldRun = false; + + @BeforeClass + public void setUp() throws Exception { + shouldRun = ensureInet6AddressFamily() && ensureIPv6OnLoopback(); + + server = HttpServer.create(new InetSocketAddress(0), 0); + server.createContext("/", ex -> { + ex.sendResponseHeaders(200, response.length()); + try (BufferedWriter writer = new BufferedWriter( + new OutputStreamWriter(ex.getResponseBody(), "UTF-8"))) { + writer.write(response); + } + ex.close(); + }); + server.start(); + + socks = new SocksServer(0, false); + socks.addUser("user", "pass"); + socks.start(); + + Authenticator.setDefault(new Authenticator() { + @Override + protected java.net.PasswordAuthentication getPasswordAuthentication() { + return new java.net.PasswordAuthentication( + "user", "pass".toCharArray()); + } + }); + } + + private boolean ensureIPv6OnLoopback() throws Exception { + boolean ipv6 = false; + + List nics = Collections.list(NetworkInterface.getNetworkInterfaces()); + for (NetworkInterface nic : nics) { + if (!nic.isLoopback()) { + continue; + } + List addrs = Collections.list(nic.getInetAddresses()); + for (InetAddress addr : addrs) { + if (addr instanceof Inet6Address) { + ipv6 = true; + break; + } + } + } + if (!ipv6) + System.out.println("IPv6 is not enabled on loopback. Skipping test suite."); + return ipv6; + } + + private boolean ensureInet6AddressFamily() throws IOException { + try (ServerSocket s = new ServerSocket()) { + s.bind(new InetSocketAddress("::1", 0)); + return true; + } catch (SocketException e) { + System.out.println("Inet 6 address family is not available. Skipping test suite."); + } + return false; + } + + @Test(groups = "unit") + public void testSocksOverIPv6() throws Exception { + if (!shouldRun) return; + + Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("::1", + socks.getPort())); + URL url = new URL("http://[::1]:" + server.getAddress().getPort()); + java.net.URLConnection conn = url.openConnection(proxy); + String actual = ""; + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(conn.getInputStream()))) { + actual = reader.readLine(); + } + assertEquals(actual, response); + } + + @Test(groups = "unit") + public void testSocksOverIPv6Hostname() throws Exception { + if (!shouldRun) return; + + String ipv6Hostname = InetAddress.getByName("::1").getHostName(); + String ipv4Hostname = InetAddress.getByName("127.0.0.1").getHostName(); + + if (ipv6Hostname.equals(InetAddress.getByName("::1").getHostAddress())) { + System.out.println("Unable to get the hostname of the IPv6 loopback " + + "address. Skipping test case."); + return; + } + + if (ipv6Hostname.equals(ipv4Hostname)) { + System.out.println("IPv6 and IPv4 loopback addresses map to the" + + " same hostname. Skipping test case."); + return; + } + + Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(ipv6Hostname, + socks.getPort())); + URL url = new URL("http://" + ipv6Hostname + ":" + server.getAddress().getPort()); + java.net.URLConnection conn = url.openConnection(proxy); + String actual = ""; + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(conn.getInputStream()))) { + actual = reader.readLine(); + } + assertEquals(actual, response); + } + + @AfterClass + public void tearDown() { + if (server != null) { + server.stop(1); + } + if (socks != null) { + socks.terminate(); + } + } +} diff --git a/jdk/test/java/net/Socks/SocksServer.java b/jdk/test/java/net/Socks/SocksServer.java index 6e27e342e94..f2d6ef82bfe 100644 --- a/jdk/test/java/net/Socks/SocksServer.java +++ b/jdk/test/java/net/Socks/SocksServer.java @@ -89,6 +89,7 @@ public class SocksServer extends Thread { return; } tout.write(b); + tout.flush(); } catch (IOException e) { // actually exit from the thread return; @@ -99,8 +100,8 @@ public class SocksServer extends Thread { ClientHandler(Socket s) throws IOException { client = s; - in = client.getInputStream(); - out = client.getOutputStream(); + in = new BufferedInputStream(client.getInputStream()); + out = new BufferedOutputStream(client.getOutputStream()); } private void readBuf(InputStream is, byte[] buf) throws IOException { @@ -230,8 +231,8 @@ public class SocksServer extends Thread { out.write(port & 0xff); out.write(buf); out.flush(); - InputStream in2 = dest.getInputStream(); - OutputStream out2 = dest.getOutputStream(); + InputStream in2 = new BufferedInputStream(dest.getInputStream()); + OutputStream out2 = new BufferedOutputStream(dest.getOutputStream()); Tunnel tunnel = new Tunnel(in2, out); tunnel.start(); @@ -246,6 +247,7 @@ public class SocksServer extends Thread { return; } out2.write(b); + out2.flush(); } catch (IOException ex) { } } while (!client.isClosed()); @@ -323,8 +325,8 @@ public class SocksServer extends Thread { out.write((addr.getPort() >> 0) & 0xff); out.flush(); - InputStream in2 = dest.getInputStream(); - OutputStream out2 = dest.getOutputStream(); + InputStream in2 = new BufferedInputStream(dest.getInputStream()); + OutputStream out2 = new BufferedOutputStream(dest.getOutputStream()); Tunnel tunnel = new Tunnel(in2, out); tunnel.start(); @@ -340,6 +342,7 @@ public class SocksServer extends Thread { return; } out2.write(b); + out2.flush(); } catch(IOException ioe) { } } while (!client.isClosed()); @@ -384,6 +387,7 @@ public class SocksServer extends Thread { return; } out2.write(b); + out2.flush(); } catch(IOException ioe) { } } while (!client.isClosed()); @@ -410,14 +414,7 @@ public class SocksServer extends Thread { { byte[] buf = new byte[4]; readBuf(in, buf); - int i = 0; - StringBuffer sb = new StringBuffer(); - for (i = 0; i < 4; i++) { - sb.append(buf[i]&0xff); - if (i < 3) - sb.append('.'); - } - addr = sb.toString(); + addr = InetAddress.getByAddress(buf).getHostAddress(); } break; case DOMAIN_NAME: @@ -432,14 +429,7 @@ public class SocksServer extends Thread { { byte[] buf = new byte[16]; readBuf(in, buf); - int i = 0; - StringBuffer sb = new StringBuffer(); - for (i = 0; i<16; i++) { - sb.append(Integer.toHexString(buf[i]&0xff)); - if (i < 15) - sb.append(':'); - } - addr = sb.toString(); + addr = InetAddress.getByAddress(buf).getHostAddress(); } break; } diff --git a/jdk/test/java/net/ipv6tests/UdpTest.java b/jdk/test/java/net/ipv6tests/UdpTest.java index 8f91ade0207..33fe7e702dd 100644 --- a/jdk/test/java/net/ipv6tests/UdpTest.java +++ b/jdk/test/java/net/ipv6tests/UdpTest.java @@ -147,6 +147,7 @@ public class UdpTest extends Tests { final InetAddress ia6 = ia6addr; final int port = s1.getLocalPort(); + s1.setSoTimeout(10000); runAfter (2000, new Runnable () { public void run () { try { @@ -157,7 +158,7 @@ public class UdpTest extends Tests { }); t1 = System.currentTimeMillis(); s1.receive (new DatagramPacket (new byte [128], 128)); - checkTime (System.currentTimeMillis() - t1, 2000); + checkTime (System.currentTimeMillis() - t1, 4000); s1.close (); s2.close (); System.out.println ("Test2: OK"); diff --git a/jdk/test/java/nio/file/Files/Misc.java b/jdk/test/java/nio/file/Files/Misc.java index 191a4fa2807..5826d551d0b 100644 --- a/jdk/test/java/nio/file/Files/Misc.java +++ b/jdk/test/java/nio/file/Files/Misc.java @@ -22,7 +22,7 @@ */ /* @test - * @bug 4313887 6838333 8005566 + * @bug 4313887 6838333 8005566 8032220 * @summary Unit test for miscellenous methods in java.nio.file.Files * @library .. */ @@ -76,6 +76,11 @@ public class Misc { createDirectories(file.resolve("y")); throw new RuntimeException("failure expected"); } catch (IOException x) { } + + // the root directory always exists + Path root = Paths.get("/"); + Files.createDirectories(root); + Files.createDirectories(root.toAbsolutePath()); } /** diff --git a/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java b/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java index be9234d2fb9..6d81b0f1248 100644 --- a/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java +++ b/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java @@ -88,6 +88,17 @@ public class RmidViaInheritedChannel implements Callback { TestLibrary.RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT); rmid.addOptions(new String[]{ "-Djava.nio.channels.spi.SelectorProvider=RmidViaInheritedChannel$RmidSelectorProvider"}); + if (System.getProperty("os.name").startsWith("Windows") && + System.getProperty("os.version").startsWith("5.")) + { + /* Windows XP/2003 or older + * Need to expand ephemeral range to include RMI test ports + */ + rmid.addOptions(new String[]{ + "-Djdk.net.ephemeralPortRange.low=1024", + "-Djdk.net.ephemeralPortRange.high=64000" + }); + } rmid.start(); /* diff --git a/jdk/test/java/rmi/registry/readTest/readTest.sh b/jdk/test/java/rmi/registry/readTest/readTest.sh index bb37f65b4cc..b6e7c55c46b 100644 --- a/jdk/test/java/rmi/registry/readTest/readTest.sh +++ b/jdk/test/java/rmi/registry/readTest/readTest.sh @@ -29,6 +29,10 @@ # @run shell readTest.sh OS=`uname -s` +VER=`uname -r` +ARGS="" +REGARGS="" + case "$OS" in SunOS | Linux | Darwin ) PS=":" @@ -39,11 +43,19 @@ case "$OS" in PS=";" FS="\\" FILEURL="file:/" + if [ "$VER" -eq "5" ]; then + ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000" + REGARGS="-J-Djdk.net.ephemeralPortRange.low=1024 -J-Djdk.net.ephemeralPortRange.high=65000" + fi ;; CYGWIN* ) PS=";" FS="/" FILEURL="file:/" + if [ "$VER" -eq "5" ]; then + ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000" + REGARGS="-J-Djdk.net.ephemeralPortRange.low=1024 -J-Djdk.net.ephemeralPortRange.high=65000" + fi ;; * ) echo "Unrecognized system!" @@ -61,8 +73,8 @@ RMIREG_OUT=rmi.out #start rmiregistry without any local classes on classpath cd rmi_tmp # NOTE: This RMI Registry port must match TestLibrary.READTEST_REGISTRY_PORT -${TESTJAVA}${FS}bin${FS}rmiregistry -J-Djava.rmi.server.useCodebaseOnly=false \ - ${TESTTOOLVMOPTS} 64005 > ..${FS}${RMIREG_OUT} 2>&1 & +${TESTJAVA}${FS}bin${FS}rmiregistry ${REGARGS} -J-Djava.rmi.server.useCodebaseOnly=false \ + ${TESTTOOLVMOPTS} 60005 > ..${FS}${RMIREG_OUT} 2>&1 & RMIREG_PID=$! # allow some time to start sleep 3 @@ -74,10 +86,10 @@ case "$OS" in ;; * ) CODEBASE=`pwd` - ;; + ;; esac # trailing / after code base is important for rmi codebase property. -${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -cp $TEST_CLASSPATH -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 & +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -cp $TEST_CLASSPATH ${ARGS} -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 & TEST_PID=$! #bulk of testcase - let it run for a while sleep 5 @@ -100,7 +112,7 @@ grep "Test passed" OUT.TXT result2=$? if [ $result1 -eq 0 -a $result2 -eq 0 ] -then +then echo "Passed" exitCode=0; else @@ -108,6 +120,6 @@ else exitCode=1 fi rm -rf OUT.TXT ${RMIREG_OUT} rmi_tmp -exit ${exitCode} +exit ${exitCode} diff --git a/jdk/test/java/rmi/testlibrary/TestLibrary.java b/jdk/test/java/rmi/testlibrary/TestLibrary.java index 87733be8e8f..8c28b8994ab 100644 --- a/jdk/test/java/rmi/testlibrary/TestLibrary.java +++ b/jdk/test/java/rmi/testlibrary/TestLibrary.java @@ -86,13 +86,13 @@ public class TestLibrary { * FIXED_PORT_MIN or above FIXED_PORT_MAX, then adjust * FIXED_PORT_MIN/MAX appropriately. */ - public final static int FIXED_PORT_MIN = 64001; - public final static int FIXED_PORT_MAX = 64010; - public final static int RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT = 64001; - public final static int RMIDVIAINHERITEDCHANNEL_REGISTRY_PORT = 64002; - public final static int INHERITEDCHANNELNOTSERVERSOCKET_ACTIVATION_PORT = 64003; - public final static int INHERITEDCHANNELNOTSERVERSOCKET_REGISTRY_PORT = 64004; - public final static int READTEST_REGISTRY_PORT = 64005; + public final static int FIXED_PORT_MIN = 60001; + public final static int FIXED_PORT_MAX = 60010; + public final static int RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT = 60001; + public final static int RMIDVIAINHERITEDCHANNEL_REGISTRY_PORT = 60002; + public final static int INHERITEDCHANNELNOTSERVERSOCKET_ACTIVATION_PORT = 60003; + public final static int INHERITEDCHANNELNOTSERVERSOCKET_REGISTRY_PORT = 60004; + public final static int READTEST_REGISTRY_PORT = 60005; private final static int MAX_SERVER_SOCKET_TRIES = 2*(FIXED_PORT_MAX-FIXED_PORT_MIN+1); static void mesg(Object mesg) { diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java index 8dbe8acc33e..9ce3ef46ac1 100644 --- a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,6 +21,12 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * @bug 6852744 @@ -234,6 +240,10 @@ public final class DisableRevocation { public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPathBuilder builder = CertPathBuilder.getInstance("PKIX"); X509CertSelector selector = generateSelector(args[0]); diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java index 53b3aceda52..75bf2ec5a02 100644 --- a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,6 +21,12 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * @bug 6852744 @@ -277,6 +283,10 @@ public final class KeyUsageMatters { public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPathBuilder builder = CertPathBuilder.getInstance("PKIX"); X509CertSelector selector = generateSelector(args[0]); diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java index 873237cf3b8..6d0b24bef32 100644 --- a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,6 +21,12 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * @bug 6852744 @@ -283,6 +289,10 @@ public final class StatusLoopDependency { public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPathBuilder builder = CertPathBuilder.getInstance("PKIX"); X509CertSelector selector = generateSelector(args[0]); diff --git a/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java b/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java index 9f8d697740a..8c6e0458b33 100644 --- a/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java +++ b/jdk/test/java/security/cert/CertPathValidator/OCSP/AIACheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,12 +21,19 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * @bug 5072953 * @summary Verify that the URL for an OCSP responder can be extracted from a * certificate's AuthorityInfoAccess extension when OCSP certifiate * validation has been enabled. + * @run main/othervm AIACheck */ import java.io.*; @@ -51,6 +58,10 @@ public class AIACheck { } public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + X509Certificate aiaCert = loadCertificate("AIACert.pem"); X509Certificate rootCert = loadCertificate("RootCert.pem"); diff --git a/jdk/test/java/security/cert/CertPathValidator/OCSP/FailoverToCRL.java b/jdk/test/java/security/cert/CertPathValidator/OCSP/FailoverToCRL.java index 29abf024e9f..d1e4e8c6a29 100644 --- a/jdk/test/java/security/cert/CertPathValidator/OCSP/FailoverToCRL.java +++ b/jdk/test/java/security/cert/CertPathValidator/OCSP/FailoverToCRL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,16 +21,24 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * @bug 6383095 * @summary CRL revoked certificate failures masked by OCSP failures - * + * @run main/othervm FailoverToCRL + * @author Xuelei Fan + */ + +/* * Note that the certificate validity is from Mar 16 14:55:35 2009 GMT to * Dec 1 14:55:35 2028 GMT, please update it with newer certificate if * expires. - * - * @author Xuelei Fan */ /* @@ -229,6 +237,10 @@ public class FailoverToCRL { } public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPath path = generateCertificatePath(); Set anchors = generateTrustAnchors(); CertStore crls = generateCertificateStore(); diff --git a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevel.java b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevel.java index c850b82ed63..9a21ae2de0d 100644 --- a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevel.java +++ b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,11 +21,18 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * * @bug 6720721 * @summary CRL check with circular depency support needed + * @run main/othervm CircularCRLOneLevel * @author Xuelei Fan */ @@ -158,6 +165,10 @@ public class CircularCRLOneLevel { } public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPath path = generateCertificatePath(); Set anchors = generateTrustAnchors(); CertStore crls = generateCertificateStore(); diff --git a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevelRevoked.java b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevelRevoked.java index ebbb3b09e4d..944483683ba 100644 --- a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevelRevoked.java +++ b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLOneLevelRevoked.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,11 +21,18 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * * @bug 6720721 * @summary CRL check with circular depency support needed + * @run main/othervm CircularCRLOneLevelRevoked * @author Xuelei Fan */ @@ -159,6 +166,10 @@ public class CircularCRLOneLevelRevoked { } public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPath path = generateCertificatePath(); Set anchors = generateTrustAnchors(); CertStore crls = generateCertificateStore(); diff --git a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java index d8ca3356ab6..d67db44e396 100644 --- a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java +++ b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,11 +21,18 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * * @bug 6720721 * @summary CRL check with circular depency support needed + * @run main/othervm CircularCRLTwoLevel * @author Xuelei Fan */ @@ -210,6 +217,10 @@ public class CircularCRLTwoLevel { } public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPath path = generateCertificatePath(); Set anchors = generateTrustAnchors(); CertStore crls = generateCertificateStore(); diff --git a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java index 4405ded75ea..e67934b8a19 100644 --- a/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java +++ b/jdk/test/java/security/cert/CertPathValidator/indirectCRL/CircularCRLTwoLevelRevoked.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,11 +21,18 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /** * @test * * @bug 6720721 * @summary CRL check with circular depency support needed + * @run main/othervm CircularCRLTwoLevelRevoked * @author Xuelei Fan */ @@ -211,6 +218,10 @@ public class CircularCRLTwoLevelRevoked { } public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CertPath path = generateCertificatePath(); Set anchors = generateTrustAnchors(); CertStore crls = generateCertificateStore(); diff --git a/jdk/test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java b/jdk/test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java index d9ef366c481..e1c64a5e045 100644 --- a/jdk/test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java +++ b/jdk/test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,16 +21,17 @@ * questions. */ -/** +/* * @test * @test 4422738 - * @compile -source 1.4 InvalidParameters.java + * @compile InvalidParameters.java * @run main InvalidParameters * @summary Make sure PKIXBuilderParameters(Set) detects invalid * parameters and throws correct exceptions */ import java.security.InvalidAlgorithmParameterException; import java.security.cert.PKIXBuilderParameters; +import java.security.cert.TrustAnchor; import java.util.Collections; import java.util.Set; @@ -53,8 +54,10 @@ public class InvalidParameters { // make sure Set of invalid objects throws ClassCastException try { + @SuppressWarnings("unchecked") // Knowingly do something bad + Set badSet = (Set) (Set) Collections.singleton(new String()); PKIXBuilderParameters p = - new PKIXBuilderParameters(Collections.singleton(new String()), null); + new PKIXBuilderParameters(badSet, null); throw new Exception("should have thrown ClassCastException"); } catch (ClassCastException cce) { } } diff --git a/jdk/test/java/security/cert/PKIXParameters/InvalidParameters.java b/jdk/test/java/security/cert/PKIXParameters/InvalidParameters.java index 3e16fa64d1d..ebce8a18347 100644 --- a/jdk/test/java/security/cert/PKIXParameters/InvalidParameters.java +++ b/jdk/test/java/security/cert/PKIXParameters/InvalidParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, 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 * @test 4422738 - * @compile -source 1.4 InvalidParameters.java + * @compile InvalidParameters.java * @run main InvalidParameters * @summary Make sure PKIXParameters(Set) and setTrustAnchors() detects invalid * parameters and throws correct exceptions @@ -64,12 +64,14 @@ public class InvalidParameters { } catch (NullPointerException npe) { } // make sure Set of invalid objects throws ClassCastException + @SuppressWarnings("unchecked") // Knowingly do something bad + Set badSet = (Set) (Set) Collections.singleton(new String()); try { - PKIXParameters p = new PKIXParameters(Collections.singleton(new String())); + PKIXParameters p = new PKIXParameters(badSet); throw new Exception("should have thrown ClassCastException"); } catch (ClassCastException cce) { } try { - params.setTrustAnchors(Collections.singleton(new String())); + params.setTrustAnchors(badSet); throw new Exception("should have thrown ClassCastException"); } catch (ClassCastException cce) { } } diff --git a/jdk/test/java/util/Calendar/GenericTimeZoneNamesTest.sh b/jdk/test/java/util/Calendar/GenericTimeZoneNamesTest.sh index ab3f4981c91..30d409cf6a4 100644 --- a/jdk/test/java/util/Calendar/GenericTimeZoneNamesTest.sh +++ b/jdk/test/java/util/Calendar/GenericTimeZoneNamesTest.sh @@ -32,10 +32,7 @@ STATUS=0 echo "Locale providers: default" -# TODO: The purpose of ja-JP is to make sure the fallback for generic -# names works. Remove ja-JP when adding generic names to localized -# resources. -if ! ${TESTJAVA}/bin/java -esa ${TESTVMOPTS} -cp "${TESTCLASSES}" GenericTimeZoneNamesTest en-US ja-JP; then +if ! ${TESTJAVA}/bin/java -esa ${TESTVMOPTS} -cp "${TESTCLASSES}" GenericTimeZoneNamesTest en-US; then STATUS=1 fi diff --git a/jdk/test/java/util/Locale/Bug4175998Test.java b/jdk/test/java/util/Locale/Bug4175998Test.java index 55d92a6ce0d..e890ae9e667 100644 --- a/jdk/test/java/util/Locale/Bug4175998Test.java +++ b/jdk/test/java/util/Locale/Bug4175998Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,13 +20,15 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* - @test - @summary test ISO639-2 language codes - @compile -encoding ascii -source 5 Bug4175998Test.java - @run main Bug4175998Test - @bug 4175998 -*/ + * @test + * @summary test ISO639-2 language codes + * @compile -encoding ascii Bug4175998Test.java + * @run main Bug4175998Test + * @bug 4175998 + */ + /* * * @@ -731,7 +733,7 @@ pol pol Polish pon pon Pohnpeian por por Portuguese pra pra Prakrit languages -pro pro Provençal, Old (to 1500) +pro pro Proven\u00E7al, Old (to 1500) pus pus Pushto qaa-qtz qaa-qtz Reserved for local use que que Quechua diff --git a/jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java b/jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java index acee6e676be..74a902ae754 100644 --- a/jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java +++ b/jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 CancelledProducerConsumerLoops.java * @run main/timeout=7000 CancelledProducerConsumerLoops * @summary Checks for responsiveness of blocking queues to cancellation. * Runs under the assumption that ITERS computations require more than diff --git a/jdk/test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java b/jdk/test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java index 58983059bfe..47b7347174d 100644 --- a/jdk/test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java +++ b/jdk/test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 MultipleProducersSingleConsumerLoops.java * @run main/timeout=3600 MultipleProducersSingleConsumerLoops * @summary multiple producers and single consumer using blocking queues */ diff --git a/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java b/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java index 7755126674c..e8770cd0d39 100644 --- a/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java +++ b/jdk/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 ProducerConsumerLoops.java * @run main/timeout=3600 ProducerConsumerLoops * @summary multiple producers and consumers using blocking queues */ diff --git a/jdk/test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java b/jdk/test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java index a697d312df5..51efc7ac7f3 100644 --- a/jdk/test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java +++ b/jdk/test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 SingleProducerMultipleConsumerLoops.java * @run main/timeout=600 SingleProducerMultipleConsumerLoops * @summary check ordering for blocking queues with 1 producer and multiple consumers */ diff --git a/jdk/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java b/jdk/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java index 723ef64dc89..4246e6147cb 100644 --- a/jdk/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java +++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 MapCheck.java * @run main/timeout=240 MapCheck * @summary Times and checks basic map operations */ diff --git a/jdk/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java b/jdk/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java index 49f615a3401..4a4ce22239d 100644 --- a/jdk/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java +++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 MapLoops.java * @run main/timeout=1600 MapLoops * @summary Exercise multithreaded maps, by default ConcurrentHashMap. * Multithreaded hash table test. Each thread does a random walk diff --git a/jdk/test/java/util/concurrent/Exchanger/ExchangeLoops.java b/jdk/test/java/util/concurrent/Exchanger/ExchangeLoops.java index 7527e4fe4c2..6dd04134edb 100644 --- a/jdk/test/java/util/concurrent/Exchanger/ExchangeLoops.java +++ b/jdk/test/java/util/concurrent/Exchanger/ExchangeLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 ExchangeLoops.java * @run main/timeout=720 ExchangeLoops * @summary checks to make sure a pipeline of exchangers passes data. */ diff --git a/jdk/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java b/jdk/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java index 79b2c5634e9..91c6cf412eb 100644 --- a/jdk/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java +++ b/jdk/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4965960 - * @compile -source 1.5 ExecutorCompletionServiceLoops.java * @run main/timeout=3600 ExecutorCompletionServiceLoops * @summary Exercise ExecutorCompletionServiceLoops */ diff --git a/jdk/test/java/util/concurrent/FutureTask/CancelledFutureLoops.java b/jdk/test/java/util/concurrent/FutureTask/CancelledFutureLoops.java index 25cec33881d..5575bb4505a 100644 --- a/jdk/test/java/util/concurrent/FutureTask/CancelledFutureLoops.java +++ b/jdk/test/java/util/concurrent/FutureTask/CancelledFutureLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 CancelledFutureLoops.java * @run main/timeout=2000 CancelledFutureLoops * @summary Checks for responsiveness of futures to cancellation. * Runs under the assumption that ITERS computations require more than diff --git a/jdk/test/java/util/concurrent/atomic/VMSupportsCS8.java b/jdk/test/java/util/concurrent/atomic/VMSupportsCS8.java index 9bbce5d72eb..144e6d8d41f 100644 --- a/jdk/test/java/util/concurrent/atomic/VMSupportsCS8.java +++ b/jdk/test/java/util/concurrent/atomic/VMSupportsCS8.java @@ -24,7 +24,6 @@ /* * @test * @bug 4992443 4994819 - * @compile -source 1.5 VMSupportsCS8.java * @run main VMSupportsCS8 * @summary Checks that the value of VMSupportsCS8 matches system properties. */ diff --git a/jdk/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java b/jdk/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java index dd80d996a82..f9b3cc907bc 100644 --- a/jdk/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java +++ b/jdk/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 CancelledLockLoops.java * @run main/timeout=2800 CancelledLockLoops * @summary tests lockInterruptibly. * Checks for responsiveness of locks to interrupts. Runs under that diff --git a/jdk/test/java/util/concurrent/locks/ReentrantLock/LockOncePerThreadLoops.java b/jdk/test/java/util/concurrent/locks/ReentrantLock/LockOncePerThreadLoops.java index c3cedf4ab1e..c0a62906d7b 100644 --- a/jdk/test/java/util/concurrent/locks/ReentrantLock/LockOncePerThreadLoops.java +++ b/jdk/test/java/util/concurrent/locks/ReentrantLock/LockOncePerThreadLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 LockOncePerThreadLoops.java * @run main/timeout=15000 LockOncePerThreadLoops * @summary Checks for missed signals by locking and unlocking each of an array of locks once per thread */ diff --git a/jdk/test/java/util/concurrent/locks/ReentrantLock/SimpleReentrantLockLoops.java b/jdk/test/java/util/concurrent/locks/ReentrantLock/SimpleReentrantLockLoops.java index f3e77053027..bd650022cd9 100644 --- a/jdk/test/java/util/concurrent/locks/ReentrantLock/SimpleReentrantLockLoops.java +++ b/jdk/test/java/util/concurrent/locks/ReentrantLock/SimpleReentrantLockLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 SimpleReentrantLockLoops.java * @run main/timeout=4500 SimpleReentrantLockLoops * @summary multiple threads using a single lock */ diff --git a/jdk/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java b/jdk/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java index 303e11038a8..575a7bf47f3 100644 --- a/jdk/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java +++ b/jdk/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 5031862 - * @compile -source 1.5 TimeoutLockLoops.java * @run main TimeoutLockLoops * @summary Checks for responsiveness of locks to timeouts. * Runs under the assumption that ITERS computations require more than diff --git a/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java b/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java index 36116703814..c9846df1486 100644 --- a/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java +++ b/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java @@ -34,7 +34,6 @@ /* * @test * @bug 4486658 - * @compile -source 1.5 MapLoops.java * @run main/timeout=4700 MapLoops * @summary Exercise multithreaded maps, by default ConcurrentHashMap. * Multithreaded hash table test. Each thread does a random walk diff --git a/jdk/test/java/util/logging/ParentLoggersTest.java b/jdk/test/java/util/logging/ParentLoggersTest.java index a5070a375e3..eba26947e0b 100644 --- a/jdk/test/java/util/logging/ParentLoggersTest.java +++ b/jdk/test/java/util/logging/ParentLoggersTest.java @@ -63,7 +63,9 @@ public class ParentLoggersTest { static final String LOGGER_NAME_1 = PARENT_NAME_1 + ".myLogger"; static final String LOGGER_NAME_2 = PARENT_NAME_2 + ".myBar.myLogger"; - static final List initialLoggerNames = new ArrayList(); + static final List initialLoggerNames = new ArrayList<>(); + static final List createdLoggers = new ArrayList<>(); + public static void main(String args[]) throws Exception { // cache the initial set of loggers before this test begins // to add any loggers @@ -74,7 +76,7 @@ public class ParentLoggersTest { if (!defaultLoggers.contains(logger)) { initialLoggerNames.add(logger); } - }; + } String tstSrc = System.getProperty(TST_SRC_PROP); File fname = new File(tstSrc, LM_PROP_FNAME); @@ -92,7 +94,7 @@ public class ParentLoggersTest { } public static List getDefaultLoggerNames() { - List expectedLoggerNames = new ArrayList(); + List expectedLoggerNames = new ArrayList<>(); // LogManager always creates two loggers: expectedLoggerNames.add(""); // root logger: "" @@ -106,56 +108,43 @@ public class ParentLoggersTest { */ public static boolean checkLoggers() { String failMsg = "# checkLoggers: getLoggerNames() returned unexpected loggers"; - Vector expectedLoggerNames = new Vector(getDefaultLoggerNames()); + List expectedLoggerNames = new ArrayList<>(getDefaultLoggerNames()); // Create the logger LOGGER_NAME_1 - Logger.getLogger(LOGGER_NAME_1); - expectedLoggerNames.addElement(PARENT_NAME_1); - expectedLoggerNames.addElement(LOGGER_NAME_1); + createdLoggers.add(Logger.getLogger(LOGGER_NAME_1)); + expectedLoggerNames.add(PARENT_NAME_1); + expectedLoggerNames.add(LOGGER_NAME_1); // Create the logger LOGGER_NAME_2 - Logger.getLogger(LOGGER_NAME_2); - expectedLoggerNames.addElement(PARENT_NAME_2); - expectedLoggerNames.addElement(LOGGER_NAME_2); + createdLoggers.add(Logger.getLogger(LOGGER_NAME_2)); + expectedLoggerNames.add(PARENT_NAME_2); + expectedLoggerNames.add(LOGGER_NAME_2); + Enumeration returnedLoggersEnum = logMgr.getLoggerNames(); - Vector returnedLoggerNames = new Vector(0); + List returnedLoggerNames = new ArrayList<>(0); while (returnedLoggersEnum.hasMoreElements()) { String logger = returnedLoggersEnum.nextElement(); if (!initialLoggerNames.contains(logger)) { // filter out the loggers that have been added before this test runs - returnedLoggerNames.addElement(logger); + returnedLoggerNames.add(logger); } - }; - + } + System.out.println(returnedLoggerNames); return checkNames(expectedLoggerNames, returnedLoggerNames, failMsg); } // Returns boolean values: PASSED or FAILED - private static boolean checkNames(Vector expNames, - Vector retNames, + private static boolean checkNames(List expNames, + List retNames, String failMsg) { boolean status = PASSED; if (expNames.size() != retNames.size()) { status = FAILED; - } else { - boolean checked[] = new boolean[retNames.size()]; - for (int i = 0; i < expNames.size(); i++) { - int j = 0; - for (; j < retNames.size(); j++) { - if (!checked[j] && - expNames.elementAt(i).equals(retNames.elementAt(j))) { - checked[j] = true; - break; - } - } - if (j >= retNames.size()) { - status = FAILED; - break; - } - } + } else if (!new HashSet<>(expNames).equals(new HashSet<>(retNames))) { + status = FAILED; } if (!status) { printFailMsg(expNames, retNames, failMsg); @@ -163,25 +152,25 @@ public class ParentLoggersTest { return status; } - private static void printFailMsg(Vector expNames, - Vector retNames, + private static void printFailMsg(List expNames, + List retNames, String failMsg) { out.println(); out.println(failMsg); - if (expNames.size() == 0) { + if (expNames.isEmpty()) { out.println("# there are NO expected logger names"); } else { out.println("# expected logger names (" + expNames.size() + "):"); for (int i = 0; i < expNames.size(); i++) { - out.println(" expNames[" + i + "] = " + expNames.elementAt(i)); + out.println(" expNames[" + i + "] = " + expNames.get(i)); } } - if (retNames.size() == 0) { + if (retNames.isEmpty()) { out.println("# there are NO returned logger names"); } else { out.println("# returned logger names (" + retNames.size() + "):"); for (int i = 0; i < retNames.size(); i++) { - out.println(" retNames[" + i + "] = " + retNames.elementAt(i)); + out.println(" retNames[" + i + "] = " + retNames.get(i)); } } } diff --git a/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java b/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java index 3d1e3d2da52..70badde17f5 100644 --- a/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java +++ b/jdk/test/java/util/logging/TestLogConfigurationDeadLock.java @@ -196,7 +196,8 @@ public class TestLogConfigurationDeadLock { if (ids.length == 1) { throw new RuntimeException("Found 1 deadlocked thread: "+ids[0]); } else if (ids.length > 0) { - ThreadInfo[] infos = ManagementFactory.getThreadMXBean().getThreadInfo(ids); + ThreadInfo[] infos = ManagementFactory.getThreadMXBean() + .getThreadInfo(ids, Integer.MAX_VALUE); System.err.println("Found "+ids.length+" deadlocked threads: "); for (ThreadInfo inf : infos) { System.err.println(inf.toString()); diff --git a/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java b/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java new file mode 100644 index 00000000000..9bde8d516fc --- /dev/null +++ b/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java @@ -0,0 +1,340 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +import java.io.File; +import java.io.PrintStream; +import java.lang.management.ManagementFactory; +import java.lang.management.ThreadInfo; +import java.security.Permission; +import java.security.Policy; +import java.security.ProtectionDomain; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Random; +import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; +import java.util.logging.Level; +import java.util.logging.LogManager; +import java.util.logging.Logger; + + +/** + * @test + * @bug 8027670 8029281 + * @summary Deadlock in drainLoggerRefQueueBounded / readConfiguration + * caused by synchronization issues in Logger and LogManager. + * @run main/othervm TestLogConfigurationDeadLockWithConf + * @author danielfuchs + */ +// This test is a best effort to try & detect issues. The test itself will run +// for 8secs. This is usually sufficient to detect issues. +// However to get a greater confidence it is recommended to run this test in a loop: +// e.g. use something like: +// $ while jtreg -jdk:$JDK -verbose:all \ +// test/java/util/logging/TestLogConfigurationDeadLockWithConf.java ; \ +// do echo Running test again ; done +// and let it run for a few hours... +// +public class TestLogConfigurationDeadLockWithConf { + + static volatile Exception thrown = null; + static volatile boolean goOn = true; + + static final int READERS = 2; + static final int LOGGERS = 2; + static final long TIME = 4 * 1000; // 4 sec. + static final long STEP = 1 * 1000; // message every 1 sec. + static final int LCOUNT = 50; // 50 loggers created in a row... + static final AtomicLong nextLogger = new AtomicLong(0); + static final AtomicLong readCount = new AtomicLong(0); + static final AtomicLong checkCount = new AtomicLong(0); + + /** + * This test will run both with and without a security manager. + * + * The test starts a number of threads that will call + * LogManager.readConfiguration() concurrently (ReadConf), then starts + * a number of threads that will create new loggers concurrently + * (AddLogger), and then two additional threads: one (Stopper) that + * will stop the test after 4secs (TIME ms), and one DeadlockDetector + * that will attempt to detect deadlocks. + * If after 4secs no deadlock was detected and no exception was thrown + * then the test is considered a success and passes. + * + * This procedure is done twice: once without a security manager and once + * again with a security manager - which means the test takes ~8secs to + * run. + * + * Note that 8sec may not be enough to detect issues if there are some. + * This is a best effort test. + * + * @param args the command line arguments + * @throws java.lang.Exception if the test fails. + */ + public static void main(String[] args) throws Exception { + File config = new File(System.getProperty("test.src", "."), + "deadlockconf.properties"); + if (!config.canRead()) { + System.err.println("Can't read config file: test cannot execute."); + System.err.println("Please check your test environment: "); + System.err.println("\t -Dtest.src=" + System.getProperty("test.src", ".")); + System.err.println("\t config file is: " + config.getAbsolutePath()); + throw new RuntimeException("Can't read config file: " + + config.getAbsolutePath()); + } + + System.setProperty("java.util.logging.config.file", + config.getAbsolutePath()); + + // test without security + System.out.println("No security"); + test(); + + // test with security + System.out.println("\nWith security"); + Policy.setPolicy(new Policy() { + @Override + public boolean implies(ProtectionDomain domain, Permission permission) { + if (super.implies(domain, permission)) return true; + // System.out.println("Granting " + permission); + return true; // all permissions + } + }); + System.setSecurityManager(new SecurityManager()); + test(); + } + + static Random rand = new Random(System.currentTimeMillis()); + private static int getBarCount() { + return rand.nextInt(10); + } + + /** + * Starts all threads, wait 4secs, then stops all threads. + * @throws Exception if a deadlock was detected or an error occurred. + */ + public static void test() throws Exception { + goOn = true; + thrown = null; + long sNextLogger = nextLogger.get(); + long sReadCount = readCount.get(); + long sCheckCount = checkCount.get(); + List threads = new ArrayList<>(); + for (int i = 0; i deadlocked = Collections.synchronizedSet(new HashSet()); + + static List asList(long... ids) { + final List list = new ArrayList<>(ids.length); + for (long id : ids) { + list.add(id); + } + return list; + } + + @Override + public void run() { + while(goOn) { + try { + long[] ids = ManagementFactory.getThreadMXBean().findDeadlockedThreads(); + checkCount.incrementAndGet(); + ids = ids == null ? new long[0] : ids; + if (ids.length > 0) { + deadlocked.addAll(asList(ids)); + } + if (ids.length == 1) { + throw new RuntimeException("Found 1 deadlocked thread: "+ids[0]); + } else if (ids.length > 0) { + ThreadInfo[] infos = ManagementFactory.getThreadMXBean().getThreadInfo(ids, Integer.MAX_VALUE); + System.err.println("Found "+ids.length+" deadlocked threads: "); + for (ThreadInfo inf : infos) { + System.err.println(inf.toString()); + } + throw new RuntimeException("Found "+ids.length+" deadlocked threads"); + } + Thread.sleep(100); + } catch(InterruptedException | RuntimeException x) { + fail(x); + } + } + } + + } + + static final class Stopper extends Thread { + long start; + long time; + + static final Logger logger = Logger.getLogger("remaining"); + + Stopper(long time) { + start = System.currentTimeMillis(); + this.time = time; + } + + @Override + public void run() { + try { + long rest, previous; + previous = time; + while (goOn && (rest = start - System.currentTimeMillis() + time) > 0) { + if (previous == time || previous - rest >= STEP) { + logger.log(Level.INFO, + "{0}ms remaining...", String.valueOf(rest)); + previous = rest == time ? rest -1 : rest; + System.gc(); + } + if (goOn == false) break; + Thread.sleep(Math.min(rest, 100)); + } + System.out.println(System.currentTimeMillis() - start + + " ms elapsed ("+time+ " requested)"); + goOn = false; + } catch(InterruptedException | RuntimeException x) { + fail(x); + } + } + + } + + static void fail(Exception x) { + x.printStackTrace(); + if (thrown == null) { + thrown = x; + } + goOn = false; + } +} diff --git a/jdk/test/java/util/logging/deadlockconf.properties b/jdk/test/java/util/logging/deadlockconf.properties new file mode 100644 index 00000000000..e81742fa158 --- /dev/null +++ b/jdk/test/java/util/logging/deadlockconf.properties @@ -0,0 +1,22 @@ +# This file is used by TestLogConfigurationDeadLockWithConf +handlers= java.util.logging.ConsoleHandler +.level= INFO +java.util.logging.ConsoleHandler.level = INFO +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + + +foo.bar0.level = INFO +foo.bar1.level = INFO +foo.bar2.level = INFO +foo.bar3.level = INFO +foo.bar4.level = INFO + +# We leave foo.bar5 out so that we have at least +# one logger whose parent won't be in the configuration +# file +#foo.bar5.level = INFO + +foo.bar6.level = INFO +foo.bar7.level = INFO +foo.bar8.level = INFO +foo.bar9.level = INFO diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java index 5bf2876f366..c5d337e8539 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/CountTest.java @@ -29,7 +29,6 @@ package org.openjdk.tests.java.util.stream; -import java.util.concurrent.atomic.AtomicLong; import java.util.stream.DoubleStream; import java.util.stream.DoubleStreamTestDataProvider; import java.util.stream.IntStream; @@ -47,45 +46,41 @@ public class CountTest extends OpTestCase { @Test(dataProvider = "StreamTestData", dataProviderClass = StreamTestDataProvider.class) public void testOps(String name, TestData.OfRef data) { - AtomicLong expectedCount = new AtomicLong(); - data.stream().forEach(e -> expectedCount.incrementAndGet()); + long expectedCount = data.size(); withData(data). terminal(Stream::count). - expectedResult(expectedCount.get()). + expectedResult(expectedCount). exercise(); } @Test(dataProvider = "IntStreamTestData", dataProviderClass = IntStreamTestDataProvider.class) public void testOps(String name, TestData.OfInt data) { - AtomicLong expectedCount = new AtomicLong(); - data.stream().forEach(e -> expectedCount.incrementAndGet()); + long expectedCount = data.size(); withData(data). terminal(IntStream::count). - expectedResult(expectedCount.get()). + expectedResult(expectedCount). exercise(); } @Test(dataProvider = "LongStreamTestData", dataProviderClass = LongStreamTestDataProvider.class) public void testOps(String name, TestData.OfLong data) { - AtomicLong expectedCount = new AtomicLong(); - data.stream().forEach(e -> expectedCount.incrementAndGet()); + long expectedCount = data.size(); withData(data). terminal(LongStream::count). - expectedResult(expectedCount.get()). + expectedResult(expectedCount). exercise(); } @Test(dataProvider = "DoubleStreamTestData", dataProviderClass = DoubleStreamTestDataProvider.class) public void testOps(String name, TestData.OfDouble data) { - AtomicLong expectedCount = new AtomicLong(); - data.stream().forEach(e -> expectedCount.incrementAndGet()); + long expectedCount = data.size(); withData(data). terminal(DoubleStream::count). - expectedResult(expectedCount.get()). + expectedResult(expectedCount). exercise(); } } diff --git a/jdk/test/javax/imageio/metadata/GetObjectMinValue.java b/jdk/test/javax/imageio/metadata/GetObjectMinValue.java index b5d3f6fdfef..04094e3e041 100644 --- a/jdk/test/javax/imageio/metadata/GetObjectMinValue.java +++ b/jdk/test/javax/imageio/metadata/GetObjectMinValue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, 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,14 +24,12 @@ /* * @test * @bug 4429875 7186799 - * @compile -source 1.4 GetObjectMinValue.java + * @compile GetObjectMinValue.java * @run main GetObjectMinValue * @summary Tests the getObject{Min,Max}Value method of * IIOMetadataFormatImpl for an inclusive range */ -// Compiled with -source 1.4 to work around javac bug 5041233 - import javax.imageio.metadata.IIOMetadataFormatImpl; import javax.imageio.ImageTypeSpecifier; @@ -79,13 +77,13 @@ public class GetObjectMinValue { } public void addObjectValue(String elementName, - Class classType, Object defaultValue, + Class classType, Integer defaultValue, Comparable minValue, Comparable maxValue, boolean minInclusive, boolean maxInclusive) { - super.addObjectValue(elementName, - classType, defaultValue, - minValue, maxValue, - minInclusive, maxInclusive); + super.addObjectValue(elementName, + (Class)classType, defaultValue, + (Comparable) minValue, (Comparable) maxValue, + minInclusive, maxInclusive); } public boolean canNodeAppear(String elementName, diff --git a/jdk/test/javax/management/monitor/StartStopTest.java b/jdk/test/javax/management/monitor/StartStopTest.java index 98eca2976ba..80694c63e05 100644 --- a/jdk/test/javax/management/monitor/StartStopTest.java +++ b/jdk/test/javax/management/monitor/StartStopTest.java @@ -27,6 +27,8 @@ * @summary Test that tasks are cancelled properly when * monitors are started and stopped in a loop. * @author Luis-Miguel Alventosa + * @library /lib/testlibrary + * @run build jdk.testlibrary.Utils * @run clean StartStopTest * @run build StartStopTest * @run main/othervm/timeout=300 StartStopTest 1 @@ -52,14 +54,15 @@ import javax.management.monitor.Monitor; import javax.management.monitor.MonitorNotification; import javax.management.monitor.StringMonitor; -public class StartStopTest { +import jdk.testlibrary.Utils; +public class StartStopTest { static int maxPoolSize; static final AtomicInteger counter = new AtomicInteger(); // MBean class public class ObservedObject implements ObservedObjectMBean { - public boolean called = false; + volatile public boolean called = false; public Integer getInteger() { task("Integer"); return 0; @@ -142,7 +145,7 @@ public class StartStopTest { for (int i = 0; i < nTasks; i++) monitor[i].start(); echo(">>> MONITORS started"); - Thread.sleep(500); + doSleep(500); echo(">>> Check FLAGS true"); for (int i = 0; i < nTasks; i++) if (!monitored[i].called) { @@ -154,7 +157,7 @@ public class StartStopTest { for (int i = 0; i < nTasks; i++) monitor[i].stop(); echo(">>> MONITORS stopped"); - Thread.sleep(500); + doSleep(500); echo(">>> Set FLAGS to false"); for (int i = 0; i < nTasks; i++) monitored[i].called = false; @@ -208,4 +211,8 @@ public class StartStopTest { echo(">>> Happy Bye, Bye!"); } } + + private static void doSleep(long ms) throws Exception { + Thread.sleep(Math.round(ms * Utils.TIMEOUT_FACTOR)); + } } diff --git a/jdk/test/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java b/jdk/test/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java index 9155dbb6b32..27290738a0c 100644 --- a/jdk/test/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java +++ b/jdk/test/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, 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,7 +25,7 @@ * @test * @bug 4933700 * @summary Tests that default devices return MidiDeviceTransmitter/Receiver and returned objects return correct MidiDevice - * @compile -source 1.7 TestAllDevices.java + * @compile TestAllDevices.java * @run main TestAllDevices * @author Alex Menkov */ diff --git a/jdk/test/javax/sound/sampled/AudioFormat/PCM_FLOAT_support.java b/jdk/test/javax/sound/sampled/AudioFormat/PCM_FLOAT_support.java index 43d39fb8ead..7b4f0b1b8e7 100644 --- a/jdk/test/javax/sound/sampled/AudioFormat/PCM_FLOAT_support.java +++ b/jdk/test/javax/sound/sampled/AudioFormat/PCM_FLOAT_support.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, 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,7 +25,7 @@ * @test * @bug 6944033 * @summary Tests that PCM_FLOAT encoding is supported - * @compile -source 1.7 PCM_FLOAT_support.java + * @compile PCM_FLOAT_support.java * @run main PCM_FLOAT_support * @author Alex Menkov * diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java b/jdk/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java index 14599c998bd..f8a212e2bdb 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JcmdBase.java @@ -26,34 +26,91 @@ package jdk.testlibrary; import java.util.Arrays; /** - * Super class for tests which need to attach jcmd to the current process. + * Helper class for starting jcmd process. + *

    + * - jcmd will send diagnostic requests to the current java process:
    + *      jcmd pid_to_current_process PerfCounter.print
    + * - jcmd will be run without sending request to any JVM
    + *      jcmd -h
    + * 
    */ -public class JcmdBase { +public final class JcmdBase { private static ProcessBuilder processBuilder = new ProcessBuilder(); + private JcmdBase() { + // Private constructor to prevent class instantiation + } + /** - * Attach jcmd to the current process + * Sends the diagnostic command request to the current process * - * @param toolArgs - * jcmd command line parameters, e.g. VM.flags - * @return jcmd output + * @see #jcmd(boolean, String[], String[]) + */ + public final static OutputAnalyzer jcmd(String... jcmdArgs) + throws Exception { + return jcmd(true, null, jcmdArgs); + } + + /** + * Sends the diagnostic command request to the current process. + * jcmd will be run with specified {@code vmArgs}. + * + * @see #jcmd(boolean, String[], String[]) + */ + public final static OutputAnalyzer jcmd(String[] vmArgs, + String[] jcmdArgs) throws Exception { + return jcmd(true, vmArgs, jcmdArgs); + } + + /** + * Runs jcmd without sending request to any JVM + * + * @see #jcmd(boolean, String[], String[]) + */ + public final static OutputAnalyzer jcmdNoPid(String[] vmArgs, + String[] jcmdArgs) throws Exception { + return jcmd(false, vmArgs, jcmdArgs); + } + + /** + * If {@code requestToCurrentProcess} is {@code true} + * sends a diagnostic command request to the current process. + * If {@code requestToCurrentProcess} is {@code false} + * runs jcmd without sending request to any JVM. + * + * @param requestToCurrentProcess + * Defines if jcmd will send request to the current process + * @param vmArgs + * jcmd will be run with VM arguments specified, + * e.g. -XX:+UsePerfData + * @param jcmdArgs + * jcmd will be run with option or command and its arguments + * specified, e.g. VM.flags + * @return The output from {@link OutputAnalyzer} object * @throws Exception */ - public final static OutputAnalyzer jcmd(String... toolArgs) - throws Exception { + private static final OutputAnalyzer jcmd(boolean requestToCurrentProcess, + String[] vmArgs, String[] jcmdArgs) throws Exception { JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jcmd"); - launcher.addToolArg(Integer.toString(ProcessTools.getProcessId())); - for (String toolArg : toolArgs) { - launcher.addToolArg(toolArg); + if (vmArgs != null) { + for (String vmArg : vmArgs) { + launcher.addVMArg(vmArg); + } + } + if (requestToCurrentProcess) { + launcher.addToolArg(Integer.toString(ProcessTools.getProcessId())); + } + if (jcmdArgs != null) { + for (String toolArg : jcmdArgs) { + launcher.addToolArg(toolArg); + } } processBuilder.command(launcher.getCommand()); System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", "")); OutputAnalyzer output = new OutputAnalyzer(processBuilder.start()); System.out.println(output.getOutput()); - output.shouldHaveExitValue(0); - return output; } diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java index d4cbd27fa9b..602df9f0143 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java @@ -23,7 +23,11 @@ package jdk.testlibrary; +import static jdk.testlibrary.Asserts.*; + import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -394,4 +398,99 @@ public final class OutputAnalyzer { public int getExitValue() { return exitValue; } + + /** + * Get the contents of the output buffer (stdout and stderr) as list of strings. + * Output will be split by system property 'line.separator'. + * + * @return Contents of the output buffer as list of strings + */ + public List asLines() { + List l = new ArrayList<>(); + String[] a = getOutput().split(Utils.NEW_LINE); + for (String string : a) { + l.add(string); + } + return l; + } + + /** + * Check if there is a line matching {@code pattern} and return its index + * + * @param pattern Matching pattern + * @return Index of first matching line + */ + private int indexOf(List lines, String pattern) { + for (int i = 0; i < lines.size(); i++) { + if (lines.get(i).matches(pattern)) { + return i; + } + } + return -1; + } + + /** + * @see #shouldMatchByLine(String, String, String) + */ + public int shouldMatchByLine(String pattern) { + return shouldMatchByLine(null, null, pattern); + } + + /** + * @see #shouldMatchByLine(String, String, String) + */ + public int shouldMatchByLineFrom(String from, String pattern) { + return shouldMatchByLine(from, null, pattern); + } + + /** + * @see #shouldMatchByLine(String, String, String) + */ + public int shouldMatchByLineTo(String to, String pattern) { + return shouldMatchByLine(null, to, pattern); + } + + /** + * Verify that the stdout and stderr contents of output buffer match the + * {@code pattern} line by line. The whole output could be matched or + * just a subset of it. + * + * @param from + * The line from where output will be matched. + * Set {@code from} to null for matching from the first line. + * @param to + * The line until where output will be matched. + * Set {@code to} to null for matching until the last line. + * @param pattern + * Matching pattern + * @return Count of lines which match the {@code pattern} + */ + public int shouldMatchByLine(String from, String to, String pattern) { + List lines = asLines(); + + int fromIndex = 0; + if (from != null) { + fromIndex = indexOf(lines, from); + assertGreaterThan(fromIndex, -1, + "The line/pattern '" + from + "' from where the output should match can not be found"); + } + + int toIndex = lines.size(); + if (to != null) { + toIndex = indexOf(lines, to); + assertGreaterThan(toIndex, -1, + "The line/pattern '" + to + "' until where the output should match can not be found"); + } + + List subList = lines.subList(fromIndex, toIndex); + int matchedCount = 0; + for (String line : subList) { + assertTrue(line.matches(pattern), + "The line '" + line + "' does not match pattern '" + pattern + "'"); + matchedCount++; + } + + return matchedCount; + } + } diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java index a454ce5c9b7..c949e0f6c11 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java @@ -32,6 +32,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collections; +import java.util.concurrent.CountDownLatch; import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -39,6 +40,7 @@ import java.util.concurrent.Phaser; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Predicate; +import java.util.function.Consumer; import sun.management.VMManagement; @@ -69,10 +71,38 @@ public final class ProcessTools { */ public static Process startProcess(String name, ProcessBuilder processBuilder) + throws IOException { + return startProcess(name, processBuilder, null); + } + + /** + *

    Starts a process from its builder.

    + * The default redirects of STDOUT and STDERR are started + *

    It is possible to monitor the in-streams via the provided {@code consumer} + * @param name The process name + * @param consumer {@linkplain Consumer} instance to process the in-streams + * @param processBuilder The process builder + * @return Returns the initialized process + * @throws IOException + */ + public static Process startProcess(String name, + ProcessBuilder processBuilder, + Consumer consumer) throws IOException { Process p = null; try { - p = startProcess(name, processBuilder, null, -1, TimeUnit.NANOSECONDS); + p = startProcess( + name, + processBuilder, + line -> { + if (consumer != null) { + consumer.accept(line); + } + return false; + }, + -1, + TimeUnit.NANOSECONDS + ); } catch (InterruptedException | TimeoutException e) { // can't ever happen } @@ -111,25 +141,28 @@ public final class ProcessTools { stdout.addPump(new LineForwarder(name, System.out)); stderr.addPump(new LineForwarder(name, System.err)); - final Phaser phs = new Phaser(1); + CountDownLatch latch = new CountDownLatch(1); if (linePredicate != null) { - stdout.addPump(new StreamPumper.LinePump() { + StreamPumper.LinePump pump = new StreamPumper.LinePump() { @Override protected void processLine(String line) { - if (linePredicate.test(line)) { - if (phs.getRegisteredParties() > 0) { - phs.arriveAndDeregister(); - } + if (latch.getCount() > 0 && linePredicate.test(line)) { + latch.countDown(); } } - }); + }; + stdout.addPump(pump); + stderr.addPump(pump); } Future stdoutTask = stdout.process(); Future stderrTask = stderr.process(); try { if (timeout > -1) { - phs.awaitAdvanceInterruptibly(0, timeout, unit); + long realTimeout = Math.round(timeout * Utils.TIMEOUT_FACTOR); + if (!latch.await(realTimeout, unit)) { + throw new TimeoutException(); + } } } catch (TimeoutException | InterruptedException e) { System.err.println("Failed to start a process (thread dump follows)"); diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java index d557a7ef439..7d4687ee88f 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java @@ -25,6 +25,9 @@ package jdk.testlibrary; import static jdk.testlibrary.Asserts.assertTrue; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; import java.io.IOException; import java.net.InetAddress; import java.net.ServerSocket; @@ -56,6 +59,15 @@ public final class Utils { */ public static final String JAVA_OPTIONS = System.getProperty("test.java.opts", "").trim(); + /** + * Returns the value of 'test.timeout.factor' system property + * converted to {@code double}. + */ + public static final double TIMEOUT_FACTOR; + static { + String toFactor = System.getProperty("test.timeout.factor", "1.0"); + TIMEOUT_FACTOR = Double.parseDouble(toFactor); + } private Utils() { // Private constructor to prevent class instantiation @@ -203,7 +215,6 @@ public final class Utils { * @throws Exception If multiple matching jvms are found. */ public static int tryFindJvmPid(String key) throws Throwable { - ProcessBuilder pb = null; OutputAnalyzer output = null; try { JDKToolLauncher jcmdLauncher = JDKToolLauncher.create("jcmd"); @@ -229,4 +240,24 @@ public final class Utils { throw t; } } + + /** + * Returns file content as a list of strings + * + * @param file File to operate on + * @return List of strings + * @throws IOException + */ + public static List fileAsList(File file) throws IOException { + assertTrue(file.exists() && file.isFile(), + file.getAbsolutePath() + " does not exist or not a file"); + List output = new ArrayList<>(); + try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsolutePath()))) { + while (reader.ready()) { + output.add(reader.readLine().replace(NEW_LINE, "")); + } + } + return output; + } + } diff --git a/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java b/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java index 620b828caba..83e63f8565a 100644 --- a/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java +++ b/jdk/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2014, 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 @@ -28,7 +28,7 @@ * * @author Daniel Fuchs * - * @run compile -XDignore.symbol.file=true -source 1.6 -g LocalRMIServerSocketFactoryTest.java + * @run compile -XDignore.symbol.file=true -g LocalRMIServerSocketFactoryTest.java * @run main LocalRMIServerSocketFactoryTest */ @@ -44,6 +44,7 @@ public class LocalRMIServerSocketFactoryTest { private static final SynchronousQueue queue = new SynchronousQueue(); + private static volatile boolean isRunning = true; static final class Result extends Exception { @@ -91,19 +92,23 @@ public class LocalRMIServerSocketFactoryTest { Thread t = new Thread() { public void run() { - while (true) { + while (isRunning) { Exception error = Result.SUCCESS; try { System.err.println("Accepting: "); final Socket ss = s.accept(); System.err.println(ss.getInetAddress() + " accepted"); } catch (Exception x) { - x.printStackTrace(); + if (isRunning) { + x.printStackTrace(); + } error = x; } finally { try { - // wait for the client to get the exception. - queue.put(error); + if (isRunning) { + // wait for the client to get the exception. + queue.put(error); + } } catch (Exception x) { // too bad! System.err.println("Could't send result to client!"); @@ -114,32 +119,38 @@ public class LocalRMIServerSocketFactoryTest { } } }; - t.setDaemon(true); - t.start(); - System.err.println("new Socket((String)null, port)"); - final Socket s1 = new Socket((String) null, port); - checkError("new Socket((String)null, port)"); - s1.close(); - System.err.println("new Socket((String)null, port): PASSED"); + try { + t.start(); - System.err.println("new Socket(InetAddress.getByName(null), port)"); - final Socket s2 = new Socket(InetAddress.getByName(null), port); - checkError("new Socket(InetAddress.getByName(null), port)"); - s2.close(); - System.err.println("new Socket(InetAddress.getByName(null), port): PASSED"); + System.err.println("new Socket((String)null, port)"); + final Socket s1 = new Socket((String) null, port); + checkError("new Socket((String)null, port)"); + s1.close(); + System.err.println("new Socket((String)null, port): PASSED"); - System.err.println("new Socket(localhost, port)"); - final Socket s3 = new Socket("localhost", port); - checkError("new Socket(localhost, port)"); - s3.close(); - System.err.println("new Socket(localhost, port): PASSED"); + System.err.println("new Socket(InetAddress.getByName(null), port)"); + final Socket s2 = new Socket(InetAddress.getByName(null), port); + checkError("new Socket(InetAddress.getByName(null), port)"); + s2.close(); + System.err.println("new Socket(InetAddress.getByName(null), port): PASSED"); - System.err.println("new Socket(127.0.0.1, port)"); - final Socket s4 = new Socket("127.0.0.1", port); - checkError("new Socket(127.0.0.1, port)"); - s4.close(); - System.err.println("new Socket(127.0.0.1, port): PASSED"); + System.err.println("new Socket(localhost, port)"); + final Socket s3 = new Socket("localhost", port); + checkError("new Socket(localhost, port)"); + s3.close(); + System.err.println("new Socket(localhost, port): PASSED"); + System.err.println("new Socket(127.0.0.1, port)"); + final Socket s4 = new Socket("127.0.0.1", port); + checkError("new Socket(127.0.0.1, port)"); + s4.close(); + System.err.println("new Socket(127.0.0.1, port): PASSED"); + } + finally { + isRunning = false; + s.close(); + t.join(); + } } } diff --git a/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java b/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java index 3b98056a98f..ca448159cd1 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java +++ b/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java @@ -91,6 +91,12 @@ public class CustomLauncherTest { return; } + if (getPlatform() == null) { + System.out.println("Test not designed to run on this operating " + + "system (" + OSNAME + "), skipping..."); + return; + } + final FileSystem FS = FileSystems.getDefault(); Path libjvmPath = findLibjvm(FS); @@ -223,8 +229,7 @@ public class CustomLauncherTest { break; } default: { - System.out.println("Test not designed to run on this operating " + - "system (" + OSNAME + "), skipping..."); + platform = null; } } diff --git a/jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh b/jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh index 570631dc11e..4d1d6e8f93d 100644 --- a/jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh +++ b/jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh @@ -34,12 +34,13 @@ OS=`uname -s` UMASK=`umask` -if [[ $OS == CYGWIN_NT* ]] ; then +case $OS in +CYGWIN_NT*) OS="Windows_NT" if [ -z "$SystemRoot" ] ; then - SystemRoot=$SYSTEMROOT + SystemRoot=$SYSTEMROOT fi -fi +esac case $OS in SunOS | Linux | Darwin) diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java index 98b759ea79a..e6b1f43a752 100644 --- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java +++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java @@ -21,37 +21,20 @@ * questions. */ -import java.io.File; +import java.io.IOException; +import jdk.testlibrary.ProcessTools; public class JMXStartStopDoSomething { - - private static final String lockFileName = "JMXStartStop.lck"; - - public static void doSomething() { - try { - File lockFile = new File(lockFileName); - lockFile.createNewFile(); - - while(lockFile.exists()) { - long datetime = lockFile.lastModified(); - long epoch = System.currentTimeMillis()/1000; - - // Don't allow test app to run more than an hour - if (epoch - datetime > 3600) { - System.err.println("Lock is too old. Aborting"); - return; - } - Thread.sleep(500); - } - - } catch (Throwable e) { - System.err.println("Something bad happens:" +e); - } + public static void doSomething() throws IOException{ + int r = System.in.read(); + System.out.println("read: " + r); } public static void main(String args[]) throws Exception { - System.err.println("main enter"); + System.out.println("pid:" + ProcessTools.getProcessId()); + System.out.println("main enter"); + System.out.flush(); doSomething(); - System.err.println("main exit"); + System.out.println("main exit"); } } diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java index 4f97477b02b..65f4a3a33aa 100644 --- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java +++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java @@ -22,45 +22,60 @@ */ import java.io.File; -import java.io.FileInputStream; -import java.io.FilenameFilter; import java.io.IOException; -import java.io.InputStream; +import java.lang.reflect.Method; +import java.net.ConnectException; +import java.rmi.NoSuchObjectException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.util.ArrayList; import java.util.Arrays; -import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; -import java.util.Properties; +import java.util.Objects; import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; import javax.management.*; import javax.management.remote.*; +import javax.net.ssl.SSLHandshakeException; -import sun.management.AgentConfigurationError; -import sun.management.jmxremote.ConnectorBootstrap; +import jdk.testlibrary.ProcessTools; +import jdk.testlibrary.JDKToolLauncher; +/** + * @test + * @bug 7110104 + * @library /lib/testlibrary + * @build jdk.testlibrary.ProcessTools + * @build jdk.testlibrary.JDKToolLauncher + * @build jdk.testlibrary.Utils + * @build JMXStartStopTest JMXStartStopDoSomething + * @run main/othervm JMXStartStopTest + * @summary Makes sure that enabling/disabling the management agent through + * JCMD achieves the desired results + */ public class JMXStartStopTest { + private static final String TEST_JDK = System.getProperty("test.jdk"); + private static final String TEST_SRC = System.getProperty("test.src"); - static boolean verbose = false; + private static final boolean verbose = false; - static void dbg_print(String msg){ + private static void dbg_print(String msg){ if (verbose) { - System.err.println("DBG: " +msg); + System.out.println("DBG: " +msg); } } - static void dbg_print(String msg, Throwable ex){ - if (verbose) { - System.err.println("DBG: " + msg + " " + ex.getMessage() ); - ex.printStackTrace(System.err); - } - } - - public static int listMBeans(MBeanServerConnection server, ObjectName pattern, QueryExp query) + private static int listMBeans(MBeanServerConnection server, + ObjectName pattern, + QueryExp query) throws Exception { Set names = server.queryNames(pattern,query); @@ -72,10 +87,9 @@ public class JMXStartStopTest { MBeanAttributeInfo[] attrs = info.getAttributes(); if (attrs == null) continue; - - for (int j=0; j 0) { - port = Integer.parseInt(args[0]); - } dbg_print("Using port: " + port); - int rmiPort = 0; - if (args != null && args.length > 1) { - rmiPort = Integer.parseInt(args[1]); - } dbg_print("Using rmi port: " + rmiPort); Registry registry = LocateRegistry.getRegistry(port); @@ -140,8 +173,13 @@ public class JMXStartStopTest { } String jmxUrlStr = (rmiPort != 0) ? - String.format("service:jmx:rmi://localhost:%d/jndi/rmi://localhost:%d/jmxrmi", rmiPort, port) : - String.format("service:jmx:rmi:///jndi/rmi://localhost:%d/jmxrmi",port); + String.format( + "service:jmx:rmi://localhost:%d/jndi/rmi://localhost:%d/jmxrmi", + rmiPort, + port) : + String.format( + "service:jmx:rmi:///jndi/rmi://localhost:%d/jmxrmi", + port); JMXServiceURL url = new JMXServiceURL(jmxUrlStr); Map m = new HashMap(); @@ -153,29 +191,632 @@ public class JMXStartStopTest { int count = listMBeans(conn,pattern,null); if (count == 0) - throw new Exception("Expected at least one matching "+ "MBean for "+pattern); + throw new Exception("Expected at least one matching " + + "MBean for " + pattern); } + private static class Failure { + private final Throwable cause; + private final String msg; - public static void main(String args[]) { - JMXStartStopTest manager = new JMXStartStopTest(); - try { - if (args!=null && args[0].equals("local")) { - manager.run_local(args[1]); - } else { - manager.run(args); - } - } catch (RuntimeException r) { - dbg_print("No connection: ", r); - System.out.print("NO_CONN"); - System.exit(1); - } catch (Throwable t) { - dbg_print("No connection: ", t); - System.out.print("NO_CONN"); - System.exit(2); + public Failure(Throwable cause, String msg) { + this.cause = cause; + this.msg = msg; + } + + public Failure(String msg) { + this(null, msg); + } + + public Throwable getCause() { + return cause; + } + + public String getMsg() { + return msg; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.cause); + hash = 97 * hash + Objects.hashCode(this.msg); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Failure other = (Failure) obj; + if (!Objects.equals(this.cause, other.cause)) { + return false; + } + if (!Objects.equals(this.msg, other.msg)) { + return false; + } + return true; + } + + @Override + public String toString() { + if (cause != null) { + return msg + "\n" + cause; + } else { + return msg; + } } - System.out.print("OK_CONN"); - System.exit(0); } + private static List failures = new ArrayList<>(); + + public static void main(String args[]) throws Exception { + for (int i=0;i<3;i++) { + System.out.println("=== PASS " + i + " ==="); + for (Method m : JMXStartStopTest.class.getDeclaredMethods()) { + if (m.getName().startsWith("test_")) { + try { + m.invoke(null); + System.out.println("=== PASSED\n"); + } catch (Throwable e) { + failures.add(new Failure(e, m.getName() + " failed")); + } + } + } + + if (!failures.isEmpty()) { + for(Failure f : failures) { + System.err.println(f.getMsg()); + f.getCause().printStackTrace(System.err); + } + throw new Error(); + } + } + } + + /** + * Retrieves the PID of the test application using JCMD + * @return The PID of the test application + * @throws InterruptedException + * @throws IOException + */ + private static String getPID() throws InterruptedException, IOException { + final AtomicReference pid = new AtomicReference<>(); + jcmd( + null, + line -> { + if (line.endsWith("JMXStartStopDoSomething")) { + pid.set(line.split(" ")[0]); + } + } + ); + return pid.get(); + } + + private static class Something { + private Process p; + private final ProcessBuilder pb; + private final String name; + private final AtomicBoolean started = new AtomicBoolean(false); + private volatile int pid = -1; + + public Something(ProcessBuilder pb, String name) { + this.pb = pb; + this.name = name; + } + + public synchronized void start() throws InterruptedException, IOException, TimeoutException { + if (started.compareAndSet(false, true)) { + try { + p = ProcessTools.startProcess( + "JMXStartStopDoSomething", + pb, + (line) -> { + if (line.toLowerCase().startsWith("pid:")) { + pid = Integer.parseInt(line.split("\\:")[1]); + } + return line.equals("main enter"); + }, + 5, + TimeUnit.SECONDS + ); + } catch (TimeoutException e) { + p.destroy(); + p.waitFor(); + throw e; + } + } + } + + public int getPid() { + return pid; + } + + public synchronized void stop() + throws IOException, InterruptedException { + if (started.compareAndSet(true, false)) { + p.getOutputStream().write(0); + p.getOutputStream().flush(); + int ec = p.waitFor(); + if (ec != 0) { + StringBuilder msg = new StringBuilder(); + msg.append("Test application '").append(name); + msg.append("' failed with exit code: "); + msg.append(ec); + + failures.add(new Failure(msg.toString())); + } + } + } + } + + /** + * Runs the test application "JMXStartStopDoSomething" + * @param name Test run name + * @param args Additional arguments + * @return Returns a {@linkplain Something} instance representing the run + * @throws IOException + * @throws InterruptedException + * @throws TimeoutException + */ + private static Something doSomething(String name, String ... args) + throws Exception { + List pbArgs = new ArrayList<>(Arrays.asList( + "-cp", + System.getProperty("test.class.path") + )); + pbArgs.addAll(Arrays.asList(args)); + pbArgs.add("JMXStartStopDoSomething"); + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + pbArgs.toArray(new String[pbArgs.size()]) + ); + Something s = new Something(pb, name); + s.start(); + return s; + } + + /** + * Run the "jcmd" command + * + * @param command Command with parameters; space separated string + * @throws IOException + * @throws InterruptedException + */ + private static void jcmd(String ... command) throws IOException, InterruptedException { + if (command.length == 0) { + jcmd(null, (Consumer)null); + } else { + jcmd(null, command); + } + } + + /** + * Run the "jcmd" command + * + * @param c {@linkplain Consumer} instance; may be null + * @param command Command with parameters; space separated string + * @throws IOException + * @throws InterruptedException + */ + private static void jcmd(Consumer c, String ... command) throws IOException, InterruptedException { + jcmd("JMXStartStopDoSomething", c, command); + } + + /** + * Run the "jcmd" command + * @param target The target application name (or PID) + * @param c {@linkplain Consumer} instance; may be null + * @param command Command with parameters; space separated string + * @throws IOException + * @throws InterruptedException + */ + private static void jcmd(String target, final Consumer c, String ... command) throws IOException, InterruptedException { + dbg_print("[jcmd] " + (command.length > 0 ? command[0] : "list")); + + JDKToolLauncher l = JDKToolLauncher.createUsingTestJDK("jcmd"); + l.addToolArg(target); + for(String cmd : command) { + l.addToolArg(cmd); + } + Process p = ProcessTools.startProcess( + "jcmd", + new ProcessBuilder(l.getCommand()), + c + ); + + p.waitFor(); + dbg_print("[jcmd] --------"); + } + + private static final String CMD_STOP = "ManagementAgent.stop"; + private static final String CMD_START= "ManagementAgent.start"; + private static final String CMD_START_LOCAL = "ManagementAgent.start_local"; + private static final int port1 = 50234; + private static final int port2 = 50235; + + private static void test_01() throws Exception { + // Run an app with JMX enabled stop it and + // restart on other port + + System.out.println("**** Test one ****"); + + Something s = doSomething( + "test_01", + "-Dcom.sun.management.jmxremote.port=" + port1, + "-Dcom.sun.management.jmxremote.authenticate=false", + "-Dcom.sun.management.jmxremote.ssl=false"); + + try { + testConnect(port1); + + jcmd(CMD_STOP); + testNoConnect(port1); + + jcmd(CMD_START, "jmxremote.port=" + port2); + testConnect(port2); + } finally { + s.stop(); + } + } + + private static void test_02() throws Exception { + // Run an app without JMX enabled + // start JMX by jcmd + + System.out.println("**** Test two ****"); + + Something s = doSomething("test_02"); + try { + jcmd(CMD_START, + "jmxremote.port=" + port1, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + + testConnect(port1); + } finally { + s.stop(); + } + } + + private static void test_03() throws Exception { + // Run an app without JMX enabled + // start JMX by jcmd on one port than on other one + + System.out.println("**** Test three ****"); + + Something s = doSomething("test_03"); + try { + jcmd(CMD_START, + "jmxremote.port=" + port1, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + + // Second agent shouldn't start + jcmd(CMD_START, + "jmxremote.port=" + port2, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + + // First agent should connect + testConnect(port1); + + // Second agent should not connect + testNoConnect(port2); + } finally { + s.stop(); + } + } + + private static void test_04() throws Exception { + // Run an app without JMX enabled + // start JMX by jcmd on one port, specify rmi port explicitly + + System.out.println("**** Test four ****"); + + Something s = doSomething("test_04"); + + try { + jcmd(CMD_START, + "jmxremote.port=" + port1, + "jmxremote.rmi.port=" + port2, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + + testConnect(port1, port2); + } finally { + s.stop(); + } + } + + private static void test_05() throws Exception { + // Run an app without JMX enabled, it will enable local server + // but should leave remote server disabled + + System.out.println("**** Test five ****"); + + Something s = doSomething("test_05"); + try { + jcmd(CMD_START_LOCAL); + + testNoConnect(port1); + testConnectLocal(s.getPid()); + } finally { + s.stop(); + } + } + + private static void test_06() throws Exception { + // Run an app without JMX enabled + // start JMX by jcmd on one port, specify rmi port explicitly + // attempt to start it again + // 1) with the same port + // 2) with other port + // 3) attempt to stop it twice + // Check for valid messages in the output + + System.out.println("**** Test six ****"); + + Something s = doSomething("test_06"); + + try { + jcmd(CMD_START, + "jmxremote.port=" + port1, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + + testConnect(port1, port2); + + final boolean[] checks = new boolean[3]; + jcmd( + line -> { + if (line.equals("java.lang.RuntimeException: Invalid agent state")) { + checks[0] = true; + } + }, + CMD_START, + "jmxremote.port=" + port1, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + + jcmd( + line -> { + if (line.equals("java.lang.RuntimeException: Invalid agent state")) { + checks[1] = true; + } + }, + CMD_START, + "jmxremote.port=" + port2, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + + jcmd(CMD_STOP); + jcmd(CMD_STOP); + + jcmd( + line -> { + if (line.contains("Port already in use: 22")) { + checks[2] = true; + } + }, + CMD_START, + "jmxremote.port=22", + "jmxremote.rmi.port=" + port2, + "jmxremote.authenticate=false", + "jmxremote.ssl=false"); + if (!checks[0]) { + throw new Exception("Starting agent on port " + port1 + " should " + + "report an invalid agent state"); + } + if (!checks[1]) { + throw new Exception("Starting agent on poprt " + port2 + " should " + + "report an invalid agent state"); + } + if (!checks[2]) { + throw new Exception("Starting agent on port 22 should " + + "report port in use"); + } + } finally { + s.stop(); + } + } + + private static void test_07() throws Exception { + // Run an app without JMX enabled, but with some properties set + // in command line. + // make sure these properties overriden corectly + + System.out.println("**** Test seven ****"); + + Something s = doSomething( + "test_07", + "-Dcom.sun.management.jmxremote.authenticate=false", + "-Dcom.sun.management.jmxremote.ssl=true"); + + try { + testNoConnect(port1); + jcmd( + CMD_START, + "jmxremote.port=" + port2, + "jmxremote.authenticate=false", + "jmxremote.ssl=false" + ); + testConnect(port2); + } finally { + s.stop(); + } + } + + private static void test_08() throws Exception { + // Run an app with JMX enabled and with some properties set + // in command line. + // stop JMX agent and then start it again with different property values + // make sure these properties overriden corectly + + System.out.println("**** Test eight ****"); + + Something s = doSomething( + "test_08", + "-Dcom.sun.management.jmxremote.port=" + port1, + "-Dcom.sun.management.jmxremote.authenticate=false", + "-Dcom.sun.management.jmxremote.ssl=true"); + + try { + testNoConnect(port1); + + jcmd(CMD_STOP); + + testNoConnect(port1); + + jcmd( + CMD_START, + "jmxremote.port=" + port2, + "jmxremote.authenticate=false", + "jmxremote.ssl=false" + ); + + testConnect(port2); + } finally { + s.stop(); + } + } + + private static void test_09() throws Exception { + // Run an app with JMX enabled and with some properties set + // in command line. + // stop JMX agent and then start it again with different property values + // specifing some property in management config file and some of them + // in command line + // make sure these properties overriden corectly + + System.out.println("**** Test nine ****"); + + Something s = doSomething("test_09", + "-Dcom.sun.management.config.file=" + + TEST_SRC + File.separator + "management_cl.properties", + "-Dcom.sun.management.jmxremote.authenticate=false" + ); + + try { + testNoConnect(port1); + + jcmd(CMD_STOP); + + testNoConnect(port1); + + jcmd(CMD_START, + "config.file=" + TEST_SRC + File.separator + + "management_jcmd.properties", + "jmxremote.authenticate=false", + "jmxremote.port=" + port2 + ); + + testConnect(port2); + } finally { + s.stop(); + } + } + + private static void test_10() throws Exception { + // Run an app with JMX enabled and with some properties set + // in command line. + // stop JMX agent and then start it again with different property values + // stop JMX agent again and then start it without property value + // make sure these properties overriden corectly + + System.out.println("**** Test ten ****"); + + Something s = doSomething( + "test_10", + "-Dcom.sun.management.jmxremote.port=" + port1, + "-Dcom.sun.management.jmxremote.authenticate=false", + "-Dcom.sun.management.jmxremote.ssl=true"); + + try { + testNoConnect(port1); + + jcmd(CMD_STOP); + jcmd(CMD_START, + "jmxremote.ssl=false", + "jmxremote.port=" + port1 + ); + testConnect(port1); + + jcmd(CMD_STOP); + jcmd(CMD_START, + "jmxremote.port=" + port1 + ); + + testNoConnect(port1); + } finally { + s.stop(); + } + } + + private static void test_11() throws Exception { + // Run an app with JMX enabled + // stop remote agent + // make sure local agent is not affected + + System.out.println("**** Test eleven ****"); + + Something s = doSomething( + "test_11", + "-Dcom.sun.management.jmxremote.port=" + port1, + "-Dcom.sun.management.jmxremote.authenticate=false", + "-Dcom.sun.management.jmxremote.ssl=false"); + try { + testConnect(port1); + jcmd(CMD_STOP); + testConnectLocal(s.getPid()); + } finally { + s.stop(); + } + } + + private static void test_12() throws Exception { + // Run an app with JMX disabled + // start local agent only + + System.out.println("**** Test twelve ****"); + + Something s = doSomething("test_12"); + + try { + testNoConnect(port1); + jcmd(CMD_START + "_local"); + + testConnectLocal(s.getPid()); + + } finally { + s.stop(); + } + } + + private static void test_13() throws Exception { + // Run an app with -javaagent make sure it works as expected - + // system properties are ignored + + System.out.println("**** Test fourteen ****"); + + String agent = TEST_JDK + "/jre/lib/management-agent.jar"; + if (!new File(agent).exists()) { + agent = TEST_JDK + "/lib/management-agent.jar"; + } + + Something s = doSomething("test_14", + "-javaagent:" + agent + "=com.sun.management.jmxremote.port=" + + port1 + ",com.sun.management.jmxremote.authenticate=false", + "-Dcom.sun.management.jmxremote.ssl=false" + ); + + try { + testNoConnect(port1); + } finally { + s.stop(); + } + } } diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh deleted file mode 100644 index 4d672166211..00000000000 --- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh +++ /dev/null @@ -1,579 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2011, 2012, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. - -# @test -# @bug 7110104 -# @build JMXStartStopTest JMXStartStopDoSomething -# @run shell JMXStartStopTest.sh --jtreg --no-compile -# @summary No word Failed expected in the test output - -_server=no -_jtreg=no -_compile=yes -_testsuite="01,02,03,04,05,06,07,08,09,10,11,12,13" -_port_one=50234 -_port_two=50235 - - -_testclasses=".classes" -_testsrc=`pwd` - -_logname=".classes/output.txt" -_lockFileName="JMXStartStop.lck" - -_compile(){ - - if [ ! -d ${_testclasses} ] - then - mkdir -p ${_testclasses} - fi - - rm -f ${_testclasses}/JMXStartStopTest.class - - # Compile testcase - ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${_testclasses} \ - JMXStartStopDoSomething.java JMXStartStopTest.java - - if [ ! -f ${_testclasses}/JMXStartStopTest.class ] - then - echo "ERROR: Can't compile" - exit -1 - fi -} - -_app_start(){ - ${TESTJAVA}/bin/java ${TESTVMOPTS} $* -cp ${_testclasses} JMXStartStopDoSomething >> ${_logname} 2>&1 & - - x=0 - while [ ! -f ${_lockFileName} ] - do - if [ $x -gt 20 ] - then - echo "ERROR: Test app not started" - if [ "${_jtreg}" = "yes" ] - then - exit -1 - fi - fi - - echo "Waiting JMXStartStopDoSomething to start: $x" - x=`expr $x + 1` - sleep 1 - done -} - -_get_pid(){ - ${COMPILEJAVA}/bin/jps ${TESTTOOLVMOPTS} | sed -n "/JMXStartStopDoSomething/s/ .*//p" -} - -_app_stop(){ - rm ${_lockFileName} - - # wait until VM is actually shuts down - while true - do - npid=`_get_pid` - if [ "${npid}" = "" ] - then - break - fi - sleep 1 - done -} - -_exit_on_jtreg(){ - # Stop on first failed test under jtreg - if [ "${_jtreg}" = "yes" ] - then - _app_stop - exit -1 - fi -} - -_testme(){ - ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${_testclasses} JMXStartStopTest $* -} - - -_jcmd(){ - ${TESTJAVA}/bin/jcmd ${TESTTOOLVMOPTS} JMXStartStopDoSomething $* > /dev/null 2>/dev/null -} - -_echo(){ - echo "$*" - echo "$*" >> ${_logname} -} - -# ============= TESTS ====================================== - -test_01(){ -# Run an app with JMX enabled stop it and -# restart on other port - - _echo "**** Test one ****" - - _app_start -Dcom.sun.management.jmxremote.port=$1 \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=false - - res1=`_testme $1` - - _jcmd ManagementAgent.stop - - res2=`_testme $1` - - _jcmd ManagementAgent.start jmxremote.port=$2 - - res3=`_testme $2` - - if [ "${res1}" = "OK_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(OK):${res1} r2(NO):${res2} r3(OK):${res3}" - _exit_on_jtreg - fi - - _app_stop -} - -test_02(){ -# Run an app without JMX enabled -# start JMX by jcmd - - _echo "**** Test two ****" - _app_start - - _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false - - res1=`_testme $1` - - if [ "${res1}" = "OK_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(OK):${res1}" - _exit_on_jtreg - fi - _app_stop -} - -test_03(){ -# Run an app without JMX enabled -# start JMX by jcmd on one port than on other one - - _echo "**** Test three ****" - _app_start - - _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false - -# Second agent shouldn't start - _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false - -# First agent should connect - res1=`_testme $1` - - if [ "${res1}" = "OK_CONN" ] - then - _echo "Passed $1" - else - _echo "Failed r1(NO):${res1}" - _exit_on_jtreg - fi - -#Second agent shouldn't connect - res1=`_testme $2` - - if [ "${res1}" = "NO_CONN" ] - then - _echo "Passed $2" - else - _echo "Failed r1(OK):${res1}" - _exit_on_jtreg - fi - - _app_stop -} - -test_04(){ -# Run an app without JMX enabled -# start JMX by jcmd on one port, specify rmi port explicitly - - _echo "**** Test four ****" - _app_start - - _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false - -# First agent should connect - res1=`_testme $1 $2` - - if [ "${res1}" = "OK_CONN" ] - then - _echo "Passed $1 $2" - else - _echo "Failed r1(NO):${res1}" - _exit_on_jtreg - fi - - _app_stop -} - -test_05(){ -# Run an app without JMX enabled, it will enable local server -# but should leave remote server disabled - - _echo "**** Test five ****" - _app_start - - _jcmd ManagementAgent.start jmxremote=1 - - # First agent should connect - res1=`_testme $1` - - if [ "${res1}" = "NO_CONN" ] - then - _echo "Passed $1 $2" - else - _echo "Failed r1(OK):${res1}" - _exit_on_jtreg - fi - - _app_stop -} - -test_06(){ -# Run an app without JMX enabled -# start JMX by jcmd on one port, specify rmi port explicitly -# attempt to start it again -# 1) with the same port -# 2) with other port -# 3) attempt to stop it twice -# Check for valid messages in the output - - _echo "**** Test six ****" - _app_start - - _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false - - # First agent should connect - res1=`_testme $1 $2` - - if [ "${res1}" = "OK_CONN" ] - then - _echo "Passed $1 $2" - else - _echo "Failed r1(NO):${res1}" - _exit_on_jtreg - fi - - _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false - - _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false - - _jcmd ManagementAgent.stop - - _jcmd ManagementAgent.stop - - _jcmd ManagementAgent.start jmxremote.port=22 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false - - _app_stop -} - -test_07(){ -# Run an app without JMX enabled, but with some properties set -# in command line. -# make sure these properties overriden corectly - - _echo "**** Test seven ****" - - _app_start -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=true - - res1=`_testme $1` - - _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false - - res2=`_testme $2` - - if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] - then - echo "Passed" - else - _echo "Failed r1(NO):${res1} r2(OK):${res2}" - _exit_on_jtreg - fi - - _app_stop -} - -test_08(){ -# Run an app with JMX enabled and with some properties set -# in command line. -# stop JMX agent and then start it again with different property values -# make sure these properties overriden corectly - - _echo "**** Test eight ****" - - _app_start -Dcom.sun.management.jmxremote.port=$1 \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=true - - res1=`_testme $1` - - _jcmd ManagementAgent.stop - - res2=`_testme $1` - - _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false - - res3=`_testme $2` - - if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}" - _exit_on_jtreg - fi - - _app_stop -} - -test_09(){ -# Run an app with JMX enabled and with some properties set -# in command line. -# stop JMX agent and then start it again with different property values -# specifing some property in management config file and some of them -# in command line -# make sure these properties overriden corectly - - _echo "**** Test nine ****" - - _app_start -Dcom.sun.management.config.file=${_testsrc}/management_cl.properties \ - -Dcom.sun.management.jmxremote.authenticate=false - - res1=`_testme $1` - - _jcmd ManagementAgent.stop - - res2=`_testme $1` - - _jcmd ManagementAgent.start config.file=${_testsrc}/management_jcmd.properties \ - jmxremote.authenticate=false jmxremote.port=$2 - - res3=`_testme $2` - - if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}" - _exit_on_jtreg - fi - - _app_stop -} - -test_10(){ -# Run an app with JMX enabled and with some properties set -# in command line. -# stop JMX agent and then start it again with different property values -# stop JMX agent again and then start it without property value -# make sure these properties overriden corectly - - _echo "**** Test ten ****" - - _app_start -Dcom.sun.management.jmxremote.port=$1 \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=true - - res1=`_testme $1` - - _jcmd ManagementAgent.stop - _jcmd ManagementAgent.start jmxremote.ssl=false jmxremote.port=$1 - - - res2=`_testme $1` - - _jcmd ManagementAgent.stop - _jcmd ManagementAgent.start jmxremote.port=$1 - - res3=`_testme $1` - - if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" -a "${res3}" = "NO_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(NO):${res1} r2(OK):${res2} r3(NO):${res3}" - _exit_on_jtreg - fi - - _app_stop -} - -test_11(){ -# Run an app with JMX enabled -# stop remote agent -# make sure local agent is not affected - - _echo "**** Test eleven ****" - - _app_start -Dcom.sun.management.jmxremote.port=$2 \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.ssl=false - - res1=`_testme $2` - - _jcmd ManagementAgent.stop - - pid=`${COMPILEJAVA}/bin/jps ${TESTTOOLVMOPTS} | sed -n "/JMXStartStopDoSomething/s/ .*//p"` - res2=`_testme local ${pid}` - - if [ "${res1}" = "OK_CONN" -a "${res2}" = "OK_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(OK):${res1} r2(OK):${res2}" - _exit_on_jtreg - fi - - _app_stop -} - -test_12(){ -# Run an app with JMX disabled -# start local agent only - - _echo "**** Test twelve ****" - - _app_start - - res1=`_testme $1` - - _jcmd ManagementAgent.start_local - - pid=`_get_pid` - if [ "x${pid}" = "x" ] - then - res2="NO_CONN" - else - res2=`_testme local ${pid}` - fi - - if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(NO):${res1} r2(OK):${res2}" - _exit_on_jtreg - fi - - _app_stop -} - -test_13(){ -# Run an app with -javaagent make sure it works as expected - system properties are ignored - - _echo "**** Test thirteen ****" - - AGENT="${TESTJAVA}/jre/lib/management-agent.jar" - if [ ! -f ${AGENT} ] - then - AGENT="${TESTJAVA}/lib/management-agent.jar" - fi - - _app_start -javaagent:${AGENT}=com.sun.management.jmxremote.port=$1,com.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false - - res1=`_testme $1` - - if [ "${res1}" = "NO_CONN" ] - then - _echo "Passed" - else - _echo "Failed r1(NO):${res1}" - _exit_on_jtreg - fi - - _app_stop -} - -# ============= MAIN ======================================= - -if [ "x${TESTJAVA}" = "x" ] -then - echo "TESTJAVA env have to be set" - exit -fi - -if [ ! -x "${TESTJAVA}/bin/jcmd" ] -then - echo "${TESTJAVA}/bin/jcmd" - echo "Doesn't exist or not an executable" - exit -fi - - -#------------------------------------------------------------------------------ -# reading parameters - -for parm in "$@" -do - case $parm in - --jtreg) _jtreg=yes ;; - --no-compile) _compile=no ;; - --testsuite=*) _testsuite=`_echo $parm | sed "s,^--.*=\(.*\),\1,"` ;; - --port-one=*) _port_one=`_echo $parm | sed "s,^--.*=\(.*\),\1,"` ;; - --port-two=*) _port_two=`_echo $parm | sed "s,^--.*=\(.*\),\1,"` ;; - *) - echo "Undefined parameter $parm. Try --help for help" - exit - ;; - esac -done - -if [ "${COMPILEJAVA}" = "" ] -then - COMPILEJAVA=${TESTJAVA} -fi - -if [ ${_compile} = "yes" ] -then - _compile -fi - -if [ ${_jtreg} = "yes" ] -then - _testclasses=${TESTCLASSES} - _testsrc=${TESTSRC} - _logname="JMXStartStopTest_output.txt" -fi - -rm -f ${_logname} - -# Local mode tests -for i in `echo ${_testsuite} | sed -e "s/,/ /g"` -do - test_${i} ${_port_one} ${_port_two} -done - - diff --git a/jdk/test/sun/security/ec/TestEC.java b/jdk/test/sun/security/ec/TestEC.java index 155e06ab027..c524b943365 100644 --- a/jdk/test/sun/security/ec/TestEC.java +++ b/jdk/test/sun/security/ec/TestEC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, 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 @@ -59,6 +59,10 @@ import java.security.Security; public class TestEC { public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + ProvidersSnapshot snapshot = ProvidersSnapshot.create(); try { main0(args); diff --git a/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java b/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java index 2788f03f8ad..fa45ca75c14 100644 --- a/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java +++ b/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java @@ -48,6 +48,10 @@ public class ClientJSSEServerJSSE extends PKCS11Test { } public void main(Provider p) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (p.getService("KeyFactory", "EC") == null) { System.out.println("Provider does not support EC, skipping"); return; diff --git a/jdk/test/sun/security/provider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java b/jdk/test/sun/security/provider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java new file mode 100644 index 00000000000..0483e7e126c --- /dev/null +++ b/jdk/test/sun/security/provider/certpath/DisabledAlgorithms/CPBuilderWithMD5.java @@ -0,0 +1,449 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// This test case relies on static security property, no way to re-use +// security property in samevm/agentvm mode. + +/** + * @test + * + * @bug 8030829 + * @summary Add MD5 to jdk.certpath.disabledAlgorithms security property + * + * @run main/othervm CPBuilderWithMD5 trustAnchor_SHA1withRSA_1024 0 true + * @run main/othervm CPBuilderWithMD5 trustAnchor_SHA1withRSA_512 0 true + * @run main/othervm CPBuilderWithMD5 intermediate_SHA1withRSA_1024_1024 1 true + * @run main/othervm CPBuilderWithMD5 intermediate_SHA1withRSA_1024_512 1 false + * @run main/othervm CPBuilderWithMD5 intermediate_SHA1withRSA_512_1024 1 false + * @run main/othervm CPBuilderWithMD5 intermediate_SHA1withRSA_512_512 1 false + * @run main/othervm CPBuilderWithMD5 intermediate_MD5withRSA_1024_1024 1 false + * @run main/othervm CPBuilderWithMD5 intermediate_MD5withRSA_1024_512 1 false + * @run main/othervm CPBuilderWithMD5 endentiry_SHA1withRSA_1024_1024 2 true + * @run main/othervm CPBuilderWithMD5 endentiry_SHA1withRSA_1024_512 2 false + * @run main/othervm CPBuilderWithMD5 endentiry_SHA1withRSA_512_1024 2 false + * @run main/othervm CPBuilderWithMD5 endentiry_SHA1withRSA_512_512 2 false + * @run main/othervm CPBuilderWithMD5 endentiry_MD5withRSA_1024_1024 2 false + * @run main/othervm CPBuilderWithMD5 endentiry_MD5withRSA_1024_512 2 false + * + * @author Xuelei Fan + */ + +/* + * The generate.sh was designed to generate MD2 signed certificates. The + * certificates used in this test are generated by an updated generate.sh that + * replacing MD2 with MD5 algorithm. + */ +import java.io.*; +import java.net.SocketException; +import java.util.*; +import java.security.Security; +import java.security.cert.*; +import sun.security.util.DerInputStream; + +public class CPBuilderWithMD5 { + + // SHA1withRSA 1024 + static String trustAnchor_SHA1withRSA_1024 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQUFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA4NTFaFw0zNDEyMDgxMTA4NTFa\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" + + "AQUAA4GNADCBiQKBgQDn3JSHACqi/bcohVy7eFqDs3L5ehnXmF9Jrg4rMRUeNrxA\n" + + "61F8bJ9JXx4j8WyqmT0TtokgXuqGxbsXRQVVw4AdXLF2PwCs/y+Y+AwU59uDHA3J\n" + + "AMk4VvjV9MB2Ea6YzuLnbbj/TNrfxB6LZ7KBvh0fYGt2T40yMvOvilU/f6e3zQID\n" + + "AQABo4GJMIGGMB0GA1UdDgQWBBSIxINDFVm8GpUz3v+BbWNmDEKP7TBHBgNVHSME\n" + + "QDA+gBSIxINDFVm8GpUz3v+BbWNmDEKP7aEjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" + + "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAgQw\n" + + "DQYJKoZIhvcNAQEFBQADgYEAt0mYDXTpInrGvEOylIL2gx65A/bpdz9iDQsSs5sZ\n" + + "r3m0v9zJnzR8lRqN4GbaD1vrFdkUrIoObcvXjXitnf5QqDzmc9BbIYj83Ft8QSUj\n" + + "jCMy04EGT/7ATss4SiFEu6sJpmOBjsgH6wYuobR27wl/01XOu2CXUo3OOjgAoPBs\n" + + "QoQ=\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 512 + static String trustAnchor_SHA1withRSA_512 = + "-----BEGIN CERTIFICATE-----\n" + + "MIIBuTCCAWOgAwIBAgIBADANBgkqhkiG9w0BAQUFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA4NTFaFw0zNDEyMDgxMTA4NTFa\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMFwwDQYJKoZIhvcNAQEB\n" + + "BQADSwAwSAJBANLqQkOpH7rBTo/a2ccYjJxvNib/Lxm6UXO1uAd/0AUzPWzJsOpB\n" + + "u2zyD26UYc0GNyXCkWMZ44FrtSQ8VI146j8CAwEAAaOBiTCBhjAdBgNVHQ4EFgQU\n" + + "5PVLxBY//smN31jHb/MAmCEz5NIwRwYDVR0jBEAwPoAU5PVLxBY//smN31jHb/MA\n" + + "mCEz5NKhI6QhMB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlggEAMA8G\n" + + "A1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgIEMA0GCSqGSIb3DQEBBQUAA0EAzF9E\n" + + "dXYPLqziCRY45IHCUtxaLjLQmwsjEu91TV4xyuuozGEumcqH7m6Hg6Ohnd1FGfsN\n" + + "X+vt1tdaDIu9+OzGjQ==\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 1024 signed with RSA 1024 + static String intermediate_SHA1withRSA_1024_1024 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICUDCCAbmgAwIBAgIBAzANBgkqhkiG9w0BAQUFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA5MDlaFw0zMzA5MTQxMTA5MDla\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/m9wdJT0HR+exquh2Q2Yq\n" + + "XvL9HtEsCabCikd0Vjuoi3sZJ/5SBbbHTvh7z7enW0NEpLHQee0ry5FW8mLxDtrR\n" + + "38NjE9W7zutucBG5WztwGuvcts13aEw+vH+EwhokJW9PXz9Do+y4PTJo3vdsk7Zs\n" + + "bGVY9+YjvlgEaozWXZ1JhQIDAQABo4GJMIGGMB0GA1UdDgQWBBQIsaDZL94kLug/\n" + + "A1N4EkNOA4z47DBHBgNVHSMEQDA+gBSIxINDFVm8GpUz3v+BbWNmDEKP7aEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAgQwDQYJKoZIhvcNAQEFBQADgYEA0673aIUF2k20jkpR\n" + + "4USN9UkbfX57Uazhl4n765EeAiteWnTzKztISeH1GTrCw7bSl1r07aaflsnbKOHC\n" + + "RrL2RxbxNwQARvuuCxr664vXnsGrt86xA5F2iNF22uDM/5HA5sIfBmEk5xXSLrgH\n" + + "I7jOaYqAA1b8C+4DU2Z5ZgO4LOA=\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 1024 signed with RSA 512 + static String intermediate_SHA1withRSA_1024_512 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICDzCCAbmgAwIBAgIBBDANBgkqhkiG9w0BAQUFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA5MDlaFw0zMzA5MTQxMTA5MDla\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/m9wdJT0HR+exquh2Q2Yq\n" + + "XvL9HtEsCabCikd0Vjuoi3sZJ/5SBbbHTvh7z7enW0NEpLHQee0ry5FW8mLxDtrR\n" + + "38NjE9W7zutucBG5WztwGuvcts13aEw+vH+EwhokJW9PXz9Do+y4PTJo3vdsk7Zs\n" + + "bGVY9+YjvlgEaozWXZ1JhQIDAQABo4GJMIGGMB0GA1UdDgQWBBQIsaDZL94kLug/\n" + + "A1N4EkNOA4z47DBHBgNVHSMEQDA+gBTk9UvEFj/+yY3fWMdv8wCYITPk0qEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAgQwDQYJKoZIhvcNAQEFBQADQQAihshnF7RWZ13tUGsH\n" + + "iM4i8HmBjw2+pwW/cs0E8BcycYEy3beWMcL1Np2yfOa/7K5ZvGPhe/piwzTel+Kt\n" + + "5VLm\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 512 signed with RSA 1024 + static String intermediate_SHA1withRSA_512_1024 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICDDCCAXWgAwIBAgIBBTANBgkqhkiG9w0BAQUFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA5MDlaFw0zMzA5MTQxMTA5MDla\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAK4h/iW3wt+ugR5ObWiFSl394UU/\n" + + "lWNm+N6UAgsBRhSzZz/Iof7xZTQI+usNXzOrTnU3+uZsMgokpjkrko1osxUCAwEA\n" + + "AaOBiTCBhjAdBgNVHQ4EFgQU88OD48Osuh7lJiLnhfMhrySqW8QwRwYDVR0jBEAw\n" + + "PoAUiMSDQxVZvBqVM97/gW1jZgxCj+2hI6QhMB8xCzAJBgNVBAYTAlVTMRAwDgYD\n" + + "VQQKEwdFeGFtcGxlggEAMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgIEMA0G\n" + + "CSqGSIb3DQEBBQUAA4GBAAHN8XUTT6asa1MvpfqAvKTH6tNrMOmzoFsUamPxSrUB\n" + + "tnBv/fa/E9+1QvQwl3g6luVXBkQf2/nVD0195IdkEuD/C6psuGKerXmiaRMv5Wcs\n" + + "B+8bTzhNxMzHKPZDJ8Tf/RD3XpPvtxw0T+I5xud68FH/WDhJtu7TiXPAhs7srtHt\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 512 signed with RSA 512 + static String intermediate_SHA1withRSA_512_512 = + "-----BEGIN CERTIFICATE-----\n" + + "MIIByzCCAXWgAwIBAgIBBjANBgkqhkiG9w0BAQUFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA5MDlaFw0zMzA5MTQxMTA5MDla\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAK4h/iW3wt+ugR5ObWiFSl394UU/\n" + + "lWNm+N6UAgsBRhSzZz/Iof7xZTQI+usNXzOrTnU3+uZsMgokpjkrko1osxUCAwEA\n" + + "AaOBiTCBhjAdBgNVHQ4EFgQU88OD48Osuh7lJiLnhfMhrySqW8QwRwYDVR0jBEAw\n" + + "PoAU5PVLxBY//smN31jHb/MAmCEz5NKhI6QhMB8xCzAJBgNVBAYTAlVTMRAwDgYD\n" + + "VQQKEwdFeGFtcGxlggEAMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgIEMA0G\n" + + "CSqGSIb3DQEBBQUAA0EASLN+1/pfo+9ty5EaYkoPu4QeYGr+5wmXyDceiaED/Lok\n" + + "RdV0ZH0qwD4kiarlJssNOgMCk+2EzgvXcIhEMDa5hA==\n" + + "-----END CERTIFICATE-----"; + + // MD5withRSA 1024 signed with RSA 1024 + static String intermediate_MD5withRSA_1024_1024 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICUDCCAbmgAwIBAgIBBzANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA5MDlaFw0zMzA5MTQxMTA5MDla\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/m9wdJT0HR+exquh2Q2Yq\n" + + "XvL9HtEsCabCikd0Vjuoi3sZJ/5SBbbHTvh7z7enW0NEpLHQee0ry5FW8mLxDtrR\n" + + "38NjE9W7zutucBG5WztwGuvcts13aEw+vH+EwhokJW9PXz9Do+y4PTJo3vdsk7Zs\n" + + "bGVY9+YjvlgEaozWXZ1JhQIDAQABo4GJMIGGMB0GA1UdDgQWBBQIsaDZL94kLug/\n" + + "A1N4EkNOA4z47DBHBgNVHSMEQDA+gBSIxINDFVm8GpUz3v+BbWNmDEKP7aEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAgQwDQYJKoZIhvcNAQEEBQADgYEAerx2je3FBVn2eoPs\n" + + "nTzLKILezqCTCO7mXWiyBidRhh4RGdM8JggMN5SRmuwRurxfYFgPfqmAenWtEFqO\n" + + "xZrTXQUvIrrEgpzqkfppFnkCh4kDsX4roD5Nho3J4MTBQkqE0r676Yq6Rp6cywCq\n" + + "CHQQztRGY7n/ZYRNJ3uzvuoT1tk=\n" + + "-----END CERTIFICATE-----"; + + // MD5withRSA 1024 signed with RSA 512 + static String intermediate_MD5withRSA_1024_512 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICDzCCAbmgAwIBAgIBCDANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0xMzEyMjgxMTA5MTBaFw0zMzA5MTQxMTA5MTBa\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/m9wdJT0HR+exquh2Q2Yq\n" + + "XvL9HtEsCabCikd0Vjuoi3sZJ/5SBbbHTvh7z7enW0NEpLHQee0ry5FW8mLxDtrR\n" + + "38NjE9W7zutucBG5WztwGuvcts13aEw+vH+EwhokJW9PXz9Do+y4PTJo3vdsk7Zs\n" + + "bGVY9+YjvlgEaozWXZ1JhQIDAQABo4GJMIGGMB0GA1UdDgQWBBQIsaDZL94kLug/\n" + + "A1N4EkNOA4z47DBHBgNVHSMEQDA+gBTk9UvEFj/+yY3fWMdv8wCYITPk0qEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAgQwDQYJKoZIhvcNAQEEBQADQQA3XGQPNin8cDIsJ4vx\n" + + "tTxUO6XVJoWOdTsjwzlMrPmLvjJNZeXLtQe3pQu0vjgyUpQ59VYLW3qKN/LF3UH0\n" + + "Ep7V\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 1024 signed with RSA 1024 + static String endentiry_SHA1withRSA_1024_1024 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICNzCCAaCgAwIBAgIBAjANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0xMzEyMjgxMTA5\n" + + "MTJaFw0zMzA5MTQxMTA5MTJaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" + + "9w0BAQEFAAOBjQAwgYkCgYEAvktJqK4/SvQrTyGgV8tM6zP/K5xQP1pFRipRKS8i\n" + + "2yaXdlW4jQBZWVXdfEsm8YwGwtXFKIlleALmgJcLldPwNm0qaKixL4mRJVMm4bXM\n" + + "UXCfmr+Im1SpA4Yum4VFCfIJ1kkeQkXqc57sCSfS+rFnC+1kSNa9wj+Mc4+5FR4k\n" + + "zqUCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBRDzLh/sWyTsdq1KKnG\n" + + "8e7JW1tPUDAfBgNVHSMEGDAWgBQIsaDZL94kLug/A1N4EkNOA4z47DANBgkqhkiG\n" + + "9w0BAQUFAAOBgQB2RkWHOaL4WTOGoeTS4J4o9FW+4UXihbocdI/64rMExERjDkE/\n" + + "Jh31TEmatnP1gPrF1AfmqQPubqVSbRtCHrZF+Ilk6L6YeyRNzKvsLiMUtgrLYLas\n" + + "Vop0DFZxR02xHgaJdoJkcWBjNadb9zG7eZtt8OOOJ4lRwg02aLTy+WDqPA==\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 1024 signed with RSA 512 + static String endentiry_SHA1withRSA_1024_512 = + "-----BEGIN CERTIFICATE-----\n" + + "MIIB9jCCAaCgAwIBAgIBAzANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0xMzEyMjgxMTA5\n" + + "MTJaFw0zMzA5MTQxMTA5MTJaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" + + "9w0BAQEFAAOBjQAwgYkCgYEAvktJqK4/SvQrTyGgV8tM6zP/K5xQP1pFRipRKS8i\n" + + "2yaXdlW4jQBZWVXdfEsm8YwGwtXFKIlleALmgJcLldPwNm0qaKixL4mRJVMm4bXM\n" + + "UXCfmr+Im1SpA4Yum4VFCfIJ1kkeQkXqc57sCSfS+rFnC+1kSNa9wj+Mc4+5FR4k\n" + + "zqUCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBRDzLh/sWyTsdq1KKnG\n" + + "8e7JW1tPUDAfBgNVHSMEGDAWgBTzw4Pjw6y6HuUmIueF8yGvJKpbxDANBgkqhkiG\n" + + "9w0BAQUFAANBAIapvjECUm4YD4O99G0v2SM17cKQzjZtSWkScS7FSk4sxS+dP3hM\n" + + "Qb2UpoRl6CGynhOVVy2G/VJN8BEqOfywj8k=\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 512 signed with RSA 1024 + static String endentiry_SHA1withRSA_512_1024 = + "-----BEGIN CERTIFICATE-----\n" + + "MIIB8zCCAVygAwIBAgIBBDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0xMzEyMjgxMTA5\n" + + "MTJaFw0zMzA5MTQxMTA5MTJaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTBcMA0GCSqGSIb3\n" + + "DQEBAQUAA0sAMEgCQQCngiNTE+qngHcfj2jUpdc82gCw+TFRjR7oMSdp7b/3NwpD\n" + + "E+11z9WspoXTDzvbKcGUH9svFl691NyY0ZUmf+4RAgMBAAGjTzBNMAsGA1UdDwQE\n" + + "AwID6DAdBgNVHQ4EFgQUK+oVsFTQbz08evgQZ5Sd82c2y4UwHwYDVR0jBBgwFoAU\n" + + "CLGg2S/eJC7oPwNTeBJDTgOM+OwwDQYJKoZIhvcNAQEFBQADgYEAMd/8XnjRz5jK\n" + + "nbss9DDQQC2mUuCbV/tGdke7eQ1DtBVZLBU6wDgisGr52sUXmyZIPmSVKpQqwCG5\n" + + "8cY5uQhaNwPtPmMMKXzX32zN9NhVkiDNceL+zHs3vdjD1i/QiUTST+NKfLYVb6dF\n" + + "YMG65lxe3gMVxMweiHSZSukmk1k3gUA=\n" + + "-----END CERTIFICATE-----"; + + // SHA1withRSA 512 signed with RSA 512 + static String endentiry_SHA1withRSA_512_512 = + "-----BEGIN CERTIFICATE-----\n" + + "MIIBsjCCAVygAwIBAgIBBTANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0xMzEyMjgxMTA5\n" + + "MTJaFw0zMzA5MTQxMTA5MTJaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTBcMA0GCSqGSIb3\n" + + "DQEBAQUAA0sAMEgCQQCngiNTE+qngHcfj2jUpdc82gCw+TFRjR7oMSdp7b/3NwpD\n" + + "E+11z9WspoXTDzvbKcGUH9svFl691NyY0ZUmf+4RAgMBAAGjTzBNMAsGA1UdDwQE\n" + + "AwID6DAdBgNVHQ4EFgQUK+oVsFTQbz08evgQZ5Sd82c2y4UwHwYDVR0jBBgwFoAU\n" + + "88OD48Osuh7lJiLnhfMhrySqW8QwDQYJKoZIhvcNAQEFBQADQQB4xFWtC6ijDBIe\n" + + "/Gkf3B9+ycmP52pTPNiPwMS6u1a5vTRXMn5xRDexWfxJKJVZ2s9UR1jheZvWgPC8\n" + + "VUWO8bbG\n" + + "-----END CERTIFICATE-----"; + + // MD5withRSA 1024 signed with RSA 1024 + static String endentiry_MD5withRSA_1024_1024 = + "-----BEGIN CERTIFICATE-----\n" + + "MIICNzCCAaCgAwIBAgIBBjANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0xMzEyMjgxMTA5\n" + + "MTJaFw0zMzA5MTQxMTA5MTJaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" + + "9w0BAQEFAAOBjQAwgYkCgYEAvktJqK4/SvQrTyGgV8tM6zP/K5xQP1pFRipRKS8i\n" + + "2yaXdlW4jQBZWVXdfEsm8YwGwtXFKIlleALmgJcLldPwNm0qaKixL4mRJVMm4bXM\n" + + "UXCfmr+Im1SpA4Yum4VFCfIJ1kkeQkXqc57sCSfS+rFnC+1kSNa9wj+Mc4+5FR4k\n" + + "zqUCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBRDzLh/sWyTsdq1KKnG\n" + + "8e7JW1tPUDAfBgNVHSMEGDAWgBQIsaDZL94kLug/A1N4EkNOA4z47DANBgkqhkiG\n" + + "9w0BAQQFAAOBgQBCVn9/JQxsRTaKIKSrgB+KtEreat+33k3SXuJICuRxcmvjOXIx\n" + + "wSdq+mRCA+DpIPSNtgnDAUyipnyxRxpdmRRUHuRYpkALq4a5QtTJK0Y/CEMfsd2J\n" + + "Yd2zKcfynDLW6LVeNdtjlY7fTemJnbA/WImNhwyW55V9vbnk3J04EZN8jw==\n" + + "-----END CERTIFICATE-----"; + + // MD5withRSA 1024 signed with RSA 512 + static String endentiry_MD5withRSA_1024_512 = + "-----BEGIN CERTIFICATE-----\n" + + "MIIB9jCCAaCgAwIBAgIBBzANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0xMzEyMjgxMTA5\n" + + "MTNaFw0zMzA5MTQxMTA5MTNaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" + + "9w0BAQEFAAOBjQAwgYkCgYEAvktJqK4/SvQrTyGgV8tM6zP/K5xQP1pFRipRKS8i\n" + + "2yaXdlW4jQBZWVXdfEsm8YwGwtXFKIlleALmgJcLldPwNm0qaKixL4mRJVMm4bXM\n" + + "UXCfmr+Im1SpA4Yum4VFCfIJ1kkeQkXqc57sCSfS+rFnC+1kSNa9wj+Mc4+5FR4k\n" + + "zqUCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBRDzLh/sWyTsdq1KKnG\n" + + "8e7JW1tPUDAfBgNVHSMEGDAWgBTzw4Pjw6y6HuUmIueF8yGvJKpbxDANBgkqhkiG\n" + + "9w0BAQQFAANBAAbZwmkqb6sfiiIxuLnj6PjhJsXGfvPomkkbLu5CapAMhen/p6ZG\n" + + "6vh69TbIsBR9UHu7qDyTl5Xax7bmYeW+sDQ=\n" + + "-----END CERTIFICATE-----"; + + static HashMap certmap = new HashMap(); + static { + certmap.put("trustAnchor_SHA1withRSA_1024", + trustAnchor_SHA1withRSA_1024); + certmap.put("trustAnchor_SHA1withRSA_512", + trustAnchor_SHA1withRSA_512); + certmap.put("intermediate_SHA1withRSA_1024_1024", + intermediate_SHA1withRSA_1024_1024); + certmap.put("intermediate_SHA1withRSA_1024_512", + intermediate_SHA1withRSA_1024_512); + certmap.put("intermediate_SHA1withRSA_512_1024", + intermediate_SHA1withRSA_512_1024); + certmap.put("intermediate_SHA1withRSA_512_512", + intermediate_SHA1withRSA_512_512); + certmap.put("intermediate_MD5withRSA_1024_1024", + intermediate_MD5withRSA_1024_1024); + certmap.put("intermediate_MD5withRSA_1024_512", + intermediate_MD5withRSA_1024_512); + certmap.put("endentiry_SHA1withRSA_1024_1024", + endentiry_SHA1withRSA_1024_1024); + certmap.put("endentiry_SHA1withRSA_1024_512", + endentiry_SHA1withRSA_1024_512); + certmap.put("endentiry_SHA1withRSA_512_1024", + endentiry_SHA1withRSA_512_1024); + certmap.put("endentiry_SHA1withRSA_512_512", + endentiry_SHA1withRSA_512_512); + certmap.put("endentiry_MD5withRSA_1024_1024", + endentiry_MD5withRSA_1024_1024); + certmap.put("endentiry_MD5withRSA_1024_512", + endentiry_MD5withRSA_1024_512); + } + + private static Set generateTrustAnchors() + throws CertificateException { + // generate certificate from cert string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + HashSet anchors = new HashSet(); + + ByteArrayInputStream is = + new ByteArrayInputStream(trustAnchor_SHA1withRSA_1024.getBytes()); + Certificate cert = cf.generateCertificate(is); + TrustAnchor anchor = new TrustAnchor((X509Certificate)cert, null); + anchors.add(anchor); + + is = new ByteArrayInputStream(trustAnchor_SHA1withRSA_512.getBytes()); + cert = cf.generateCertificate(is); + anchor = new TrustAnchor((X509Certificate)cert, null); + anchors.add(anchor); + + return anchors; + } + + private static CertStore generateCertificateStore() throws Exception { + Collection entries = new HashSet(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + + for (String key : certmap.keySet()) { + String certStr = certmap.get(key); + ByteArrayInputStream is = + new ByteArrayInputStream(certStr.getBytes());; + Certificate cert = cf.generateCertificate(is); + entries.add(cert); + } + + return CertStore.getInstance("Collection", + new CollectionCertStoreParameters(entries)); + } + + private static X509CertSelector generateSelector(String name) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + String certStr = certmap.get(name); + if (certStr == null) { + return null; + } + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = new ByteArrayInputStream(certStr.getBytes()); + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + + selector.setCertificate(target); + + return selector; + } + + private static boolean match(String name, Certificate cert) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + String certStr = certmap.get(name); + if (certStr == null) { + return false; + } + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = new ByteArrayInputStream(certStr.getBytes()); + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + + return target.equals(cert); + } + + public static void main(String args[]) throws Exception { + CertPathBuilder builder = CertPathBuilder.getInstance("PKIX"); + + X509CertSelector selector = generateSelector(args[0]); + if (selector == null) { + // no target certificate, ignore it + return; + } + + Set anchors = generateTrustAnchors(); + CertStore certs = generateCertificateStore(); + + PKIXBuilderParameters params = + new PKIXBuilderParameters(anchors, selector); + params.addCertStore(certs); + params.setRevocationEnabled(false); + params.setDate(new Date(114, 9, 1)); // 2014-09-01 + + boolean success = Boolean.valueOf(args[2]); + try { + PKIXCertPathBuilderResult result = + (PKIXCertPathBuilderResult)builder.build(params); + if (!success) { + throw new Exception("expected algorithm disabled exception"); + } + + int length = Integer.parseInt(args[1]); + List path = + result.getCertPath().getCertificates(); + if (length != path.size()) { + throw new Exception("unexpected certification path length"); + } + + if (!path.isEmpty()) { // the target is not a trust anchor + if (!match(args[0], path.get(0))) { + throw new Exception("unexpected certificate"); + } + } + } catch (CertPathBuilderException cpbe) { + if (success) { + throw new Exception("unexpected exception", cpbe); + } else { + System.out.println("Get the expected exception " + cpbe); + } + } + } + +} diff --git a/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java b/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java index 21736eac623..abb18ebd439 100644 --- a/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java +++ b/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,15 +21,23 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /* * @test * @bug 7167988 * @summary PKIX CertPathBuilder in reverse mode doesn't work if more than * one trust anchor is specified + * @run main/othervm ReverseBuild */ import java.io.*; import java.util.*; import java.security.cert.*; +import java.security.Security; import sun.security.provider.certpath.SunCertPathBuilderParameters; @@ -279,6 +287,9 @@ public class ReverseBuild { public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); // generate certificate from cert string CertificateFactory cf = CertificateFactory.getInstance("X.509"); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/MD2InTrustAnchor.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/MD2InTrustAnchor.java index 9cf0fbb7185..9b695a2fc7b 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/MD2InTrustAnchor.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/MD2InTrustAnchor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,13 +23,15 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* * @test * @bug 7113275 * @summary compatibility issue with MD2 trust anchor and old X509TrustManager - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @run main/othervm MD2InTrustAnchor PKIX TLSv1.1 * @run main/othervm MD2InTrustAnchor SunX509 TLSv1.1 * @run main/othervm MD2InTrustAnchor PKIX TLSv1.2 @@ -40,6 +42,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -283,6 +286,10 @@ public class MD2InTrustAnchor { volatile Exception clientException = null; public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java index ff8887c212a..01fc5dc5d86 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,13 +23,15 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* * @test * @bug 7113275 * @summary compatibility issue with MD2 trust anchor and old X509TrustManager - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @run main/othervm TrustTrustedCert PKIX TLSv1.1 * @run main/othervm TrustTrustedCert SunX509 TLSv1.1 * @run main/othervm TrustTrustedCert PKIX TLSv1.2 @@ -336,6 +338,10 @@ public class TrustTrustedCert { volatile Exception clientException = null; public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java index ee5efb9ddbe..45a6df001e8 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java @@ -148,14 +148,14 @@ public class SSLEngineBadBufferArrayAccess { "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2" }; for (String protocol : protocols) { - log("Testing " + protocol); /* * Run the tests with direct and indirect buffers. */ - SSLEngineBadBufferArrayAccess test = - new SSLEngineBadBufferArrayAccess(protocol); - test.runTest(true); - test.runTest(false); + log("Testing " + protocol + ":true"); + new SSLEngineBadBufferArrayAccess(protocol).runTest(true); + + log("Testing " + protocol + ":false"); + new SSLEngineBadBufferArrayAccess(protocol).runTest(false); } System.out.println("Test Passed."); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509KeyManager/PreferredKey.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509KeyManager/PreferredKey.java index 4ac150b4208..47e1e775856 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509KeyManager/PreferredKey.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509KeyManager/PreferredKey.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,11 +21,18 @@ * questions. */ +// +// Security properties, once set, cannot revert to unset. To avoid +// conflicts with tests running in the same VM isolate this test by +// running it in otherVM mode. +// + /* * @test * @bug 6302644 * @summary X509KeyManager implementation for NewSunX509 doesn't return most * preferable key + * @run main/othervm PreferredKey */ import java.io.*; import java.net.*; @@ -49,6 +56,10 @@ public class PreferredKey { public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + KeyStore ks; KeyManagerFactory kmf; X509KeyManager km; diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/BasicConstraints.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/BasicConstraints.java index 8f1e71622c4..4f64cd1b758 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/BasicConstraints.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/BasicConstraints.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,14 +21,16 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* * @test * @bug 7166570 * @summary JSSE certificate validation has started to fail for * certificate chains - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @run main/othervm BasicConstraints PKIX * @run main/othervm BasicConstraints SunX509 */ @@ -37,6 +39,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.*; @@ -454,6 +457,10 @@ public class BasicConstraints { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/PKIXExtendedTM.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/PKIXExtendedTM.java index aaf5fb2447d..3b2587f6913 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/PKIXExtendedTM.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/PKIXExtendedTM.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,21 +21,23 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// /* * @test * @bug 6916074 * @summary Add support for TLS 1.2 * @run main/othervm PKIXExtendedTM - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. */ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -791,6 +793,10 @@ public class PKIXExtendedTM { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SelfIssuedCert.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SelfIssuedCert.java index 1f8f7298383..a17541212b6 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SelfIssuedCert.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SelfIssuedCert.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,15 +21,17 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* * @test * @bug 6822460 * @summary support self-issued certificate * @run main/othervm SelfIssuedCert PKIX * @run main/othervm SelfIssuedCert SunX509 - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @author Xuelei Fan */ @@ -37,6 +39,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -302,6 +305,10 @@ public class SelfIssuedCert { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java index 561718fe59e..54b2de89219 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,20 +21,23 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* * @test * @bug 6916074 * @summary Add support for TLS 1.2 * @run main/othervm SunX509ExtendedTM - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. */ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -792,6 +795,10 @@ public class SunX509ExtendedTM { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/CriticalSubjectAltName.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/CriticalSubjectAltName.java index e01115224c5..f9abcd670b2 100644 --- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/CriticalSubjectAltName.java +++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/CriticalSubjectAltName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,18 +21,21 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* * @test * @bug 6668231 * @summary Presence of a critical subjectAltName causes JSSE's SunX509 to * fail trusted checks * @run main/othervm CriticalSubjectAltName - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. - * * @author Xuelei Fan - * + */ + +/* * This test depends on binary keystore, crisubn.jks and trusted.jks. Because * JAVA keytool cannot generate X509 certificate with SubjectAltName extension, * the certificates are generated with openssl toolkits and then imported into @@ -47,6 +50,7 @@ import java.io.*; import java.net.*; import javax.net.ssl.*; +import java.security.Security; import java.security.cert.Certificate; public class CriticalSubjectAltName implements HostnameVerifier { @@ -154,6 +158,10 @@ public class CriticalSubjectAltName implements HostnameVerifier { volatile Exception clientException = null; public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + String keyFilename = System.getProperty("test.src", "./") + "/" + pathToStores + "/" + keyStoreFile; diff --git a/jdk/test/sun/security/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java b/jdk/test/sun/security/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java index 1b93237a544..ac4f8a11ab1 100644 --- a/jdk/test/sun/security/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java +++ b/jdk/test/sun/security/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, 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,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -431,6 +432,10 @@ public class SSLSocketSNISensitive { volatile Exception clientException = null; public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java b/jdk/test/sun/security/ssl/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java index 07503cb7c03..3b11d2a59a7 100644 --- a/jdk/test/sun/security/ssl/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java +++ b/jdk/test/sun/security/ssl/javax/net/ssl/TLSv11/EmptyCertificateAuthorities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,15 +23,16 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* * @test * @bug 4873188 * @summary Support TLS 1.1 * @run main/othervm EmptyCertificateAuthorities - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. - * * @author Xuelei Fan */ @@ -228,6 +229,10 @@ public class EmptyCertificateAuthorities { volatile Exception clientException = null; public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + String keyFilename = System.getProperty("test.src", ".") + "/" + pathToStores + "/" + keyStoreFile; diff --git a/jdk/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java b/jdk/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java index 361ac866803..012fe96720e 100644 --- a/jdk/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java +++ b/jdk/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, 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,12 +35,28 @@ import java.util.*; import javax.net.ssl.*; +import java.security.Security; public class CipherSuitesInOrder { // supported ciphersuites private final static List supportedCipherSuites = Arrays.asList( + "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", + "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", + "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", + "TLS_RSA_WITH_AES_256_GCM_SHA384", + "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", + "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", + "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", + "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", + "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + "TLS_RSA_WITH_AES_128_GCM_SHA256", + "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", + "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", + "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", + "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", + "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "TLS_RSA_WITH_AES_256_CBC_SHA256", @@ -75,21 +91,6 @@ public class CipherSuitesInOrder { "TLS_ECDH_ECDSA_WITH_RC4_128_SHA", "TLS_ECDH_RSA_WITH_RC4_128_SHA", - "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - "TLS_RSA_WITH_AES_256_GCM_SHA384", - "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", - "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", - "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", - "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - "TLS_RSA_WITH_AES_128_GCM_SHA256", - "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", - "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", - "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", - "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", - "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", "SSL_RSA_WITH_3DES_EDE_CBC_SHA", diff --git a/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java b/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java index 953d2ea8e5f..ca2f1885fdd 100644 --- a/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java +++ b/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, 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 @@ -28,10 +28,15 @@ * @author Andreas Sterbenz * @run main/othervm/timeout=300 ClientJSSEServerJSSE */ +import java.security.Security; public class ClientJSSEServerJSSE { public static void main(String[] args) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + CipherTest.main(new JSSEFactory(), args); } diff --git a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java index 4e740fa4d84..b5295f31cf5 100644 --- a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java +++ b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,13 +21,15 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* @test * @bug 6766775 * @summary X509 certificate hostname checking is broken in JDK1.6.0_10 * @run main/othervm DNSIdentities - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @author Xuelei Fan */ @@ -35,6 +37,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -743,6 +746,10 @@ public class DNSIdentities { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java index 2fc92a254c9..bbf6892c43b 100644 --- a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java +++ b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,13 +21,15 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* @test * @summary X509 certificate hostname checking is broken in JDK1.6.0_10 * @bug 6766775 * @run main/othervm IPAddressIPIdentities - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @author Xuelei Fan */ @@ -35,6 +37,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -744,6 +747,10 @@ public class IPAddressIPIdentities { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java index 1d93e9c6ed6..c0d897b5fac 100644 --- a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java +++ b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,13 +21,15 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* @test * @summary X509 certificate hostname checking is broken in JDK1.6.0_10 * @bug 6766775 * @run main/othervm IPIdentities - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @author Xuelei Fan */ @@ -35,6 +37,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -743,6 +746,10 @@ public class IPIdentities { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java index e7396d5f339..55dfb1c04dc 100644 --- a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java +++ b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,13 +21,15 @@ * questions. */ +// +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. +// + /* @test * @bug 6766775 * @summary X509 certificate hostname checking is broken in JDK1.6.0_10 * @run main/othervm Identities - * - * SunJSSE does not support dynamic system properties, no way to re-use - * system properties in samevm/agentvm mode. * @author Xuelei Fan */ @@ -35,6 +37,7 @@ import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.*; +import java.security.Security; import java.security.KeyStore; import java.security.KeyFactory; import java.security.cert.Certificate; @@ -743,6 +746,10 @@ public class Identities { volatile Exception clientException = null; public static void main(String args[]) throws Exception { + // MD5 is used in this test case, don't disable MD5 algorithm. + Security.setProperty( + "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024"); + if (debug) System.setProperty("javax.net.debug", "all"); diff --git a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java index 2b04e918819..309252e2523 100644 --- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java +++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java @@ -239,13 +239,13 @@ public class TimestampCheck { " -J-Djava.security.egd=file:/dev/./urandom" + " -debug -keystore " + TSKS + " -storepass changeit" + " -tsa http://localhost:" + port + "/%d" + - " -signedjar new.jar " + JAR + " old"; + " -signedjar new_%d.jar " + JAR + " old"; } else { cmd = System.getProperty("java.home") + "/bin/jarsigner" + " -J-Djava.security.egd=file:/dev/./urandom" + " -debug -keystore " + TSKS + " -storepass changeit" + " -tsa http://localhost:" + port + "/%d" + - " -signedjar new.jar " + JAR + " old"; + " -signedjar new_%d.jar " + JAR + " old"; } try { @@ -280,7 +280,7 @@ public class TimestampCheck { static void jarsigner(String cmd, int path, boolean expected) throws Exception { System.err.println("Test " + path); - Process p = Runtime.getRuntime().exec(String.format(cmd, path)); + Process p = Runtime.getRuntime().exec(String.format(cmd, path, path)); BufferedReader reader = new BufferedReader( new InputStreamReader(p.getErrorStream())); while (true) { @@ -288,9 +288,25 @@ public class TimestampCheck { if (s == null) break; System.err.println(s); } + + // Will not see noTimestamp warning + boolean seeWarning = false; + reader = new BufferedReader( + new InputStreamReader(p.getInputStream())); + while (true) { + String s = reader.readLine(); + if (s == null) break; + System.err.println(s); + if (s.indexOf("Warning:") >= 0) { + seeWarning = true; + } + } int result = p.waitFor(); if (expected && result != 0 || !expected && result == 0) { throw new Exception("Failed"); } + if (seeWarning) { + throw new Exception("See warning"); + } } } diff --git a/jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh b/jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh index 5fbb7d0b9c4..df6a5739030 100644 --- a/jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh +++ b/jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh @@ -139,7 +139,6 @@ LINES=`$JARSIGNER -verify a.jar -verbose:summary -certs | grep "more)" | wc -l` # 16 and 32 already covered in the first part # ========================================================== -$KT -genkeypair -alias expiring -dname CN=expiring -startdate -1m $KT -genkeypair -alias expired -dname CN=expired -startdate -10m $KT -genkeypair -alias notyetvalid -dname CN=notyetvalid -startdate +1m $KT -genkeypair -alias badku -dname CN=badku -ext KU=cRLSign -validity 365 @@ -154,9 +153,6 @@ $KT -certreq -alias badchain | $KT -gencert -alias ca -validity 365 | \ $KT -importcert -alias badchain $KT -delete -alias ca -$JARSIGNER -strict -keystore js.jks -storepass changeit a.jar expiring -[ $? = 2 ] || exit $LINENO - $JARSIGNER -strict -keystore js.jks -storepass changeit a.jar expired [ $? = 4 ] || exit $LINENO diff --git a/jdk/test/sun/security/tools/jarsigner/ts.sh b/jdk/test/sun/security/tools/jarsigner/ts.sh index b38922692ec..0b89f3dd631 100644 --- a/jdk/test/sun/security/tools/jarsigner/ts.sh +++ b/jdk/test/sun/security/tools/jarsigner/ts.sh @@ -22,7 +22,7 @@ # # @test -# @bug 6543842 6543440 6939248 8009636 +# @bug 6543842 6543440 6939248 8009636 8024302 # @summary checking response of timestamp # # @run shell/timeout=600 ts.sh @@ -53,7 +53,7 @@ fi JAR="${TESTJAVA}${FS}bin${FS}jar" JAVA="${TESTJAVA}${FS}bin${FS}java" JAVAC="${TESTJAVA}${FS}bin${FS}javac" -KT="${TESTJAVA}${FS}bin${FS}keytool -keystore tsks -storepass changeit -keypass changeit -keyalg rsa" +KT="${TESTJAVA}${FS}bin${FS}keytool -keystore tsks -storepass changeit -keypass changeit -keyalg rsa -validity 200" rm tsks echo Nothing > A diff --git a/jdk/test/sun/security/tools/jarsigner/warnings.sh b/jdk/test/sun/security/tools/jarsigner/warnings.sh new file mode 100644 index 00000000000..fbe745585ae --- /dev/null +++ b/jdk/test/sun/security/tools/jarsigner/warnings.sh @@ -0,0 +1,119 @@ +# +# Copyright (c) 2013, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# @test +# @bug 8024302 +# @bug 8026037 +# @summary Clarify jar verifications +# + +if [ "${TESTJAVA}" = "" ] ; then + JAVAC_CMD=`which javac` + TESTJAVA=`dirname $JAVAC_CMD`/.. +fi + +# set platform-dependent variables +OS=`uname -s` +case "$OS" in + Windows_* ) + FS="\\" + ;; + * ) + FS="/" + ;; +esac + +KS=warnings.jks +JFILE=warnings.jar + +KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \ + -keystore $KS" +JAR=$TESTJAVA${FS}bin${FS}jar +JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit" + +rm $KS 2> /dev/null + +LANG=C +export LANG + +echo 12345 > file + +ERR="" + +# Normal signer expiring on 2100-01-01 +$KT -alias s1 -dname CN=s1 -genkey -startdate 2000/01/01 -validity 36525 || ERR="$ERR keytool s1," +# Cert expiring soon, informational warning +$KT -alias s2 -dname CN=s2 -genkey -validity 100 || ERR="$ERR keytool s2," +# Cert expired, severe warning +$KT -alias s3 -dname CN=s3 -genkey -startdate -200d -validity 100 || ERR="$ERR keytool s3," + +# noTimestamp is informatiional warning and includes a date +$JAR cvf $JFILE file +$JARSIGNER $JFILE s1 > output1 || ERR="$ERR jarsigner s1," +$JARSIGNER -strict $JFILE s1 >> output1 || ERR="$ERR jarsigner s1 strict," +$JARSIGNER -verify $JFILE s1 >> output1 || ERR="$ERR jarsigner s1," +$JARSIGNER -verify -strict $JFILE s1 >> output1 || ERR="$ERR jarsigner s1 strict," + +cat output1 | grep Warning || ERR="$ERR s1 warning," +cat output1 | grep Error && ERR="$ERR s1 error," +cat output1 | grep timestamp | grep 2100-01-01 || ERR="$ERR s1 timestamp," +cat output1 | grep "with signer errors" && ERR="$ERR s1 err," + +# hasExpiringCert is informatiional warning +$JAR cvf $JFILE file +$JARSIGNER $JFILE s2 > output2 || ERR="$ERR jarsigner s2," +$JARSIGNER -strict $JFILE s2 >> output2 || ERR="$ERR jarsigner s2 strict," +$JARSIGNER -verify $JFILE s2 >> output2 || ERR="$ERR jarsigner s2," +$JARSIGNER -verify -strict $JFILE s2 >> output2 || ERR="$ERR jarsigner s2 strict," + +cat output2 | grep Warning || ERR="$ERR s2 warning," +cat output2 | grep Error && ERR="$ERR s2 error," +cat output2 | grep timestamp || ERR="$ERR s2 timestamp," +cat output2 | grep "will expire" || ERR="$ERR s2 expiring," +cat output2 | grep "with signer errors" && ERR="$ERR s2 err," + +# hasExpiredCert is severe warning +$JAR cvf $JFILE file +$JARSIGNER $JFILE s3 > output3 || ERR="$ERR jarsigner s3," +$JARSIGNER -strict $JFILE s3 > output3s && ERR="$ERR jarsigner s3 strict," +$JARSIGNER -verify $JFILE s3 >> output3 || ERR="$ERR jarsigner s3," +$JARSIGNER -verify -strict $JFILE s3 >> output3s && ERR="$ERR jarsigner s3 strict," + +# warning without -strict +cat output3 | grep Warning || ERR="$ERR s3 warning," +cat output3 | grep Error && ERR="$ERR s3 error," +cat output3 | grep "with signer errors" && ERR="$ERR s3 err," + +# error with -strict +cat output3s | grep Warning || ERR="$ERR s3s warning," +cat output3s | grep Error || ERR="$ERR s3s error," +cat output3s | grep "with signer errors" || ERR="$ERR s3 err," + +if [ "$ERR" = "" ]; then + exit 0 +else + echo "ERR is $ERR" + exit 1 +fi + + diff --git a/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java b/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java new file mode 100644 index 00000000000..a5310862859 --- /dev/null +++ b/jdk/test/sun/tools/jcmd/TestJcmdDefaults.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2011, 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import static jdk.testlibrary.Asserts.*; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +import jdk.testlibrary.JcmdBase; +import jdk.testlibrary.OutputAnalyzer; +import jdk.testlibrary.Utils; + +/** + * Unit test for jcmd utility. Tests jcmd options which do not send + * requests to a specific JVM process. + */ +/* + * @test + * @bug 7104647 + * @library /lib/testlibrary + * @run main TestJcmdDefaults + */ +public class TestJcmdDefaults { + + private static final String TEST_SRC = System.getProperty("test.src").trim(); + private static final String[] VM_ARGS = new String[] { "-XX:+UsePerfData" }; + private static final String JCMD_LIST_REGEX = "^\\d+\\s*.*"; + + public static void main(String[] args) throws Exception { + testJcmdUsage("-h"); + testJcmdUsage("-help"); + testJcmdDefaults(); + testJcmdDefaults("-l"); + } + + /** + * jcmd -J-XX:+UsePerfData -h + * jcmd -J-XX:+UsePerfData -help + */ + private static void testJcmdUsage(String... jcmdArgs) throws Exception { + OutputAnalyzer output = JcmdBase.jcmdNoPid(VM_ARGS, jcmdArgs); + + assertNotEquals(output.getExitValue(), 0); + verifyOutputAgainstFile(output); + } + + /** + * jcmd -J-XX:+UsePerfData + * jcmd -J-XX:+UsePerfData -l + */ + private static void testJcmdDefaults(String... jcmdArgs) throws Exception { + OutputAnalyzer output = JcmdBase.jcmdNoPid(VM_ARGS, jcmdArgs); + + output.shouldHaveExitValue(0); + output.shouldContain("sun.tools.jcmd.JCmd"); + matchListedProcesses(output); + } + + /** + * Verifies the listed processes match a certain pattern. + * + * The output should look like: + * 12246 sun.tools.jcmd.JCmd + * 24428 com.sun.javatest.regtest.MainWrapper /tmp/jtreg/jtreg-workdir/classes/sun/tools/jcmd/TestJcmdDefaults.jta + * + * @param output The generated output from the jcmd. + * @throws Exception + */ + private static void matchListedProcesses(OutputAnalyzer output) throws Exception { + int matchedCount = output.shouldMatchByLine(JCMD_LIST_REGEX); + assertGreaterThan(matchedCount , 0, + "Found no lines matching pattern: " + JCMD_LIST_REGEX); + } + + private static void verifyOutputAgainstFile(OutputAnalyzer output) throws IOException { + File file = new File(TEST_SRC, "usage.out"); + List fileOutput = Utils.fileAsList(file); + List outputAsLines = output.asLines(); + assertTrue(outputAsLines.containsAll(fileOutput), + "The ouput should contain all content of " + file.getAbsolutePath()); + } + +} diff --git a/jdk/test/sun/tools/jcmd/TestJcmdSanity.java b/jdk/test/sun/tools/jcmd/TestJcmdSanity.java new file mode 100644 index 00000000000..52fa840fe43 --- /dev/null +++ b/jdk/test/sun/tools/jcmd/TestJcmdSanity.java @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2011, 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import static jdk.testlibrary.Asserts.*; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +import jdk.testlibrary.JcmdBase; +import jdk.testlibrary.OutputAnalyzer; +import jdk.testlibrary.ProcessTools; +import jdk.testlibrary.Utils; + +/** + * Unit test for jcmd utility. The test will send different diagnostic command + * requests to the current java process. + */ +/* + * @test + * @bug 7104647 7154822 + * @library /lib/testlibrary + * @run main TestJcmdSanity + */ +public class TestJcmdSanity { + + private static final String TEST_SRC = System.getProperty("test.src").trim(); + private static final String[] VM_ARGS = new String[] { "-XX:+UsePerfData" }; + private static final String JCMD_COMMAND_REGEX = "(\\w|\\.)*"; + private static final String PERF_COUNTER_REGEX = "(\\w|\\.)*\\=.*"; + + public static void main(String[] args) throws Exception { + testJcmdPidHelp(); + testJcmdPidHelpHelp(); + testJcmdPid_f(); + testJcmdPidPerfCounterPrint(); + testJcmdPidBigScript(); + } + + /** + * jcmd -J-XX:+UsePerfData pid help + */ + private static void testJcmdPidHelp() throws Exception { + OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, + new String[] {"help"}); + + output.shouldHaveExitValue(0); + output.shouldNotContain("Exception"); + output.shouldContain(Integer.toString(ProcessTools.getProcessId()) + ":"); + matchJcmdCommands(output); + output.shouldContain("For more information about a specific command use 'help '."); + } + + /** + * jcmd -J-XX:+UsePerfData pid help help + */ + private static void testJcmdPidHelpHelp() throws Exception { + OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, + new String[] {"help", "help"}); + + output.shouldHaveExitValue(0); + verifyOutputAgainstFile(output); + } + + /** + * jcmd -J-XX:+UsePerfData pid PerfCounter.print + */ + private static void testJcmdPidPerfCounterPrint() throws Exception { + OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, + new String[] {"PerfCounter.print"}); + + output.shouldHaveExitValue(0); + matchPerfCounters(output); + } + + /** + * jcmd -J-XX:+UsePerfData pid -f dcmd-script.txt + */ + private static void testJcmdPid_f() throws Exception { + File scrpitFile = new File(TEST_SRC, "dcmd-script.txt"); + OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, + new String[] {"-f", scrpitFile.getAbsolutePath()}); + + output.shouldHaveExitValue(0); + verifyOutputAgainstFile(output); + } + + /** + * Tests that it possible send a file over 1024 bytes large via jcmd -f. + * + * jcmd -J-XX:+UsePerfData pid -f dcmd-big-script.txt + */ + private static void testJcmdPidBigScript() throws Exception { + File scrpitFile = new File(TEST_SRC, "dcmd-big-script.txt"); + OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, + new String[] {"-f", scrpitFile.getAbsolutePath()}); + + output.shouldHaveExitValue(0); + output.shouldNotContain("Exception"); + output.shouldContain(System.getProperty("java.vm.name").trim()); + } + + /** + * Verifies the listed jcmd commands match a certain pattern. + * + * The output of the jcmd commands should look like: + * VM.uptime + * VM.flags + * VM.system_properties + * + * @param output The generated output from the jcmd. + * @throws Exception + */ + private static void matchJcmdCommands(OutputAnalyzer output) throws Exception { + int matchedCount = output.shouldMatchByLine(JCMD_COMMAND_REGEX, + "help", + JCMD_COMMAND_REGEX); + assertGreaterThan(matchedCount , 0, + "Found no lines matching pattern: " + JCMD_COMMAND_REGEX); + } + + /** + * Verifies the generated output from the PerfCounter.print command + * matches a certain pattern. + * + * The output of perf counters should look like: + * java.property.java.vm.name="Java HotSpot(TM) 64-Bit Server VM" + * java.threads.daemon=7 + * sun.rt.javaCommand="com.sun.javatest.regtest.MainWrapper /tmp/jtreg/jtreg-workdir/classes/sun/tools/jcmd/TestJcmdSanity.jta" + * + * @param output The generated output from the PerfCounter.print command. + * @throws Exception + */ + private static void matchPerfCounters(OutputAnalyzer output) throws Exception { + int matchedCount = output.shouldMatchByLineFrom(PERF_COUNTER_REGEX, + PERF_COUNTER_REGEX); + assertGreaterThan(matchedCount , 0, + "Found no lines matching pattern: " + PERF_COUNTER_REGEX); + } + + private static void verifyOutputAgainstFile(OutputAnalyzer output) throws IOException { + File file = new File(TEST_SRC, "help_help.out"); + List fileOutput = Utils.fileAsList(file); + List outputAsLines = output.asLines(); + assertTrue(outputAsLines.containsAll(fileOutput), + "The ouput should contain all content of " + file.getAbsolutePath()); + } + +} diff --git a/jdk/test/sun/tools/jcmd/help_help.out b/jdk/test/sun/tools/jcmd/help_help.out index beaf0f35b94..3f151b92acd 100644 --- a/jdk/test/sun/tools/jcmd/help_help.out +++ b/jdk/test/sun/tools/jcmd/help_help.out @@ -1,7 +1,7 @@ help For more information about a specific command use 'help '. With no argument this will show a list of available commands. 'help all' will show help for all commands. -Impact: Low +Impact: Low Syntax : help [options] [] diff --git a/jdk/test/sun/tools/jcmd/jcmd-Defaults.sh b/jdk/test/sun/tools/jcmd/jcmd-Defaults.sh deleted file mode 100644 index 2d6aa2ebe89..00000000000 --- a/jdk/test/sun/tools/jcmd/jcmd-Defaults.sh +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2011, 2012, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 7104647 -# @run shell jcmd-Defaults.sh -# @summary Test that output of 'jcmd' and 'jcmd -l' match a specific pattern - -JCMD="${TESTJAVA}/bin/jcmd" - -${JCMD} -J-XX:+UsePerfData 2>&1 | awk -f ${TESTSRC}/jcmd_Output1.awk - -${JCMD} -J-XX:+UsePerfData -l 2>&1 | awk -f ${TESTSRC}/jcmd_Output1.awk diff --git a/jdk/test/sun/tools/jcmd/jcmd-big-script.sh b/jdk/test/sun/tools/jcmd/jcmd-big-script.sh deleted file mode 100644 index a101c8cf2a8..00000000000 --- a/jdk/test/sun/tools/jcmd/jcmd-big-script.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -# -# Copyright (c) 2012, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - - -# @test -# @bug 7154822 -# @summary test if we can send a file over 1024 bytes large via jcmd -f -# @author David Buck -# -# @library ../common -# @build SimpleApplication ShutdownSimpleApplication -# @run shell jcmd-big-script.sh - -. ${TESTSRC}/../common/CommonSetup.sh -. ${TESTSRC}/../common/ApplicationSetup.sh - -# Start application and use PORTFILE for coordination -PORTFILE="${TESTCLASSES}"/shutdown.port -startApplication SimpleApplication "${PORTFILE}" - -failed=0; - -# -f - - - -

    $comments

    - EOF - - cp $WDIR/$DIR/$TNAME.lhs.html $WDIR/$DIR/$TNAME.rhs.html - - insert_anchors $lhsfile >> $WDIR/$DIR/$TNAME.lhs.html - insert_anchors $rhsfile >> $WDIR/$DIR/$TNAME.rhs.html - - close='' - - print $close >> $WDIR/$DIR/$TNAME.lhs.html - print $close >> $WDIR/$DIR/$TNAME.rhs.html - - print "$FRAMEHTML$STDHEAD" > $WDIR/$DIR/$TNAME.frames.html - print "$WNAME Framed-Sdiff " \ - "$TPATH/$TNAME" >> $WDIR/$DIR/$TNAME.frames.html - cat >> $WDIR/$DIR/$TNAME.frames.html <<-EOF - - - - - - - - <body id="SUNWwebrev"> - Alas 'frames' webrev requires that your browser supports frames - and has the feature enabled. - </body> - - - - EOF -} - - -# -# fix_postscript -# -# Merge codereview output files to a single conforming postscript file, by: -# - removing all extraneous headers/trailers -# - making the page numbers right -# - removing pages devoid of contents which confuse some -# postscript readers. -# -# From Casper. -# -function fix_postscript -{ - infile=$1 - - cat > /tmp/$$.crmerge.pl << \EOF - - print scalar(<>); # %!PS-Adobe--- - print "%%Orientation: Landscape\n"; - - $pno = 0; - $doprint = 1; - - $page = ""; - - while (<>) { - next if (/^%%Pages:\s*\d+/); - - if (/^%%Page:/) { - if ($pno == 0 || $page =~ /\)S/) { - # Header or single page containing text - print "%%Page: ? $pno\n" if ($pno > 0); - print $page; - $pno++; - } else { - # Empty page, skip it. - } - $page = ""; - $doprint = 1; - next; - } - - # Skip from %%Trailer of one document to Endprolog - # %%Page of the next - $doprint = 0 if (/^%%Trailer/); - $page .= $_ if ($doprint); - } - - if ($page =~ /\)S/) { - print "%%Page: ? $pno\n"; - print $page; - } else { - $pno--; - } - print "%%Trailer\n%%Pages: $pno\n"; -EOF - - $PERL /tmp/$$.crmerge.pl < $infile -} - - -# -# input_cmd | insert_anchors | output_cmd -# -# Flag blocks of difference with sequentially numbered invisible -# anchors. These are used to drive the frames version of the -# sdiffs output. -# -# NOTE: Anchor zero flags the top of the file irrespective of changes, -# an additional anchor is also appended to flag the bottom. -# -# The script detects changed lines as any line that has a "", anc, anc++; - } - - BEGIN { - anc=1; - inblock=1; - printf "
    \n";
    -	}
    -	NF == 0 || /^";
    -		printf "--- EOF ---"
    -        	for(i=0;i<8;i++) printf "\n\n\n\n\n\n\n\n\n\n";
    -		printf "
    " - printf "
    "; - printf "", - anc - 1; - printf ""; - } - ' $1 -} - - -# -# relative_dir -# -# Print a relative return path from $1 to $2. For example if -# $1=/tmp/myreview/raw_files/usr/src/tools/scripts and $2=/tmp/myreview, -# this function would print "../../../../". -# -# In the event that $1 is not in $2 a warning is printed to stderr, -# and $2 is returned-- the result of this is that the resulting webrev -# is not relocatable. -# -function relative_dir -{ - d1=$1 - d2=$2 - if [[ "$d1" == "." ]]; then - print "." - else - typeset cur="${d1##$d2?(/)}" - typeset ret="" - if [[ $d2 == $cur ]]; then # Should never happen. - # Should never happen. - print -u2 "\nWARNING: relative_dir: \"$1\" not relative " - print -u2 "to \"$2\". Check input paths. Framed webrev " - print -u2 "will not be relocatable!" - print $2 - return - fi - - while [[ -n ${cur} ]]; - do - cur=${cur%%*(/)*([!/])} - if [[ -z $ret ]]; then - ret=".." - else - ret="../$ret" - fi - done - print $ret - fi -} - - -# -# frame_nav_js -# -# Emit javascript for frame navigation -# -function frame_nav_js -{ -cat << \EOF -var myInt; -var scrolling=0; -var sfactor = 3; -var scount=10; - -function scrollByPix() { - if (scount<=0) { - sfactor*=1.2; - scount=10; - } - parent.lhs.scrollBy(0,sfactor); - parent.rhs.scrollBy(0,sfactor); - scount--; -} - -function scrollToAnc(num) { - - // Update the value of the anchor in the form which we use as - // storage for this value. setAncValue() will take care of - // correcting for overflow and underflow of the value and return - // us the new value. - num = setAncValue(num); - - // Set location and scroll back a little to expose previous - // lines. - // - // Note that this could be improved: it is possible although - // complex to compute the x and y position of an anchor, and to - // scroll to that location directly. - // - parent.lhs.location.replace(parent.lhs.location.pathname + "#" + num); - parent.rhs.location.replace(parent.rhs.location.pathname + "#" + num); - - parent.lhs.scrollBy(0,-30); - parent.rhs.scrollBy(0,-30); -} - -function getAncValue() -{ - return (parseInt(parent.nav.document.diff.real.value)); -} - -function setAncValue(val) -{ - if (val <= 0) { - val = 0; - parent.nav.document.diff.real.value = val; - parent.nav.document.diff.display.value = "BOF"; - return (val); - } - - // - // The way we compute the max anchor value is to stash it - // inline in the left and right hand side pages-- it's the same - // on each side, so we pluck from the left. - // - maxval = parent.lhs.document.eof.value.value; - if (val < maxval) { - parent.nav.document.diff.real.value = val; - parent.nav.document.diff.display.value = val.toString(); - return (val); - } - - // this must be: val >= maxval - val = maxval; - parent.nav.document.diff.real.value = val; - parent.nav.document.diff.display.value = "EOF"; - return (val); -} - -function stopScroll() { - if (scrolling==1) { - clearInterval(myInt); - scrolling=0; - } -} - -function startScroll() { - stopScroll(); - scrolling=1; - myInt=setInterval("scrollByPix()",10); -} - -function handlePress(b) { - - switch (b) { - case 1 : - scrollToAnc(-1); - break; - case 2 : - scrollToAnc(getAncValue() - 1); - break; - case 3 : - sfactor=-3; - startScroll(); - break; - case 4 : - sfactor=3; - startScroll(); - break; - case 5 : - scrollToAnc(getAncValue() + 1); - break; - case 6 : - scrollToAnc(999999); - break; - } -} - -function handleRelease(b) { - stopScroll(); -} - -function keypress(ev) { - var keynum; - var keychar; - - if (window.event) { // IE - keynum = ev.keyCode; - } else if (ev.which) { // non-IE - keynum = ev.which; - } - - keychar = String.fromCharCode(keynum); - - if (keychar == "k") { - handlePress(2); - return (0); - } else if (keychar == "j" || keychar == " ") { - handlePress(5); - return (0); - } - return (1); -} - -function ValidateDiffNum(){ - val = parent.nav.document.diff.display.value; - if (val == "EOF") { - scrollToAnc(999999); - return; - } - - if (val == "BOF") { - scrollToAnc(0); - return; - } - - i=parseInt(val); - if (isNaN(i)) { - parent.nav.document.diff.display.value = getAncValue(); - } else { - scrollToAnc(i); - } - return false; -} - -EOF -} - -# -# frame_navigation -# -# Output anchor navigation file for framed sdiffs. -# -function frame_navigation -{ - print "$HTML$STDHEAD" - - cat << \EOF -Anchor Navigation - - - - -EOF - - print "" - - cat << \EOF - - - -
    ExampleinsertAfterStart
    - - - - - -
    Diff navigation: - Use 'j' and 'k' for next and previous diffs; or use buttons - at right -
    - - - - - - - - - - - -
    - BOF - Scroll Up - Prev Diff -
    - EOF - Scroll Down - Next Diff
    -
    -
    -
    - - -
    -
    - - -EOF -} - - - -# -# diff_to_html { U | C } -# -# Processes the output of diff to produce an HTML file representing either -# context or unified diffs. -# -diff_to_html() -{ - TNAME=$1 - TPATH=$2 - DIFFTYPE=$3 - COMMENT=$4 - - print "$HTML$STDHEAD" - print "$WNAME ${DIFFTYPE}diff $TPATH" - - if [[ $DIFFTYPE == "U" ]]; then - print "$UDIFFCSS" - fi - - cat <<-EOF - - -

    $TPATH

    - Print this page -
    $COMMENT
    -
    -EOF
    -
    -	html_quote | $AWK '
    -	/^--- new/	{ next }
    -	/^\+\+\+ new/	{ next }
    -	/^--- old/	{ next }
    -	/^\*\*\* old/	{ next }
    -	/^\*\*\*\*/	{ next }
    -	/^-------/	{ printf "

    %s

    \n", $0; next } - /^\@\@.*\@\@$/ { printf "

    \n";
    -			  printf "%s\n", $0;
    -			  next}
    -
    -	/^\*\*\*/	{ printf "
    %s\n", $0; - next} - /^---/ { printf "%s\n", $0; - next} - /^\+/ {printf "%s\n", $0; next} - /^!/ {printf "%s\n", $0; next} - /^-/ {printf "%s\n", $0; next} - {printf "%s\n", $0; next} - ' - - print "
    \n" -} - - -# -# source_to_html { new | old } -# -# Process a plain vanilla source file to transform it into an HTML file. -# -source_to_html() -{ - WHICH=$1 - TNAME=$2 - - print "$HTML$STDHEAD" - print "$WHICH $TNAME" - print "" - print "
    "
    -	html_quote | $AWK '{line += 1 ; printf "%4d %s\n", line, $0 }'
    -	print "
    " -} - -comments_from_mercurial() -{ - fmt=$1 - pfile=$PWS/$2 - cfile=$CWS/$3 - - logdir=`dirname $cfile` - logf=`basename $cfile` - if [ -d $logdir ]; then - ( cd $logdir; - active=`hg status $logf 2>/dev/null` - # If the output from 'hg status' is not empty, it means the file - # hasn't been committed, so don't fetch comments. - if [[ -z $active ]] ; then - if [[ -n $ALL_CREV ]]; then - rev_opt= - for rev in $ALL_CREV; do - rev_opt="$rev_opt --rev $rev" - done - comm=`hg log $rev_opt --follow --template 'rev {rev} : {desc}\n' $logf` - elif [[ -n $FIRST_CREV ]]; then - comm=`hg log --rev $FIRST_CREV:tip --follow --template 'rev {rev} : {desc}\n' $logf` - else - comm=`hg log -l1 --follow --template 'rev {rev} : {desc}\n' $logf` - fi - else - comm="" - fi - if [[ $fmt == "text" ]]; then - print "$comm" - return - fi - - print "$comm" | html_quote | bug2url - ) - fi -} - - -# -# getcomments {text|html} filepath parentpath -# -# Fetch the comments depending on what SCM mode we're in. -# -getcomments() -{ - typeset fmt=$1 - typeset p=$2 - typeset pp=$3 - - comments_from_mercurial $fmt $pp $p -} - -# -# printCI -# -# Print out Code Inspection figures similar to sccs-prt(1) format. -# -function printCI -{ - integer tot=$1 ins=$2 del=$3 mod=$4 unc=$5 - typeset str - if (( tot == 1 )); then - str="line" - else - str="lines" - fi - printf '%d %s changed: %d ins; %d del; %d mod; %d unchg' \ - $tot $str $ins $del $mod $unc -} - - -# -# difflines -# -# Calculate and emit number of added, removed, modified and unchanged lines, -# and total lines changed, the sum of added + removed + modified. -# -function difflines -{ - integer tot mod del ins unc err - typeset filename - - eval $( diff -e $1 $2 | $AWK ' - # Change range of lines: N,Nc - /^[0-9]*,[0-9]*c$/ { - n=split(substr($1,1,length($1)-1), counts, ","); - if (n != 2) { - error=2 - exit; - } - # - # 3,5c means lines 3 , 4 and 5 are changed, a total of 3 lines. - # following would be 5 - 3 = 2! Hence +1 for correction. - # - r=(counts[2]-counts[1])+1; - - # - # Now count replacement lines: each represents a change instead - # of a delete, so increment c and decrement r. - # - while (getline != /^\.$/) { - c++; - r--; - } - # - # If there were more replacement lines than original lines, - # then r will be negative; in this case there are no deletions, - # but there are r changes that should be counted as adds, and - # since r is negative, subtract it from a and add it to c. - # - if (r < 0) { - a-=r; - c+=r; - } - - # - # If there were more original lines than replacement lines, then - # r will be positive; in this case, increment d by that much. - # - if (r > 0) { - d+=r; - } - next; - } - - # Change lines: Nc - /^[0-9].*c$/ { - # The first line is a replacement; any more are additions. - if (getline != /^\.$/) { - c++; - while (getline != /^\.$/) a++; - } - next; - } - - # Add lines: both Na and N,Na - /^[0-9].*a$/ { - while (getline != /^\.$/) a++; - next; - } - - # Delete range of lines: N,Nd - /^[0-9]*,[0-9]*d$/ { - n=split(substr($1,1,length($1)-1), counts, ","); - if (n != 2) { - error=2 - exit; - } - # - # 3,5d means lines 3 , 4 and 5 are deleted, a total of 3 lines. - # following would be 5 - 3 = 2! Hence +1 for correction. - # - r=(counts[2]-counts[1])+1; - d+=r; - next; - } - - # Delete line: Nd. For example 10d says line 10 is deleted. - /^[0-9]*d$/ {d++; next} - - # Should not get here! - { - error=1; - exit; - } - - # Finish off - print results - END { - printf("tot=%d;mod=%d;del=%d;ins=%d;err=%d\n", - (c+d+a), c, d, a, error); - }' ) - - # End of $AWK, Check to see if any trouble occurred. - if (( $? > 0 || err > 0 )); then - print "Unexpected Error occurred reading" \ - "\`diff -e $1 $2\`: \$?=$?, err=" $err - return - fi - - # Accumulate totals - (( TOTL += tot )) - (( TMOD += mod )) - (( TDEL += del )) - (( TINS += ins )) - # Calculate unchanged lines - unc=`wc -l < $1` - if (( unc > 0 )); then - (( unc -= del + mod )) - (( TUNC += unc )) - fi - # print summary - print "\c" - printCI $tot $ins $del $mod $unc - print "" -} - -function outgoing_from_mercurial_forest -{ - hg foutgoing --template 'rev: {rev}\n' $OUTPWS | $FILTER | $AWK ' - BEGIN {ntree=0} - /^comparing/ {next} - /^no changes/ {next} - /^searching/ {next} - /^\[.*\]$/ {tree=substr($1,2,length($1)-2); - trees[ntree++] = tree; - revs[tree]=-1; - next} - /^rev:/ {rev=$2+0; - if (revs[tree] == -1 || rev < revs[tree]) - { revs[tree] = rev; }; - next;} - END {for (tree in trees) - { rev=revs[trees[tree]]; - if (rev > 0) - {printf("%s %d\n",trees[tree],rev-1)} - }}' | while read LINE - do - set - $LINE - TREE=$1 - REV=$2 - A=`hg -R $CWS/$TREE log --rev $REV --template '{node}'` - FSTAT_OPT="--rev $A" - print "Revision: $A $REV" >> $FLIST - treestatus $TREE - done -} - -function flist_from_mercurial_forest -{ - rm -f $FLIST - if [ -z "$Nflag" ]; then - print " File list from hg foutgoing $PWS ..." - outgoing_from_mercurial_forest - HG_LIST_FROM_COMMIT=1 - fi - if [ ! -f $FLIST ]; then - # hg commit hasn't been run see what is lying around - print "\n No outgoing, perhaps you haven't commited." - print " File list from hg fstatus -mard ...\c" - FSTAT_OPT= - fstatus - HG_LIST_FROM_COMMIT= - fi - print " Done." -} - -# -# Used when dealing with the result of 'hg foutgoing' -# When now go down the tree and generate the change list -# -function treestatus -{ - TREE=$1 - HGCMD="hg -R $CWS/$TREE status $FSTAT_OPT" - - $HGCMD -mdn 2>/dev/null | $FILTER | while read F - do - echo $TREE/$F - done >> $FLIST - - # Then all the added files - # But some of these could have been "moved" or renamed ones or copied ones - # so let's make sure we get the proper info - # hg status -aC will produce something like: - # A subdir/File3 - # A subdir/File4 - # File4 - # A subdir/File5 - # The first and last are simple addition while the middle one - # is a move/rename or a copy. We can't distinguish from a rename vs a copy - # without also getting the status of removed files. The middle case above - # is a rename if File4 is also shown a being removed. If File4 is not a - # removed file, then the middle case is a copy from File4 to subdir/File4 - # FIXME - we're not distinguishing copy from rename - $HGCMD -aC | $FILTER | while read LINE; do - ldone="" - while [ -z "$ldone" ]; do - ldone="1" - set - $LINE - if [ $# -eq 2 -a "$1" == "A" ]; then - AFILE=$2 - if read LINE2; then - set - $LINE2 - if [ $# -eq 1 ]; then - echo $TREE/$AFILE $TREE/$1 >>$FLIST - elif [ $# -eq 2 ]; then - echo $TREE/$AFILE >>$FLIST - LINE=$LINE2 - ldone="" - fi - else - echo $TREE/$AFILE >>$FLIST - fi - fi - done - done - $HGCMD -rn | $FILTER | while read RFILE; do - grep "$TREE/$RFILE" $FLIST >/dev/null - if [ $? -eq 1 ]; then - echo $TREE/$RFILE >>$FLIST - fi - done -} - -function fstatus -{ - # - # forest extension is still being changed. For instance the output - # of fstatus used to no prepend the tree path to filenames, but - # this has changed recently. AWK code below does try to handle both - # cases - # - hg fstatus -mdn $FSTAT_OPT 2>/dev/null | $FILTER | $AWK ' - /^\[.*\]$/ {tree=substr($1,2,length($1)-2); next} - $1 != "" {n=index($1,tree); - if (n == 0) - { printf("%s/%s\n",tree,$1)} - else - { printf("%s\n",$1)}}' >> $FLIST - - # - # There is a bug in the output of fstatus -aC on recent versions: it - # inserts a space between the name of the tree and the filename of the - # old file. e.g.: - # - # $ hg fstatus -aC - # [.] - # - # [MyWS] - # A MyWS/subdir/File2 - # MyWS/ File2 - # - # [MyWS2] - # - - hg fstatus -aC $FSTAT_OPT 2>/dev/null | $FILTER | $AWK ' - /^\[.*\]$/ {tree=substr($1,2,length($1)-2); next} - /^A .*/ {n=index($2,tree); - if (n == 0) - { printf("A %s/%s\n",tree,$2)} - else - { printf("A %s\n",$2)}; - next} - /^ / {n=index($1,tree); - if (n == 0) - { printf("%s/%s\n",tree,$1)} - else - { if (NF == 2) - printf("%s/%s\n",tree,$2) - else - printf("%s\n",$1) - }; - next} - ' | while read LINE; do - ldone="" - while [ -z "$ldone" ]; do - ldone="1" - set - $LINE - if [ $# -eq 2 -a "$1" == "A" ]; then - AFILE=$2 - if read LINE2; then - set - $LINE2 - if [ $# -eq 1 ]; then - echo $AFILE $1 >>$FLIST - elif [ $# -eq 2 ]; then - echo $AFILE >>$FLIST - LINE=$LINE2 - ldone="" - fi - else - echo $AFILE >>$FLIST - fi - fi - done - done - hg fstatus -rn $FSTAT_OPT 2>/dev/null | $FILTER | $AWK ' - /^\[.*\]$/ {tree=substr($1,2,length($1)-2); next} - $1 != "" {n=index($1,tree); - if (n == 0) - { printf("%s/%s\n",tree,$1)} - else - { printf("%s\n",$1)}}' | while read RFILE; do - grep "$RFILE" $FLIST >/dev/null - if [ $? -eq 1 ]; then - echo $RFILE >>$FLIST - fi - done -} - -# -# flist_from_mercurial $PWS -# -# Only local file based repositories are supported at present -# since even though we can determine the list from the parent finding -# the changes is harder. -# -# We first look for any outgoing files, this is for when the user has -# run hg commit. If we don't find any then we look with hg status. -# -# We need at least one of default-push or default paths set in .hg/hgrc -# If neither are set we don't know who to compare with. - -function flist_from_mercurial -{ -# if [ "${PWS##ssh://}" != "$PWS" -o \ -# "${PWS##http://}" != "$PWS" -o \ -# "${PWS##https://}" != "$PWS" ]; then -# print "Remote Mercurial repositories not currently supported." -# print "Set default and/or default-push to a local repository" -# exit -# fi - if [[ -n $forestflag ]]; then - HG_LIST_FROM_COMMIT= - flist_from_mercurial_forest - else - STATUS_REV= - if [[ -n $rflag ]]; then - STATUS_REV="--rev $PARENT_REV" - elif [[ -n $OUTREV ]]; then - STATUS_REV="--rev $OUTREV" - else - # hg commit hasn't been run see what is lying around - print "\n No outgoing, perhaps you haven't commited." - fi - # First let's list all the modified or deleted files - - hg status $STATUS_REV -mdn | $FILTER > $FLIST - - # Then all the added files - # But some of these could have been "moved" or renamed ones - # so let's make sure we get the proper info - # hg status -aC will produce something like: - # A subdir/File3 - # A subdir/File4 - # File4 - # A subdir/File5 - # The first and last are simple addition while the middle one - # is a move/rename or a copy. We can't distinguish from a rename vs a copy - # without also getting the status of removed files. The middle case above - # is a rename if File4 is also shown a being removed. If File4 is not a - # removed file, then the middle case is a copy from File4 to subdir/File4 - # FIXME - we're not distinguishing copy from rename - - hg status $STATUS_REV -aC | $FILTER >$FLIST.temp - while read LINE; do - ldone="" - while [ -z "$ldone" ]; do - ldone="1" - set - $LINE - if [ $# -eq 2 -a "$1" == "A" ]; then - AFILE=$2 - if read LINE2; then - set - $LINE2 - if [ $# -eq 1 ]; then - echo $AFILE $1 >>$FLIST - elif [ $# -eq 2 ]; then - echo $AFILE >>$FLIST - LINE=$LINE2 - ldone="" - fi - else - echo $AFILE >>$FLIST - fi - fi - done - done < $FLIST.temp - hg status $STATUS_REV -rn | $FILTER > $FLIST.temp - while read RFILE; do - grep "$RFILE" $FLIST >/dev/null - if [ $? -eq 1 ]; then - echo $RFILE >>$FLIST - fi - done < $FLIST.temp - rm -f $FLIST.temp - fi -} - -function env_from_flist -{ - [[ -r $FLIST ]] || return - - # - # Use "eval" to set env variables that are listed in the file - # list. Then copy those into our local versions of those - # variables if they have not been set already. - # - eval `sed -e "s/#.*$//" $FLIST | grep = ` - - [[ -z $codemgr_ws && -n $CODEMGR_WS ]] && codemgr_ws=$CODEMGR_WS - - # - # Check to see if CODEMGR_PARENT is set in the flist file. - # - [[ -z $codemgr_parent && -n $CODEMGR_PARENT ]] && \ - codemgr_parent=$CODEMGR_PARENT -} - -# -# detect_scm -# -# We dynamically test the SCM type; this allows future extensions to -# new SCM types -# -function detect_scm -{ - if hg root >/dev/null ; then - print "mercurial" - else - print "unknown" - fi -} - -function look_for_prog -{ - typeset path - typeset ppath - typeset progname=$1 - - DEVTOOLS= - OS=`uname` - if [[ "$OS" == "SunOS" ]]; then - DEVTOOLS="/java/devtools/`uname -p`/bin" - elif [[ "$OS" == "Linux" ]]; then - DEVTOOLS="/java/devtools/linux/bin" - fi - - ppath=$PATH - ppath=$ppath:/usr/sfw/bin:/usr/bin:/usr/sbin - ppath=$ppath:/opt/teamware/bin:/opt/onbld/bin - ppath=$ppath:/opt/onbld/bin/`uname -p` - ppath=$ppath:/java/devtools/share/bin:$DEVTOOLS - - PATH=$ppath prog=`whence $progname` - if [[ -n $prog ]]; then - print $prog - fi -} - -# -# Find the parent for $1 -# -function find_outrev -{ - crev=$1 - prev=`hg log -r $crev --template '{parents}\n'` - if [[ -z "$prev" ]] - then - # No specific parent means previous changeset is parent - prev=`expr $crev - 1` - else - # Format is either of the following two: - # 546:7df6fcf1183b - # 548:16f1915bb5cd 547:ffaa4e775815 - prev=`echo $prev | sed -e 's/\([0-9]*\):.*/\1/'` - fi - print $prev -} - -function extract_ssh_infos -{ - CMD=$1 - if expr "$CMD" : 'ssh://[^/]*@' >/dev/null; then - ssh_user=`echo $CMD | sed -e 's/ssh:\/\/\(.*\)@.*/\1/'` - ssh_host=`echo $CMD | sed -e 's/ssh:\/\/.*@\([^/]*\)\/.*/\1/'` - ssh_dir=`echo $CMD | sed -e 's/ssh:\/\/.*@[^/]*\/\(.*\)/\1/'` - else - ssh_user= - ssh_host=`echo $CMD | sed -e 's/ssh:\/\/\([^/]*\)\/.*/\1/'` - ssh_dir=`echo $CMD | sed -e 's/ssh:\/\/[^/]*\/\(.*\)/\1/'` - fi - -} - -function build_old_new_mercurial -{ - olddir=$1 - newdir=$2 - DIR=$3 - F=$4 - # - # new version of the file. - # - rm -rf $newdir/$DIR/$F - if [ -f $F ]; then - cp $F $newdir/$DIR/$F - fi - - # - # Old version of the file. - # - rm -rf $olddir/$DIR/$F - - if [ -n "$PWS" ]; then - if expr "$PWS" : 'ssh://' >/dev/null - then - extract_ssh_infos $PWS - if [ -n "$ssh_user" ]; then - parent="ssh -l $ssh_user $ssh_host hg -R $ssh_dir --cwd $ssh_dir" - else - parent="ssh $ssh_host hg -R $ssh_dir --cwd $ssh_dir" - fi - else - parent="hg -R $PWS --cwd $PWS" - fi - else - parent="" - fi - - if [ -z "$rename" ]; then - if [ -n "$rflag" ]; then - parentrev=$PARENT_REV - elif [ "$HG_LIST_FROM_COMMIT" -eq 1 ]; then - parentrev=$OUTREV - else - if [[ -n $HG_BRANCH ]]; then - parentrev=$HG_BRANCH - else - parentrev="tip" - fi - fi - - if [ -n "$parentrev" ]; then - if [ -z "$parent" ]; then - hg cat --rev $parentrev --output $olddir/$DIR/$F $F 2>/dev/null - else - # when specifying a workspace we have to provide - # the full path - $parent cat --rev $parentrev --output $olddir/$DIR/$F $DIR/$F 2>/dev/null - fi - fi - else - # It's a rename (or a move), or a copy, so let's make sure we move - # to the right directory first, then restore it once done - current_dir=`pwd` - hg_root=`hg root` - cd $CWS - if [ -n "$rflag" ]; then - parentrev=$PARENT_REV - elif [ "$HG_LIST_FROM_COMMIT" -eq 1 ]; then - parentrev=$OUTREV - fi - if [ -z "$parentrev" ]; then - parentrev=`hg log -l1 $PDIR/$PF | $AWK -F: '/changeset/ {print $2}'` - fi - if [ -n "$parentrev" ]; then - mkdir -p $olddir/$PDIR - if [ -z "$parent" ]; then - hg cat -R $hg_root --rev $parentrev --output $olddir/$PDIR/$PF $PDIR/$PF 2>/dev/null - else - $parent cat --rev $parentrev --output $olddir/$PDIR/$PF $PDIR/$PF 2>/dev/null - fi - fi - cd $current_dir - fi -} - -function build_old_new -{ - if [[ $SCM_MODE == "mercurial" ]]; then - build_old_new_mercurial $@ - fi -} - - -# -# Usage message. -# -function usage -{ - print "Usage:\twebrev [options] - webrev [options] ( | - ) - -Options: - -v: Print the version of this tool. - -b: Do not ignore changes in the amount of white space. - -c : Include link to CR (aka bugid) in the main page. - -i : Include in the index.html file. - -o : Output webrev to specified directory. - -p : Use specified parent wkspc or basis for comparison - -u : Use that username instead of 'guessing' one. - -m: Forces the use of Mercurial - -Mercurial only options: - -r rev: Compare against a specified revision - -N: Skip 'hg outgoing', use only 'hg status' - -f: Use the forest extension - -Arguments: - : Optional file containing list of files to include in webrev - -: read list of files to include in webrev from standard input - -Environment: - WDIR: Control the output directory. - WEBREV_BUGURL: Control the URL prefix for bugids. - -" - - exit 2 -} - -# -# -# Main program starts here -# -# -LANG="C" -LC_ALL="C" -export LANG LC_ALL -trap "rm -f /tmp/$$.* ; exit" 0 1 2 3 15 - -set +o noclobber - -[[ -z $WDIFF ]] && WDIFF=`look_for_prog wdiff` -[[ -z $CODEREVIEW ]] && CODEREVIEW=`look_for_prog codereview` -[[ -z $PS2PDF ]] && PS2PDF=`look_for_prog ps2pdf` -[[ -z $PERL ]] && PERL=`look_for_prog perl` -[[ -z $SCCS ]] && SCCS=`look_for_prog sccs` -[[ -z $AWK ]] && AWK=`look_for_prog nawk` -[[ -z $AWK ]] && AWK=`look_for_prog gawk` -[[ -z $AWK ]] && AWK=`look_for_prog awk` -[[ -z $JAR ]] && JAR=`look_for_prog jar` -[[ -z $ZIP ]] && ZIP=`look_for_prog zip` -[[ -z $GETENT ]] && GETENT=`look_for_prog getent` -[[ -z $WGET ]] && WGET=`look_for_prog wget` - -if uname | grep CYGWIN >/dev/null -then - ISWIN=1 - # Under windows mercurial outputs '\' instead of '/' - FILTER="tr '\\\\' '/'" -else - FILTER="cat" -fi - -if [[ ! -x $PERL ]]; then - print -u2 "Error: No perl interpreter found. Exiting." - exit 1 -fi - -# -# These aren't fatal, but we want to note them to the user. -# -# [[ ! -x $CODEREVIEW ]] && print -u2 "WARNING: codereview(1) not found." -# [[ ! -x $PS2PDF ]] && print -u2 "WARNING: ps2pdf(1) not found." -# [[ ! -x $WDIFF ]] && print -u2 "WARNING: wdiff not found." - -# Declare global total counters. -integer TOTL TINS TDEL TMOD TUNC - -flist_mode= -flist_file= -bflag= -iflag= -oflag= -pflag= -uflag= -Oflag= -rflag= -Nflag= -forestflag= -while getopts "c:i:o:p:r:u:mONvfb" opt -do - case $opt in - b) bflag=1;; - - i) iflag=1 - INCLUDE_FILE=$OPTARG;; - - o) oflag=1 - WDIR=$OPTARG;; - - p) pflag=1 - codemgr_parent=$OPTARG;; - - u) uflag=1 - username=$OPTARG;; - - c) if [[ -z $CRID ]]; then - CRID=$OPTARG - else - CRID="$CRID $OPTARG" - fi;; - - m) SCM_MODE="mercurial";; - - O) Oflag=1;; # ignored (bugs are now all visible at bugs.openjdk.java.net) - - N) Nflag=1;; - - f) forestflag=1;; - - r) rflag=1 - PARENT_REV=$OPTARG;; - - v) print "$0 version: $WEBREV_UPDATED";; - - - ?) usage;; - esac -done - -FLIST=/tmp/$$.flist -HG_LIST_FROM_COMMIT= - -if [[ -n $forestflag && -n $rflag ]]; then - print "The -r flag is incompatible with the use of forests" - exit 2 -fi - -# -# If this manually set as the parent, and it appears to be an earlier webrev, -# then note that fact and set the parent to the raw_files/new subdirectory. -# -if [[ -n $pflag && -d $codemgr_parent/raw_files/new ]]; then - parent_webrev="$codemgr_parent" - codemgr_parent="$codemgr_parent/raw_files/new" -fi - -shift $(($OPTIND - 1)) - -if [[ $1 == "-" ]]; then - cat > $FLIST - flist_mode="stdin" - flist_done=1 - shift -elif [[ -n $1 ]]; then - if [[ ! -r $1 ]]; then - print -u2 "$1: no such file or not readable" - usage - fi - cat $1 > $FLIST - flist_mode="file" - flist_file=$1 - flist_done=1 - shift -else - flist_mode="auto" -fi - -# -# Before we go on to further consider -l and -w, work out which SCM we think -# is in use. -# -if [[ -z $SCM_MODE ]]; then - SCM_MODE=`detect_scm $FLIST` -fi -if [[ $SCM_MODE == "unknown" ]]; then - print -u2 "Unable to determine SCM type currently in use." - print -u2 "For mercurial: webrev runs 'hg root'." - exit 1 -fi - -print -u2 " SCM detected: $SCM_MODE" - - -if [[ $SCM_MODE == "mercurial" ]]; then - # - # determine Workspace and parent workspace paths - # - CWS=`hg root | $FILTER` - if [[ -n $pflag && -z "$PWS" ]]; then - OUTPWS=$codemgr_parent - # Let's try to expand it if it's an alias defined in [paths] - tmp=`hg path $OUTPWS 2>/dev/null | $FILTER` - if [[ -n $tmp ]]; then - OUTPWS="$tmp" - fi - if [[ -n $rflag ]]; then - if expr "$codemgr_parent" : 'ssh://.*' >/dev/null; then - PWS=$codemgr_parent - else - PWS=`hg -R "$codemgr_parent" root 2>/dev/null | $FILTER` - fi - fi - fi - # - # OUTPWS is the parent repository to use when using 'hg outgoing' - # - if [[ -z $Nflag ]]; then - if [[ -n $forestflag ]]; then - # - # for forest we have to rely on properly set default and - # default-push because they can be different from the top one. - # unless of course it was explicitly specified with -p - if [[ -z $pflag ]]; then - OUTPWS= - fi - else - # - # Unfortunately mercurial is bugged and doesn't handle - # aliases correctly in 'hg path default' - # So let's do it ourselves. Sigh... - if [[ -z "$OUTPWS" ]]; then - OUTPWS=`grep default-push $CWS/.hg/hgrc | $AWK '{print $3}' | $FILTER` - fi - # Still empty, means no default-push - if [[ -z "$OUTPWS" ]]; then - OUTPWS=`grep 'default =' $CWS/.hg/hgrc | $AWK '{print $3}' | $FILTER` - fi - # Let's try to expand it if it's an alias defined in [paths] - tmp=`hg path $OUTPWS 2>/dev/null | $FILTER` - if [[ -n $tmp ]]; then - OUTPWS="$tmp" - fi - fi - fi - # - # OUTPWS may contain username:password, let's make sure we remove the - # sensitive information before we print out anything in the HTML - # - OUTPWS2=$OUTPWS - if [[ -n $OUTPWS ]]; then - if [[ `expr "$OUTPWS" : '.*://[^/]*@.*'` -gt 0 ]]; then - # Remove everything between '://' and '@' - OUTPWS2=`echo $OUTPWS | sed -e 's/\(.*:\/\/\).*@\(.*\)/\1\2/'` - fi - fi - - if [[ -z $HG_BRANCH ]]; then - HG_BRANCH=`hg branch` - if [ "$HG_BRANCH" == "default" ]; then - # - # 'default' means no particular branch, so let's cancel that - # - HG_BRANCH= - fi - fi - - if [[ -z $forestflag ]]; then - if [[ -z $Nflag ]]; then - # - # If no "-N", always do "hg outgoing" against parent - # repository to determine list of outgoing revisions. - # - ALL_CREV=`hg outgoing -q --template '{rev}\n' $OUTPWS | sort -n` - if [[ -n $ALL_CREV ]]; then - FIRST_CREV=`echo "$ALL_CREV" | head -1` - # - # If no "-r", choose revision to compare against by - # finding the latest revision not in the outgoing list. - # - if [[ -z $rflag ]]; then - OUTREV=`find_outrev "$FIRST_CREV"` - if [[ -n $OUTREV ]]; then - HG_LIST_FROM_COMMIT=1 - fi - fi - fi - elif [[ -n $rflag ]]; then - # - # If skipping "hg outgoing" but still comparing against a - # specific revision (not the tip), set revision for comment - # accumulation. - # - FIRST_CREV=`hg log --rev $PARENT_REV --template '{rev}'` - FIRST_CREV=`expr $FIRST_CREV + 1` - fi - fi - #Let's check if a merge is needed, if so, issue a warning - PREV=`hg parent | grep '^tag:.*tip$'` - if [[ -z $PREV ]]; then - print "WARNING: parent rev is not tip. Maybe an update or merge is needed" - fi -fi - -if [[ $flist_mode == "stdin" ]]; then - print -u2 " File list from: standard input" -elif [[ $flist_mode == "file" ]]; then - print -u2 " File list from: $flist_file" -fi - -if [[ $# -gt 0 ]]; then - print -u2 "WARNING: unused arguments: $*" -fi - -if [[ $SCM_MODE == "mercurial" ]]; then - if [[ -z $flist_done ]]; then - flist_from_mercurial $PWS - fi -fi - -# -# If the user didn't specify a -i option, check to see if there is a -# webrev-info file in the workspace directory. -# -if [[ -z $iflag && -r "$CWS/webrev-info" ]]; then - iflag=1 - INCLUDE_FILE="$CWS/webrev-info" -fi - -if [[ -n $iflag ]]; then - if [[ ! -r $INCLUDE_FILE ]]; then - print -u2 "include file '$INCLUDE_FILE' does not exist or is" \ - "not readable." - exit 1 - else - # - # $INCLUDE_FILE may be a relative path, and the script alters - # PWD, so we just stash a copy in /tmp. - # - cp $INCLUDE_FILE /tmp/$$.include - fi -fi - -# -# Output directory. -# -if [[ -z $WDIR ]]; then - WDIR=$CWS/webrev -else - # If the output directory doesn't end with '/webrev' or '/webrev/' - # then add '/webrev'. This is for backward compatibility - if ! expr $WDIR : '.*/webrev/\?$' >/dev/null - then - WDIR=$WDIR/webrev - fi -fi -# WDIR=${WDIR:-$CWS/webrev} - -# -# Name of the webrev, derived from the workspace name; in the -# future this could potentially be an option. -# -# Let's keep what's after the last '/' -WNAME=${CWS##*/} - -# -# If WDIR doesn't start with '/' or 'x:' prepend the current dir -# -if [ ${WDIR%%/*} ]; then - if [[ -n $ISWIN ]]; then - if [ ${WDIR%%[A-Za-z]:*} ]; then - WDIR=$PWD/$WDIR - fi - else - WDIR=$PWD/$WDIR - fi -fi - -if [[ ! -d $WDIR ]]; then - mkdir -p $WDIR - [[ $? != 0 ]] && exit 1 -fi - -# -# Summarize what we're going to do. -# -print " Workspace: $CWS" -if [[ -n $parent_webrev ]]; then - print "Compare against: webrev at $parent_webrev" -elif [[ -n $OUTPWS2 ]]; then - print "Compare against: $OUTPWS2" -fi -if [[ -n $HG_BRANCH ]]; then - print " Branch: $HG_BRANCH" -fi -if [[ -n $rflag ]]; then - print "Compare against version: $PARENT_REV" -fi -[[ -n $INCLUDE_FILE ]] && print " Including: $INCLUDE_FILE" -print " Output to: $WDIR" - -# -# Save the file list in the webrev dir -# -[[ ! $FLIST -ef $WDIR/file.list ]] && cp $FLIST $WDIR/file.list - -# -# Bug IDs will be replaced by a URL. Order of precedence -# is: default location, $WEBREV_BUGURL -# -BUGURL='https://bugs.openjdk.java.net/browse/' -[[ -n $WEBREV_BUGURL ]] && BUGURL="$WEBREV_BUGURL" -IDPREFIX='JDK-' - - -rm -f $WDIR/$WNAME.patch -rm -f $WDIR/$WNAME.changeset -rm -f $WDIR/$WNAME.ps -rm -f $WDIR/$WNAME.pdf - -touch $WDIR/$WNAME.patch - -print " Output Files:" - -# -# Clean up the file list: Remove comments, blank lines and env variables. -# -sed -e "s/#.*$//" -e "/=/d" -e "/^[ ]*$/d" $FLIST > /tmp/$$.flist.clean -FLIST=/tmp/$$.flist.clean - -# -# Clean up residual raw files -# -if [ -d $WDIR/raw_files ]; then - rm -rf $WDIR/raw_files 2>/dev/null -fi - -# -# Should we ignore changes in white spaces when generating diffs? -# -if [[ -n $bflag ]]; then - DIFFOPTS="-t" -else - DIFFOPTS="-bt" -fi -# -# First pass through the files: generate the per-file webrev HTML-files. -# -while read LINE -do - set - $LINE - P=$1 - - if [[ $1 == "Revision:" ]]; then - OUTREV=$2 - continue - fi - # - # Normally, each line in the file list is just a pathname of a - # file that has been modified or created in the child. A file - # that is renamed in the child workspace has two names on the - # line: new name followed by the old name. - # - oldname="" - oldpath="" - rename= - if [[ $# -eq 2 ]]; then - PP=$2 # old filename - oldname=" (was $PP)" - oldpath="$PP" - rename=1 - PDIR=${PP%/*} - if [[ $PDIR == $PP ]]; then - PDIR="." # File at root of workspace - fi - - PF=${PP##*/} - - DIR=${P%/*} - if [[ $DIR == $P ]]; then - DIR="." # File at root of workspace - fi - - F=${P##*/} - else - DIR=${P%/*} - if [[ "$DIR" == "$P" ]]; then - DIR="." # File at root of workspace - fi - - F=${P##*/} - - PP=$P - PDIR=$DIR - PF=$F - fi - - # Make the webrev directory if necessary as it may have been - # removed because it was empty - if [ ! -d $CWS/$DIR ]; then - mkdir -p $CWS/$DIR - fi - - COMM=`getcomments html $P $PP` - - print "\t$P$oldname\n\t\t\c" - - # Make the webrev mirror directory if necessary - mkdir -p $WDIR/$DIR - - # cd to the directory so the names are short - cd $CWS/$DIR - - # - # We stash old and new files into parallel directories in /tmp - # and do our diffs there. This makes it possible to generate - # clean looking diffs which don't have absolute paths present. - # - olddir=$WDIR/raw_files/old - newdir=$WDIR/raw_files/new - mkdir -p $olddir - mkdir -p $newdir - mkdir -p $olddir/$PDIR - mkdir -p $newdir/$DIR - - build_old_new $olddir $newdir $DIR $F - - if [[ ! -f $F && ! -f $olddir/$DIR/$F ]]; then - print "*** Error: file not in parent or child" - continue - fi - - cd $WDIR/raw_files - ofile=old/$PDIR/$PF - nfile=new/$DIR/$F - - mv_but_nodiff= - cmp $ofile $nfile > /dev/null 2>&1 - if [[ $? == 0 && $rename == 1 ]]; then - mv_but_nodiff=1 - fi - - # - # Cleaning up - # - rm -f $WDIR/$DIR/$F.cdiff.html - rm -f $WDIR/$DIR/$F.udiff.html - rm -f $WDIR/$DIR/$F.wdiff.html - rm -f $WDIR/$DIR/$F.sdiff.html - rm -f $WDIR/$DIR/$F-.html - rm -f $WDIR/$DIR/$F.html - - its_a_jar= - if expr $F : '.*\.jar' \| $F : '.*\.zip' >/dev/null; then - its_a_jar=1 - # It's a JAR or ZIP file, let's do it differently - if [[ -z $JAR ]]; then - print "No access to jar, so can't produce diffs for jar or zip files" - else - if [ -f $ofile ]; then - $JAR -tvf $ofile >"$ofile".lst - fi - if [ -f $nfile ]; then - $JAR -tvf $nfile >"$nfile".lst - fi - - if [[ -f $ofile && -f $nfile && -z $mv_but_nodiff ]]; then - - ${CDIFFCMD:-diff -bt -C 5} $ofile.lst $nfile.lst > $WDIR/$DIR/$F.cdiff - diff_to_html $F $DIR/$F "C" "$COMM" < $WDIR/$DIR/$F.cdiff \ - > $WDIR/$DIR/$F.cdiff.html - print " cdiffs\c" - - ${UDIFFCMD:-diff -bt -U 5} $ofile.lst $nfile.lst > $WDIR/$DIR/$F.udiff - diff_to_html $F $DIR/$F "U" "$COMM" < $WDIR/$DIR/$F.udiff \ - > $WDIR/$DIR/$F.udiff.html - - print " udiffs\c" - - if [[ -x $WDIFF ]]; then - $WDIFF -c "$COMM" \ - -t "$WNAME Wdiff $DIR/$F" $ofile.lst $nfile.lst > \ - $WDIR/$DIR/$F.wdiff.html 2>/dev/null - if [[ $? -eq 0 ]]; then - print " wdiffs\c" - else - print " wdiffs[fail]\c" - fi - fi - - sdiff_to_html $ofile $nfile $F $DIR "$COMM" \ - > $WDIR/$DIR/$F.sdiff.html - print " sdiffs\c" - - print " frames\c" - - rm -f $WDIR/$DIR/$F.cdiff $WDIR/$DIR/$F.udiff - - difflines $ofile.lst $nfile.lst > $WDIR/$DIR/$F.count - - elif [[ -f $ofile && -f $nfile && -n $mv_but_nodiff ]]; then - # renamed file: may also have differences - difflines $ofile.lst $nfile.lst > $WDIR/$DIR/$F.count - elif [[ -f $nfile ]]; then - # new file: count added lines - difflines /dev/null $nfile.lst > $WDIR/$DIR/$F.count - elif [[ -f $ofile ]]; then - # old file: count deleted lines - difflines $ofile.lst /dev/null > $WDIR/$DIR/$F.count - fi - fi - else - - # - # If we have old and new versions of the file then run the - # appropriate diffs. This is complicated by a couple of factors: - # - # - renames must be handled specially: we emit a 'remove' - # diff and an 'add' diff - # - new files and deleted files must be handled specially - # - Solaris patch(1m) can't cope with file creation - # (and hence renames) as of this writing. - # - To make matters worse, gnu patch doesn't interpret the - # output of Solaris diff properly when it comes to - # adds and deletes. We need to do some "cleansing" - # transformations: - # [to add a file] @@ -1,0 +X,Y @@ --> @@ -0,0 +X,Y @@ - # [to del a file] @@ -X,Y +1,0 @@ --> @@ -X,Y +0,0 @@ - # - cleanse_rmfile="sed 's/^\(@@ [0-9+,-]*\) [0-9+,-]* @@$/\1 +0,0 @@/'" - cleanse_newfile="sed 's/^@@ [0-9+,-]* \([0-9+,-]* @@\)$/@@ -0,0 \1/'" - - if [[ ! "$HG_LIST_FROM_COMMIT" -eq 1 || ! $flist_mode == "auto" ]]; - then - # Only need to generate a patch file here if there are no commits in outgoing - # or if we've specified a file list - rm -f $WDIR/$DIR/$F.patch - if [[ -z $rename ]]; then - if [ ! -f $ofile ]; then - diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \ - > $WDIR/$DIR/$F.patch - elif [ ! -f $nfile ]; then - diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \ - > $WDIR/$DIR/$F.patch - else - diff -u $ofile $nfile > $WDIR/$DIR/$F.patch - fi - else - diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \ - > $WDIR/$DIR/$F.patch - - diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \ - >> $WDIR/$DIR/$F.patch - - fi - - - # - # Tack the patch we just made onto the accumulated patch for the - # whole wad. - # - cat $WDIR/$DIR/$F.patch >> $WDIR/$WNAME.patch - fi - - print " patch\c" - - if [[ -f $ofile && -f $nfile && -z $mv_but_nodiff ]]; then - - ${CDIFFCMD:-diff -bt -C 5} $ofile $nfile > $WDIR/$DIR/$F.cdiff - diff_to_html $F $DIR/$F "C" "$COMM" < $WDIR/$DIR/$F.cdiff \ - > $WDIR/$DIR/$F.cdiff.html - print " cdiffs\c" - - ${UDIFFCMD:-diff -bt -U 5} $ofile $nfile > $WDIR/$DIR/$F.udiff - diff_to_html $F $DIR/$F "U" "$COMM" < $WDIR/$DIR/$F.udiff \ - > $WDIR/$DIR/$F.udiff.html - - print " udiffs\c" - - if [[ -x $WDIFF ]]; then - $WDIFF -c "$COMM" \ - -t "$WNAME Wdiff $DIR/$F" $ofile $nfile > \ - $WDIR/$DIR/$F.wdiff.html 2>/dev/null - if [[ $? -eq 0 ]]; then - print " wdiffs\c" - else - print " wdiffs[fail]\c" - fi - fi - - sdiff_to_html $ofile $nfile $F $DIR "$COMM" \ - > $WDIR/$DIR/$F.sdiff.html - print " sdiffs\c" - - print " frames\c" - - rm -f $WDIR/$DIR/$F.cdiff $WDIR/$DIR/$F.udiff - - difflines $ofile $nfile > $WDIR/$DIR/$F.count - - elif [[ -f $ofile && -f $nfile && -n $mv_but_nodiff ]]; then - # renamed file: may also have differences - difflines $ofile $nfile > $WDIR/$DIR/$F.count - elif [[ -f $nfile ]]; then - # new file: count added lines - difflines /dev/null $nfile > $WDIR/$DIR/$F.count - elif [[ -f $ofile ]]; then - # old file: count deleted lines - difflines $ofile /dev/null > $WDIR/$DIR/$F.count - fi - fi - # - # Now we generate the postscript for this file. We generate diffs - # only in the event that there is delta, or the file is new (it seems - # tree-killing to print out the contents of deleted files). - # - if [[ -f $nfile ]]; then - ocr=$ofile - [[ ! -f $ofile ]] && ocr=/dev/null - - if [[ -z $mv_but_nodiff ]]; then - textcomm=`getcomments text $P $PP` - if [[ -x $CODEREVIEW ]]; then - $CODEREVIEW -y "$textcomm" \ - -e $ocr $nfile \ - > /tmp/$$.psfile 2>/dev/null && - cat /tmp/$$.psfile >> $WDIR/$WNAME.ps - if [[ $? -eq 0 ]]; then - print " ps\c" - else - print " ps[fail]\c" - fi - fi - fi - fi - - if [[ -f $ofile && -z $mv_but_nodiff ]]; then - if [[ -n $its_a_jar ]]; then - source_to_html Old $P < $ofile.lst > $WDIR/$DIR/$F-.html - else - source_to_html Old $P < $ofile > $WDIR/$DIR/$F-.html - fi - print " old\c" - fi - - if [[ -f $nfile ]]; then - if [[ -n $its_a_jar ]]; then - source_to_html New $P < $nfile.lst > $WDIR/$DIR/$F.html - else - source_to_html New $P < $nfile > $WDIR/$DIR/$F.html - fi - print " new\c" - fi - - print -done < $FLIST - -# Create the new style mercurial patch here using hg export -r [all-revs] -g -o $CHANGESETPATH -if [[ $SCM_MODE == "mercurial" ]]; then - if [[ "$HG_LIST_FROM_COMMIT" -eq 1 && $flist_mode == "auto" ]]; then - EXPORTCHANGESET="$WNAME.changeset" - CHANGESETPATH=${WDIR}/${EXPORTCHANGESET} - rm -f $CHANGESETPATH - touch $CHANGESETPATH - if [[ -n $ALL_CREV ]]; then - rev_opt= - for rev in $ALL_CREV; do - rev_opt="$rev_opt --rev $rev" - done - elif [[ -n $FIRST_CREV ]]; then - rev_opt="--rev $FIRST_CREV" - fi - - if [[ -n $rev_opt ]]; then - (cd $CWS;hg export -g $rev_opt -o $CHANGESETPATH) - echo "Created changeset: $CHANGESETPATH" 1>&2 - # Use it in place of the jdk.patch created above - rm -f $WDIR/$WNAME.patch - fi - set +x - fi -fi - -frame_nav_js > $WDIR/ancnav.js -frame_navigation > $WDIR/ancnav.html - -if [[ -f $WDIR/$WNAME.ps && -x $CODEREVIEW && -x $PS2PDF ]]; then - print " Generating PDF: \c" - fix_postscript $WDIR/$WNAME.ps | $PS2PDF - > $WDIR/$WNAME.pdf - print "Done." -fi - -# Now build the index.html file that contains -# links to the source files and their diffs. - -cd $CWS - -# Save total changed lines for Code Inspection. -print "$TOTL" > $WDIR/TotalChangedLines - -print " index.html: \c" -INDEXFILE=$WDIR/index.html -exec 3<&1 # duplicate stdout to FD3. -exec 1<&- # Close stdout. -exec > $INDEXFILE # Open stdout to index file. - -print "$HTML" -print "" -print "$STDHEAD" -print "$WNAME" -print "" -print "" -print "
    " -print "

    Code Review for $WNAME

    " - -print "" - -if [[ -z $uflag ]]; then - if [[ $SCM_MODE == "mercurial" ]]; then - # - # Let's try to extract the user name from the .hgrc file - # - username=`grep '^username' $HOME/.hgrc | sed 's/^username[ ]*=[ ]*\(.*\)/\1/'` - fi - - if [[ -z $username ]]; then - # - # Figure out the username and gcos name. To maintain compatibility - # with passwd(4), we must support '&' substitutions. - # - username=`id | cut -d '(' -f 2 | cut -d ')' -f 1` - if [[ -x $GETENT ]]; then - realname=`$GETENT passwd $username | cut -d':' -f 5 | cut -d ',' -f 1` - fi - userupper=`print "$username" | sed 's/\<./\u&/g'` - realname=`print $realname | sed s/\&/$userupper/` - fi -fi - -date="on `date`" - -if [[ -n "$username" && -n "$realname" ]]; then - print "" - print "" -elif [[ -n "$username" ]]; then - print "" -fi - -print "" -if [[ -n $parent_webrev ]]; then - print "" -if [[ -n $rflag ]]; then - print "" -elif [[ -n $OUTREV ]]; then - if [[ -z $forestflag ]]; then - print "" - fi -fi -if [[ -n $HG_BRANCH ]]; then - print "" -fi - -print "" - -if [[ -f $WDIR/$WNAME.patch ]]; then - print "" -elif [[ -f $CHANGESETPATH ]]; then - print "" -fi - -if [[ -f $WDIR/$WNAME.pdf ]]; then - print "" -fi - -if [[ -n "$iflag" ]]; then - print "" -fi -# Add links to referenced CRs, if any -# URL has a like: -# <title>[#JDK-8024688] b106-lambda: j.u.Map.merge doesn't work as specified if contains key:null pair - Java Bug System -# we format this to: -# JDK-8024688: b106-lambda: j.u.Map.merge doesn't work as specified if contains key:null pair -if [[ -n $CRID ]]; then - for id in $CRID - do - #add "JDK-" to raw bug id for openjdk.java.net links. - id=`echo ${id} | sed 's/^\([0-9]\{5,\}\)$/JDK-\1/'` - - print "
    Prepared by:$realname ($username) $date
    Prepared by:$username $date
    Workspace:$CWS
    Compare against:" - print "webrev at $parent_webrev" -else - if [[ -n $OUTPWS2 ]]; then - print "
    Compare against:" - print "$OUTPWS2" - fi -fi -print "
    Compare against version:$PARENT_REV
    Compare against version:$OUTREV
    Branch:$HG_BRANCH
    Summary of changes:" -printCI $TOTL $TINS $TDEL $TMOD $TUNC -print "
    Patch of changes:" - print "$WNAME.patch
    Changeset:" - print "$EXPORTCHANGESET
    Printable review:" - print "$WNAME.pdf
    Author comments:
    " - cat /tmp/$$.include - print "
    Bug id:" - url="${BUGURL}${id}" - - if [[ -n $WGET ]]; then - msg=`$WGET --timeout=10 --tries=1 -q $url -O - | grep '' | sed 's/<title>\[#\(.*\)\] \(.*\) - Java Bug System<\/title>/\1 : \2/' | html_dequote | html_quote` - fi - if [[ -z $msg ]]; then - msg="${id}" - fi - - print "<a href=\"$url\">$msg</a>" - - print "</td></tr>" - done -fi -print "<tr><th>Legend:</th><td>" -print "<b>Modified file</b><br><font color=red><b>Deleted file</b></font><br><font color=green><b>New file</b></font></td></tr>" -print "</table>" -print "</div>" - -# -# Second pass through the files: generate the rest of the index file -# -while read LINE -do - set - $LINE - if [[ $1 == "Revision:" ]]; then - FIRST_CREV=`expr $3 + 1` - continue - fi - P=$1 - - if [[ $# == 2 ]]; then - PP=$2 - oldname=" <i>(was $PP)</i>" - - else - PP=$P - oldname="" - fi - - DIR=${P%/*} - if [[ $DIR == $P ]]; then - DIR="." # File at root of workspace - fi - - # Avoid processing the same file twice. - # It's possible for renamed files to - # appear twice in the file list - - F=$WDIR/$P - - print "<p><code>" - - # If there's a diffs file, make diffs links - - NODIFFS= - if [[ -f $F.cdiff.html ]]; then - print "<a href=\"$P.cdiff.html\">Cdiffs</a>" - print "<a href=\"$P.udiff.html\">Udiffs</a>" - - if [[ -f $F.wdiff.html && -x $WDIFF ]]; then - print "<a href=\"$P.wdiff.html\">Wdiffs</a>" - fi - - print "<a href=\"$P.sdiff.html\">Sdiffs</a>" - - print "<a href=\"$P.frames.html\">Frames</a>" - else - NODIFFS=1 - print " ------ ------ ------" - - if [[ -x $WDIFF ]]; then - print " ------" - fi - - print " ------" - fi - - # If there's an old file, make the link - - NOOLD= - if [[ -f $F-.html ]]; then - print "<a href=\"$P-.html\">Old</a>" - else - NOOLD=1 - print " ---" - fi - - # If there's an new file, make the link - - NONEW= - if [[ -f $F.html ]]; then - print "<a href=\"$P.html\">New</a>" - else - NONEW=1 - print " ---" - fi - - if [[ -f $F.patch ]]; then - print "<a href=\"$P.patch\">Patch</a>" - else - print " -----" - fi - - if [[ -f $WDIR/raw_files/new/$P ]]; then - print "<a href=\"raw_files/new/$P\">Raw</a>" - else - print " ---" - fi - print "</code>" - if [[ -n $NODIFFS && -z $oldname ]]; then - if [[ -n $NOOLD ]]; then - print "<font color=green><b>$P</b></font>" - elif [[ -n $NONEW ]]; then - print "<font color=red><b>$P</b></font>" - fi - else - print "<b>$P</b> $oldname" - fi - - print "</p><blockquote>\c" - # Insert delta comments if any - comments=`getcomments html $P $PP` - if [ -n "$comments" ]; then - print "<pre>$comments</pre>" - fi - - # Add additional comments comment - - print "<!-- Add comments to explain changes in $P here -->" - - # Add count of changes. - - if [[ -f $F.count ]]; then - cat $F.count - rm $F.count - fi - print "</blockquote>" -done < $FLIST - -print -print -print "<hr />" -print "<p style=\"font-size: small\">" -print "This code review page was prepared using <b>$0</b>" -print "(vers $WEBREV_UPDATED)." -print "</body>" -print "</html>" - -if [[ -n $ZIP ]]; then - # Let's generate a zip file for convenience - cd $WDIR/.. - if [ -f webrev.zip ]; then - rm webrev.zip - fi - $ZIP -r webrev webrev >/dev/null 2>&1 -fi - -exec 1<&- # Close FD 1. -exec 1<&3 # dup FD 3 to restore stdout. -exec 3<&- # close FD 3. - -print "Done." -print "Output to: $WDIR" diff --git a/nashorn/.hgtags b/nashorn/.hgtags index 0c34bd5d62c..3d90b565999 100644 --- a/nashorn/.hgtags +++ b/nashorn/.hgtags @@ -230,4 +230,8 @@ f0d3ac2474ee755b1180ec71bcdfa190845b17eb jdk8-b115 8d014b039b44c23fa520ce20c2c27f7aa91441e9 jdk8-b118 c3343930c73c58a22c1d58719bb988aeb25a871f jdk8-b119 55cbc2d00c93f82513ce33819d41dc67e71aaefd jdk8-b120 +32631eed0fad2b31346eb41b29a50227bd29e2ec jdk8-b121 +9d112a0e7df737f3b1fa2a021d5bb350ed56c1b7 jdk8-b122 +688f4167f92188482b0d80e315c72f726c6d5ff6 jdk8-b123 32631eed0fad2b31346eb41b29a50227bd29e2ec jdk9-b00 +65347535840f045f2cd4341d7466c51009b1b06f jdk9-b01 diff --git a/nashorn/bin/jjs b/nashorn/bin/jjs deleted file mode 100644 index f89a07c2c9a..00000000000 --- a/nashorn/bin/jjs +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2010, 2013, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -[ -z "$JAVA_HOME" ] && echo "Please set JAVA_HOME" && exit 1; - -$JAVA_HOME/bin/java -server -XX:+TieredCompilation -Xms2G -Xmx2G -esa -ea -Djava.ext.dirs=`dirname $0`/../dist:$JAVA_HOME/jre/lib/ext -XX:+HeapDumpOnOutOfMemoryError -Djava.lang.invoke.MethodHandle.DEBUG_NAMES=false -Dnashorn.debug=true jdk.nashorn.tools.Shell $* diff --git a/nashorn/bin/jjs.bat b/nashorn/bin/jjs.bat deleted file mode 100644 index 3c1c1595c47..00000000000 --- a/nashorn/bin/jjs.bat +++ /dev/null @@ -1,27 +0,0 @@ -rem -rem Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. -rem DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -rem -rem This code is free software; you can redistribute it and/or modify it -rem under the terms of the GNU General Public License version 2 only, as -rem published by the Free Software Foundation. Oracle designates this -rem particular file as subject to the "Classpath" exception as provided -rem by Oracle in the LICENSE file that accompanied this code. -rem -rem This code is distributed in the hope that it will be useful, but WITHOUT -rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -rem version 2 for more details (a copy is included in the LICENSE file that -rem accompanied this code). -rem -rem You should have received a copy of the GNU General Public License version -rem 2 along with this work; if not, write to the Free Software Foundation, -rem Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -rem -rem Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -rem or visit www.oracle.com if you need additional information or have any -rem questions. -rem -@echo off - -java -Xms2G -Xmx2G -XX:-TieredCompilation -server -esa -ea -Djava.ext.dirs=%~dp0\..\dist -XX:+HeapDumpOnOutOfMemoryError -Dnashorn.debug=true -Djava.lang.invoke.MethodHandle.DEBUG_NAMES=false jdk.nashorn.tools.Shell diff --git a/nashorn/bin/jjssecure b/nashorn/bin/jjssecure deleted file mode 100644 index db6bdfc4178..00000000000 --- a/nashorn/bin/jjssecure +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2010, 2013, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -[ -z "$JAVA_HOME" ] && echo "Please set JAVA_HOME" && exit 1; - -$JAVA_HOME/bin/java -Xms2G -Xmx2G -XX:-TieredCompilation -server -esa -ea -Djava.security.properties=`dirname $0`/../make/java.security.override -Djava.ext.dirs=`dirname $0`/../dist:$JAVA_HOME/jre/lib/ext -XX:+HeapDumpOnOutOfMemoryError -Dnashorn.debug=true -Djava.lang.invoke.MethodHandle.DEBUG_NAMES=true -Dnashorn.home=`dirname $0`/.. -Djava.security.manager jdk.nashorn.tools.Shell $* diff --git a/nashorn/bin/jjssecure.bat b/nashorn/bin/jjssecure.bat deleted file mode 100644 index f8da10aaaf6..00000000000 --- a/nashorn/bin/jjssecure.bat +++ /dev/null @@ -1,27 +0,0 @@ -rem -rem Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. -rem DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -rem -rem This code is free software; you can redistribute it and/or modify it -rem under the terms of the GNU General Public License version 2 only, as -rem published by the Free Software Foundation. Oracle designates this -rem particular file as subject to the "Classpath" exception as provided -rem by Oracle in the LICENSE file that accompanied this code. -rem -rem This code is distributed in the hope that it will be useful, but WITHOUT -rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -rem version 2 for more details (a copy is included in the LICENSE file that -rem accompanied this code). -rem -rem You should have received a copy of the GNU General Public License version -rem 2 along with this work; if not, write to the Free Software Foundation, -rem Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -rem -rem Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -rem or visit www.oracle.com if you need additional information or have any -rem questions. -rem -@echo off - -java -Xms2G -Xmx2G -XX:-TieredCompilation -server -esa -ea -Djava.security.properties=%~dp0\..\make\java.security.override -Djava.ext.dirs=%~dp0\..\dist -XX:+HeapDumpOnOutOfMemoryError -Dnashorn.debug=true -Djava.lang.invoke.MethodHandle.DEBUG_NAMES=false -Dnashorn.home=%~dp0\.. -Djava.security.manager jdk.nashorn.tools.Shell diff --git a/nashorn/bin/nashorn b/nashorn/bin/nashorn deleted file mode 100644 index da22be1fb01..00000000000 --- a/nashorn/bin/nashorn +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2010, 2013, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -[ -z "$JAVA_HOME" ] && echo "Please set JAVA_HOME" && exit 1; - -$JAVA_HOME/bin/jrunscript -J-Xms2G -J-Xmx2G -J-XX:-TieredCompilation -J-server -J-esa -J-ea -J-Djava.ext.dirs=`dirname $0`/../dist:$JAVA_HOME/jre/lib/ext -J-XX:+HeapDumpOnOutOfMemoryError -J-Djava.lang.invoke.MethodHandle.DEBUG_NAMES=false -J-Dnashorn.debug=true -l nashorn $* diff --git a/nashorn/bin/nashorn.bat b/nashorn/bin/nashorn.bat deleted file mode 100644 index 2961ac699a4..00000000000 --- a/nashorn/bin/nashorn.bat +++ /dev/null @@ -1,27 +0,0 @@ -rem -rem Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. -rem DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -rem -rem This code is free software; you can redistribute it and/or modify it -rem under the terms of the GNU General Public License version 2 only, as -rem published by the Free Software Foundation. Oracle designates this -rem particular file as subject to the "Classpath" exception as provided -rem by Oracle in the LICENSE file that accompanied this code. -rem -rem This code is distributed in the hope that it will be useful, but WITHOUT -rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -rem version 2 for more details (a copy is included in the LICENSE file that -rem accompanied this code). -rem -rem You should have received a copy of the GNU General Public License version -rem 2 along with this work; if not, write to the Free Software Foundation, -rem Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -rem -rem Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -rem or visit www.oracle.com if you need additional information or have any -rem questions. -rem -@echo off - -jrunscript -J-Xms2G -J-Xmx2G -J-XX:-TieredCompilation -J-server -J-esa -J-ea -J-Djava.ext.dirs=%~dp0\..\dist -J-XX:+HeapDumpOnOutOfMemoryError -J-Dnashorn.debug=true -J-Djava.lang.invoke.MethodHandle.DEBUG_NAMES=false -l nashorn diff --git a/nashorn/bin/nashornsecure b/nashorn/bin/nashornsecure deleted file mode 100644 index 77c7c52933a..00000000000 --- a/nashorn/bin/nashornsecure +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2010, 2013, 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 -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -[ -z "$JAVA_HOME" ] && echo "Please set JAVA_HOME" && exit 1; - -$JAVA_HOME/bin/jrunscript -J-Djava.security.properties=`dirname $0`/../make/java.security.override -J-Djava.security.manager -J-Xms2G -J-Xmx2G -J-XX:-TieredCompilation -J-server -J-esa -J-ea -J-Djava.ext.dirs=`dirname $0`/../dist:$JAVA_HOME/jre/lib/ext -J-XX:+HeapDumpOnOutOfMemoryError -J-Djava.lang.invoke.MethodHandle.DEBUG_NAMES=false -J-Dnashorn.debug=true -l nashorn $* diff --git a/nashorn/bin/nashornsecure.bat b/nashorn/bin/nashornsecure.bat deleted file mode 100644 index 5a4eca63c64..00000000000 --- a/nashorn/bin/nashornsecure.bat +++ /dev/null @@ -1,27 +0,0 @@ -rem -rem Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. -rem DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -rem -rem This code is free software; you can redistribute it and/or modify it -rem under the terms of the GNU General Public License version 2 only, as -rem published by the Free Software Foundation. Oracle designates this -rem particular file as subject to the "Classpath" exception as provided -rem by Oracle in the LICENSE file that accompanied this code. -rem -rem This code is distributed in the hope that it will be useful, but WITHOUT -rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -rem version 2 for more details (a copy is included in the LICENSE file that -rem accompanied this code). -rem -rem You should have received a copy of the GNU General Public License version -rem 2 along with this work; if not, write to the Free Software Foundation, -rem Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -rem -rem Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -rem or visit www.oracle.com if you need additional information or have any -rem questions. -rem -@echo off - -jrunscript -J-Djava.security.properties=%~dp0\..\make\java.security.override -J-Djava.security.manager -J-Xms2G -J-Xmx2G -J-XX:-TieredCompilation -J-server -J-esa -J-ea -J-Djava.ext.dirs=%~dp0\..\dist -J-XX:+HeapDumpOnOutOfMemoryError -J-Dnashorn.debug=true -J-Djava.lang.invoke.MethodHandle.DEBUG_NAMES=false -l nashorn diff --git a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java index 3fdd7c686bb..c43bdf52512 100644 --- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java +++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java @@ -279,10 +279,6 @@ public final class MemberInfo implements Cloneable { } } } else if (kind == Kind.FUNCTION) { - final Type returnType = Type.getReturnType(javaDesc); - if (! returnType.toString().equals(OBJECT_DESC)) { - error("return value should be of Object type, found" + returnType); - } final Type[] argTypes = Type.getArgumentTypes(javaDesc); if (argTypes.length < 1) { error("function methods should have at least 1 arg"); diff --git a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java index 475d7328c69..479d1d31f21 100644 --- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java +++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java @@ -349,19 +349,19 @@ public class MethodGenerator extends MethodVisitor { // invokes, field get/sets void invokeInterface(final String owner, final String method, final String desc) { - super.visitMethodInsn(INVOKEINTERFACE, owner, method, desc); + super.visitMethodInsn(INVOKEINTERFACE, owner, method, desc, true); } void invokeVirtual(final String owner, final String method, final String desc) { - super.visitMethodInsn(INVOKEVIRTUAL, owner, method, desc); + super.visitMethodInsn(INVOKEVIRTUAL, owner, method, desc, false); } void invokeSpecial(final String owner, final String method, final String desc) { - super.visitMethodInsn(INVOKESPECIAL, owner, method, desc); + super.visitMethodInsn(INVOKESPECIAL, owner, method, desc, false); } void invokeStatic(final String owner, final String method, final String desc) { - super.visitMethodInsn(INVOKESTATIC, owner, method, desc); + super.visitMethodInsn(INVOKESTATIC, owner, method, desc, false); } void putStatic(final String owner, final String field, final String desc) { @@ -413,7 +413,7 @@ public class MethodGenerator extends MethodVisitor { super.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", - "(Ljava/lang/String;)V"); + "(Ljava/lang/String;)V", false); } // print the object on the top of the stack @@ -426,6 +426,6 @@ public class MethodGenerator extends MethodVisitor { super.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", - "(Ljava/lang/Object;)V"); + "(Ljava/lang/Object;)V", false); } } diff --git a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java index 72250de79bc..0ec233ae8c8 100644 --- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java +++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java @@ -146,16 +146,16 @@ public class ScriptClassInstrumentor extends ClassVisitor { // call $clinit$ just before return from <clinit> if (isStaticInit && opcode == RETURN) { super.visitMethodInsn(INVOKESTATIC, scriptClassInfo.getJavaName(), - $CLINIT$, DEFAULT_INIT_DESC); + $CLINIT$, DEFAULT_INIT_DESC, false); } super.visitInsn(opcode); } @Override - public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) { + public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc, final boolean itf) { if (isConstructor && opcode == INVOKESPECIAL && INIT.equals(name) && SCRIPTOBJECT_TYPE.equals(owner)) { - super.visitMethodInsn(opcode, owner, name, desc); + super.visitMethodInsn(opcode, owner, name, desc, false); if (memberCount > 0) { // initialize @Property fields if needed @@ -166,7 +166,7 @@ public class ScriptClassInstrumentor extends ClassVisitor { super.visitTypeInsn(NEW, clazz); super.visitInsn(DUP); super.visitMethodInsn(INVOKESPECIAL, clazz, - INIT, DEFAULT_INIT_DESC); + INIT, DEFAULT_INIT_DESC, false); super.visitFieldInsn(PUTFIELD, scriptClassInfo.getJavaName(), memInfo.getJavaName(), memInfo.getJavaDesc()); } @@ -180,7 +180,7 @@ public class ScriptClassInstrumentor extends ClassVisitor { } } } else { - super.visitMethodInsn(opcode, owner, name, desc); + super.visitMethodInsn(opcode, owner, name, desc, itf); } } diff --git a/nashorn/make/build-benchmark.xml b/nashorn/make/build-benchmark.xml index 8f2296b028e..8225df1cf0c 100644 --- a/nashorn/make/build-benchmark.xml +++ b/nashorn/make/build-benchmark.xml @@ -239,7 +239,7 @@ </antcall> </target> - <target name="octane-regexp-octane-v8" depends="jar"> + <target name="octane-regexp-v8" depends="jar"> <antcall target="run-octane-v8"> <param name="octane-tests" value="regexp"/> </antcall> @@ -291,17 +291,56 @@ </antcall> </target> + <!-- splay --> + <target name="octane-typescript" depends="jar"> + <antcall target="run-octane"> + <param name="octane-tests" value="typescript"/> + </antcall> + </target> + + <target name="octane-typescript-v8" depends="jar"> + <antcall target="run-octane-v8"> + <param name="octane-typescript" value="typescript"/> + </antcall> + </target> + + <target name="octane-typescript-rhino" depends="jar"> + <antcall target="run-octane-rhino"> + <param name="octane-tests" value="typescript"/> + </antcall> + </target> + + <!-- zlib --> + <target name="octane-zlib" depends="jar"> + <antcall target="run-octane"> + <param name="octane-tests" value="zlib"/> + </antcall> + </target> + + <target name="octane-zlib-v8" depends="jar"> + <antcall target="run-octane-v8"> + <param name="octane-typescript" value="zlib"/> + </antcall> + </target> + + <target name="octane-zlib-rhino" depends="jar"> + <antcall target="run-octane-rhino"> + <param name="octane-tests" value="zlib"/> + </antcall> + </target> + <!-- run octane benchmarks in a single process --> <target name="octane-single-process" depends="octane-init"> <antcall target="run-octane"/> </target> - <!-- mandreel excluded due to OOM --> + <!-- zlib excluded due to missing implementation of 'read' --> <target name="octane-separate-process" depends= "octane-box2d, octane-code-load, octane-crypto, octane-deltablue, octane-earley-boyer, octane-gbemu, - octane-navier-stokes, octane-pdfjs, octane-raytrace, - octane-regexp, octane-richards, octane-splay"/> + octane-mandreel, octane-navier-stokes, octane-pdfjs, + octane-raytrace, octane-regexp, octane-richards, + octane-splay, octane-typescript"/> <target name="--single-process" unless="${octane-test-sys-prop.separate.process}"> <antcall target="octane-single-process"/> @@ -330,6 +369,9 @@ dir="."> <jvmarg line="${ext.class.path}"/> <jvmarg line="${run.test.jvmargs.octane} -Xms${run.test.xms} -Xmx${run.test.xmx}"/> + <syspropertyset> + <propertyref prefix="nashorn."/> + </syspropertyset> <arg value="${octane-test-sys-prop.test.js.framework}"/> <arg value="--"/> <arg value="${octane-tests}"/> diff --git a/nashorn/make/build.xml b/nashorn/make/build.xml index 7d1f42aea0c..93342248de5 100644 --- a/nashorn/make/build.xml +++ b/nashorn/make/build.xml @@ -66,13 +66,16 @@ <condition property="exclude.list" value="./exclude/exclude_list_cc.txt" else="./exclude/exclude_list.txt"> <istrue value="${make.code.coverage}" /> </condition> + + <condition property="jfr.options" value="${run.test.jvmargs.jfr}" else=""> + <istrue value="${jfr}"/> + </condition> </target> <target name="init" depends="init-conditions, init-cc"> - <!-- extends jvm args --> - <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs}"/> - <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs}" /> + <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs} ${jfr.options}"/> + <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs} ${jfr.options}"/> <echo message="run.test.jvmargs=${run.test.jvmargs}"/> <echo message="run.test.jvmargs.octane=${run.test.jvmargs.octane}"/> @@ -301,6 +304,10 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { permission java.lang.RuntimePermission "nashorn.JavaReflection"; }; +grant codeBase "file:/${basedir}/test/script/markdown.js" { + permission java.io.FilePermission "${basedir}/test/script/external/showdown/-", "read"; +}; + </echo> <replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators --> @@ -316,6 +323,7 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { <available file="${test.external.dir}/yui" property="test-sys-prop.external.yui"/> <available file="${test.external.dir}/jquery" property="test-sys-prop.external.jquery"/> <available file="${test.external.dir}/test262" property="test-sys-prop.external.test262"/> + <available file="${test.external.dir}/showdown" property="test-sys-prop.external.markdown"/> </target> <target name="check-testng" unless="testng.available"> @@ -338,6 +346,9 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> <jvmarg line="${ext.class.path}"/> <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> + <propertyset> + <propertyref prefix="nashorn."/> + </propertyset> <propertyset> <propertyref prefix="test-sys-prop."/> <mapper from="test-sys-prop.*" to="*" type="glob"/> @@ -393,6 +404,25 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { </testng> </target> + <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> + <fileset id="test.classes" dir="${build.test.classes.dir}"> + <include name="**/framework/*Test.class"/> + </fileset> + + <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" + verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> + <jvmarg line="${ext.class.path}"/> + <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> + <propertyset> + <propertyref prefix="testmarkdown-test-sys-prop."/> + <mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <classpath> + <pathelement path="${run.test.classpath}"/> + </classpath> + </testng> + </target> + <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> <fileset id="test.classes" dir="${build.test.classes.dir}"> <include name="**/framework/*Test.class"/> @@ -402,6 +432,9 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> <jvmarg line="${ext.class.path}"/> <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> + <propertyset> + <propertyref prefix="nashorn."/> + </propertyset> <propertyset> <propertyref prefix="test262-test-sys-prop."/> <mapper from="test262-test-sys-prop.*" to="*" type="glob"/> @@ -537,6 +570,11 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { <mkdir dir="${test.external.dir}/yui"/> <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/> <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/> + + <!-- showdown --> + <mkdir dir="${test.external.dir}/showdown"/> + <get src="https://raw.github.com/coreyti/showdown/master/src/showdown.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/> + <get src="https://raw.github.com/coreyti/showdown/master/src/extensions/table.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/> </target> diff --git a/nashorn/make/project.properties b/nashorn/make/project.properties index c3ffca4ec68..ad36744836b 100644 --- a/nashorn/make/project.properties +++ b/nashorn/make/project.properties @@ -71,6 +71,9 @@ fxshell.classes.dir = ${build.dir}/fxshell/classes fxshell.dir = tools/fxshell fxshell.jar = ${dist.dir}/nashornfx.jar +# configuration for java flight recorder +run.test.jvmargs.jfr=-XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=${build.dir},stackdepth=128 + # jars refererred file.reference.testng.jar=test/lib/testng.jar @@ -119,6 +122,7 @@ test.external.dir=test/script/external test262.dir=${test.external.dir}/test262 test262.suite.dir=${test262.dir}/test/suite testjfx.dir=${test.script.dir}/jfx +testmarkdown.dir=${test.script.dir}/markdown test-sys-prop.test.dir=${test.dir} test-sys-prop.test.js.roots=${test.basic.dir} ${test.error.dir} ${test.sandbox.dir} ${test.trusted.dir} @@ -209,6 +213,16 @@ test262-test-sys-prop.test.js.framework=\ ${test262.dir}/test/harness/framework.js \ ${test262.dir}/test/harness/sta.js +# testmarkdown test root +testmarkdown-test-sys-prop.test.js.roots=${testmarkdown.dir} + +# execute testmarkdown tests in shared nashorn context or not? +testmarkdown-test-sys-prop.test.js.shared.context=false + +# framework root for markdown script tests +testmarkdown-test-sys-prop.test.js.framework=\ + ${test.script.dir}${file.separator}markdown.js + # testjfx test root testjfx-test-sys-prop.test.js.roots=${testjfx.dir} diff --git a/nashorn/src/jdk/nashorn/api/scripting/NashornException.java b/nashorn/src/jdk/nashorn/api/scripting/NashornException.java index d5ec5bb4a60..a5f8c24a2e6 100644 --- a/nashorn/src/jdk/nashorn/api/scripting/NashornException.java +++ b/nashorn/src/jdk/nashorn/api/scripting/NashornException.java @@ -29,6 +29,7 @@ import java.util.ArrayList; import java.util.List; import jdk.nashorn.internal.codegen.CompilerConstants; import jdk.nashorn.internal.runtime.ECMAErrors; +import jdk.nashorn.internal.runtime.ScriptObject; /** * This is base exception for all Nashorn exceptions. These originate from @@ -44,11 +45,13 @@ import jdk.nashorn.internal.runtime.ECMAErrors; @SuppressWarnings("serial") public abstract class NashornException extends RuntimeException { // script file name - private final String fileName; + private String fileName; // script line number - private final int line; + private int line; // script column number - private final int column; + private int column; + // underlying ECMA error object - lazily initialized + private Object ecmaError; /** script source name used for "engine.js" */ public static final String ENGINE_SCRIPT_SOURCE_NAME = "nashorn:engine/resources/engine.js"; @@ -121,6 +124,15 @@ public abstract class NashornException extends RuntimeException { return fileName; } + /** + * Set the source file name for this {@code NashornException} + * + * @param fileName the file name + */ + public final void setFileName(final String fileName) { + this.fileName = fileName; + } + /** * Get the line number for this {@code NashornException} * @@ -130,15 +142,33 @@ public abstract class NashornException extends RuntimeException { return line; } + /** + * Set the line number for this {@code NashornException} + * + * @param line the line number + */ + public final void setLineNumber(final int line) { + this.line = line; + } + /** * Get the column for this {@code NashornException} * - * @return the column + * @return the column number */ public final int getColumnNumber() { return column; } + /** + * Set the column for this {@code NashornException} + * + * @param column the column number + */ + public final void setColumnNumber(final int column) { + this.column = column; + } + /** * Returns array javascript stack frames from the given exception object. * @@ -155,6 +185,11 @@ public abstract class NashornException extends RuntimeException { if (methodName.equals(CompilerConstants.RUN_SCRIPT.symbolName())) { methodName = "<program>"; } + + if (methodName.contains(CompilerConstants.ANON_FUNCTION_PREFIX.symbolName())) { + methodName = "<anonymous>"; + } + filtered.add(new StackTraceElement(className, methodName, st.getFileName(), st.getLineNumber())); } @@ -188,4 +223,43 @@ public abstract class NashornException extends RuntimeException { } return buf.toString(); } + + protected Object getThrown() { + return null; + } + + protected NashornException initEcmaError(final ScriptObject global) { + if (ecmaError != null) { + return this; // initialized already! + } + + final Object thrown = getThrown(); + if (thrown instanceof ScriptObject) { + setEcmaError(ScriptObjectMirror.wrap(thrown, global)); + } else { + setEcmaError(thrown); + } + + return this; + } + + /** + * Return the underlying ECMA error object, if available. + * + * @return underlying ECMA Error object's mirror or whatever was thrown + * from script such as a String, Number or a Boolean. + */ + public Object getEcmaError() { + return ecmaError; + } + + /** + * Return the underlying ECMA error object, if available. + * + * @param ecmaError underlying ECMA Error object's mirror or whatever was thrown + * from script such as a String, Number or a Boolean. + */ + public void setEcmaError(final Object ecmaError) { + this.ecmaError = ecmaError; + } } diff --git a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java index d0fb0c31832..8028cce229e 100644 --- a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java +++ b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java @@ -476,16 +476,19 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C private Object invokeImpl(final Object selfObject, final String name, final Object... args) throws ScriptException, NoSuchMethodException { name.getClass(); // null check + ScriptObject invokeGlobal = null; ScriptObjectMirror selfMirror = null; if (selfObject instanceof ScriptObjectMirror) { selfMirror = (ScriptObjectMirror)selfObject; if (! isOfContext(selfMirror.getHomeGlobal(), nashornContext)) { throw new IllegalArgumentException(getMessage("script.object.from.another.engine")); } + invokeGlobal = selfMirror.getHomeGlobal(); } else if (selfObject instanceof ScriptObject) { // invokeMethod called from script code - in which case we may get 'naked' ScriptObject // Wrap it with oldGlobal to make a ScriptObjectMirror for the same. final ScriptObject oldGlobal = Context.getGlobal(); + invokeGlobal = oldGlobal; if (oldGlobal == null) { throw new IllegalArgumentException(getMessage("no.current.nashorn.global")); } @@ -498,6 +501,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C } else if (selfObject == null) { // selfObject is null => global function call final ScriptObject ctxtGlobal = getNashornGlobalFrom(context); + invokeGlobal = ctxtGlobal; selfMirror = (ScriptObjectMirror)ScriptObjectMirror.wrap(ctxtGlobal, ctxtGlobal); } @@ -509,7 +513,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C if (cause instanceof NoSuchMethodException) { throw (NoSuchMethodException)cause; } - throwAsScriptException(e); + throwAsScriptException(e, invokeGlobal); throw new AssertionError("should not reach here"); } } @@ -543,7 +547,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C } return ScriptObjectMirror.translateUndefined(ScriptObjectMirror.wrap(ScriptRuntime.apply(script, ctxtGlobal), ctxtGlobal)); } catch (final Exception e) { - throwAsScriptException(e); + throwAsScriptException(e, ctxtGlobal); throw new AssertionError("should not reach here"); } finally { if (globalChanged) { @@ -552,7 +556,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C } } - private static void throwAsScriptException(final Exception e) throws ScriptException { + private static void throwAsScriptException(final Exception e, final ScriptObject global) throws ScriptException { if (e instanceof ScriptException) { throw (ScriptException)e; } else if (e instanceof NashornException) { @@ -560,6 +564,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C final ScriptException se = new ScriptException( ne.getMessage(), ne.getFileName(), ne.getLineNumber(), ne.getColumnNumber()); + ne.initEcmaError(global); se.initCause(e); throw se; } else if (e instanceof RuntimeException) { @@ -605,7 +610,7 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C return nashornContext.compileScript(source, newGlobal); } catch (final Exception e) { - throwAsScriptException(e); + throwAsScriptException(e, newGlobal); throw new AssertionError("should not reach here"); } finally { if (globalChanged) { @@ -621,6 +626,11 @@ public final class NashornScriptEngine extends AbstractScriptEngine implements C continue; } + // skip check for default methods - non-abstract, interface methods + if (! Modifier.isAbstract(method.getModifiers())) { + continue; + } + Object obj = sobj.get(method.getName()); if (! (obj instanceof ScriptFunction)) { return false; diff --git a/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java b/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java index 911f1663cb6..01f72c0008f 100644 --- a/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java +++ b/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java @@ -108,6 +108,8 @@ public final class ScriptObjectMirror extends AbstractJSObject implements Bindin } throw new RuntimeException("not a function: " + toString()); + } catch (final NashornException ne) { + throw ne.initEcmaError(global); } catch (final RuntimeException | Error e) { throw e; } catch (final Throwable t) { @@ -135,6 +137,8 @@ public final class ScriptObjectMirror extends AbstractJSObject implements Bindin } throw new RuntimeException("not a constructor: " + toString()); + } catch (final NashornException ne) { + throw ne.initEcmaError(global); } catch (final RuntimeException | Error e) { throw e; } catch (final Throwable t) { @@ -182,6 +186,8 @@ public final class ScriptObjectMirror extends AbstractJSObject implements Bindin } throw new NoSuchMethodException("No such function " + functionName); + } catch (final NashornException ne) { + throw ne.initEcmaError(global); } catch (final RuntimeException | Error e) { throw e; } catch (final Throwable t) { @@ -717,6 +723,8 @@ public final class ScriptObjectMirror extends AbstractJSObject implements Bindin } try { return callable.call(); + } catch (final NashornException ne) { + throw ne.initEcmaError(global); } catch (final RuntimeException e) { throw e; } catch (final Exception e) { diff --git a/nashorn/src/jdk/nashorn/internal/codegen/Attr.java b/nashorn/src/jdk/nashorn/internal/codegen/Attr.java index f1ced8ada06..177cfef4e4b 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/Attr.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/Attr.java @@ -766,7 +766,7 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> { symbol.setType(Type.OBJECT); } - returnType = Type.widest(returnTypes.pop(), symbol.getSymbolType()); + returnType = widestReturnType(returnTypes.pop(), symbol.getSymbolType()); } else { returnType = Type.OBJECT; //undefined } @@ -1433,10 +1433,30 @@ final class Attr extends NodeOperatorVisitor<LexicalContext> { ensureTypeNotUnknown(trueExpr); ensureTypeNotUnknown(falseExpr); - final Type type = Type.widest(trueExpr.getType(), falseExpr.getType()); + final Type type = widestReturnType(trueExpr.getType(), falseExpr.getType()); return end(ensureSymbol(type, ternaryNode)); } + /** + * When doing widening for return types of a function or a ternary operator, it is not valid to widen a boolean to + * anything other than Object. Also, widening a numeric type to an object type must widen to Object proper and not + * any more specific subclass (e.g. widest of int/long/double and String is Object). + * @param t1 type 1 + * @param t2 type 2 + * @return wider of t1 and t2, except if one is boolean and the other is neither boolean nor unknown, or if one is + * numeric and the other is neither numeric nor unknown in which case {@code Type.OBJECT} is returned. + */ + private static Type widestReturnType(final Type t1, final Type t2) { + if (t1.isUnknown()) { + return t2; + } else if (t2.isUnknown()) { + return t1; + } else if (t1.isBoolean() != t2.isBoolean() || t1.isNumeric() != t2.isNumeric()) { + return Type.OBJECT; + } + return Type.widest(t1, t2); + } + private void initCompileConstant(final CompilerConstants cc, final Block block, final int flags) { final Class<?> type = cc.type(); // Must not call this method for constants with no explicit types; use the one with (..., Type) signature instead. diff --git a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java index c3b1dbe2656..6ad92829bfe 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java @@ -2023,8 +2023,6 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex return false; } - method._new(ECMAException.class).dup(); - final Source source = lc.getCurrentFunction().getSource(); final Expression expression = throwNode.getExpression(); @@ -2037,7 +2035,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex method.load(source.getName()); method.load(line); method.load(column); - method.invoke(ECMAException.THROW_INIT); + method.invoke(ECMAException.CREATE); method.athrow(); diff --git a/nashorn/src/jdk/nashorn/internal/codegen/CodeGeneratorLexicalContext.java b/nashorn/src/jdk/nashorn/internal/codegen/CodeGeneratorLexicalContext.java index d27bdd953ec..dcf1b1ba5cd 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGeneratorLexicalContext.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGeneratorLexicalContext.java @@ -158,7 +158,7 @@ final class CodeGeneratorLexicalContext extends LexicalContext { if (scopeCalls.containsKey(scopeCall)) { return scopeCalls.get(scopeCall); } - scopeCall.setClassAndName(unit, getCurrentFunction().uniqueName("scopeCall")); + scopeCall.setClassAndName(unit, getCurrentFunction().uniqueName(":scopeCall")); scopeCalls.put(scopeCall, scopeCall); return scopeCall; } @@ -177,7 +177,7 @@ final class CodeGeneratorLexicalContext extends LexicalContext { if (scopeCalls.containsKey(scopeCall)) { return scopeCalls.get(scopeCall); } - scopeCall.setClassAndName(unit, getCurrentFunction().uniqueName("scopeCall")); + scopeCall.setClassAndName(unit, getCurrentFunction().uniqueName(":scopeCall")); scopeCalls.put(scopeCall, scopeCall); return scopeCall; } diff --git a/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java b/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java index 24173c3e710..b53b8fdf423 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java @@ -85,6 +85,8 @@ public final class Compiler { private Source source; + private String sourceName; + private final Map<String, byte[]> bytecode; private final Set<CompileUnit> compileUnits; @@ -267,6 +269,7 @@ public final class Compiler { append('$'). append(safeSourceName(functionNode.getSource())); this.source = functionNode.getSource(); + this.sourceName = functionNode.getSourceName(); this.scriptName = sb.toString(); } @@ -573,7 +576,7 @@ public final class Compiler { } private CompileUnit initCompileUnit(final String unitClassName, final long initialWeight) { - final ClassEmitter classEmitter = new ClassEmitter(env, source.getName(), unitClassName, strict); + final ClassEmitter classEmitter = new ClassEmitter(env, sourceName, unitClassName, strict); final CompileUnit compileUnit = new CompileUnit(unitClassName, classEmitter, initialWeight); classEmitter.begin(); diff --git a/nashorn/src/jdk/nashorn/internal/codegen/CompilerConstants.java b/nashorn/src/jdk/nashorn/internal/codegen/CompilerConstants.java index fb347c75afb..16f08b82e17 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/CompilerConstants.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/CompilerConstants.java @@ -41,6 +41,7 @@ import jdk.nashorn.internal.runtime.Source; */ public enum CompilerConstants { + /** the __FILE__ variable */ __FILE__, @@ -75,7 +76,7 @@ public enum CompilerConstants { DEFAULT_SCRIPT_NAME("Script"), /** function prefix for anonymous functions */ - FUNCTION_PREFIX("function$"), + ANON_FUNCTION_PREFIX("L:"), /** method name for Java method that is script entry point */ RUN_SCRIPT("runScript"), @@ -149,26 +150,31 @@ public enum CompilerConstants { ALLOCATE("allocate"), /** prefix for split methods, @see Splitter */ - SPLIT_PREFIX("$split"), + SPLIT_PREFIX(":split"), /** prefix for split array method and slot */ - SPLIT_ARRAY_ARG("split_array", 3), + SPLIT_ARRAY_ARG(":split_array", 3), /** get string from constant pool */ - GET_STRING("$getString"), + GET_STRING(":getString"), /** get map */ - GET_MAP("$getMap"), + GET_MAP(":getMap"), /** get map */ - SET_MAP("$setMap"), + SET_MAP(":setMap"), /** get array prefix */ - GET_ARRAY_PREFIX("$get"), + GET_ARRAY_PREFIX(":get"), /** get array suffix */ GET_ARRAY_SUFFIX("$array"); + /** + * Prefix used for internal methods generated in script clases. + */ + public static final String INTERNAL_METHOD_PREFIX = ":"; + private final String symbolName; private final Class<?> type; private final int slot; diff --git a/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java b/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java index 9b6d12aae88..91129ece26a 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java @@ -1130,7 +1130,11 @@ public class MethodEmitter implements Emitter { popType(Type.OBJECT); } - method.visitMethodInsn(opcode, className, methodName, methodDescriptor); + if (opcode == INVOKEINTERFACE) { + method.visitMethodInsn(opcode, className, methodName, methodDescriptor, true); + } else { + method.visitMethodInsn(opcode, className, methodName, methodDescriptor, false); + } if (returnType != null) { pushType(returnType); diff --git a/nashorn/src/jdk/nashorn/internal/codegen/types/Type.java b/nashorn/src/jdk/nashorn/internal/codegen/types/Type.java index e7c789535d7..4799c264196 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/types/Type.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/types/Type.java @@ -261,7 +261,7 @@ public abstract class Type implements Comparable<Type>, BytecodeOps { } static void invokeStatic(final MethodVisitor method, final Call call) { - method.visitMethodInsn(INVOKESTATIC, call.className(), call.name(), call.descriptor()); + method.visitMethodInsn(INVOKESTATIC, call.className(), call.name(), call.descriptor(), false); } /** diff --git a/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java b/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java index b0998ae1911..1437eb40384 100644 --- a/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java +++ b/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.EnumSet; import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import jdk.nashorn.internal.codegen.CompileUnit; import jdk.nashorn.internal.codegen.Compiler; @@ -138,6 +139,9 @@ public final class FunctionNode extends LexicalContextExpression implements Flag /** Function flags. */ private final int flags; + /** //@ sourceURL or //# sourceURL for program function nodes */ + private final String sourceURL; + private final int lineNumber; /** Is anonymous function flag. */ @@ -223,6 +227,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag * @param parameters parameter list * @param kind kind of function as in {@link FunctionNode.Kind} * @param flags initial flags + * @param sourceURL sourceURL specified in script (optional) */ public FunctionNode( final Source source, @@ -235,7 +240,8 @@ public final class FunctionNode extends LexicalContextExpression implements Flag final String name, final List<IdentNode> parameters, final FunctionNode.Kind kind, - final int flags) { + final int flags, + final String sourceURL) { super(token, finish); this.source = source; @@ -250,6 +256,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag this.compilationState = EnumSet.of(CompilationState.INITIALIZED); this.declaredSymbols = new HashSet<>(); this.flags = flags; + this.sourceURL = sourceURL; this.compileUnit = null; this.body = null; this.snapshot = null; @@ -260,6 +267,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag final FunctionNode functionNode, final long lastToken, final int flags, + final String sourceURL, final String name, final Type returnType, final CompileUnit compileUnit, @@ -271,6 +279,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag super(functionNode); this.lineNumber = functionNode.lineNumber; this.flags = flags; + this.sourceURL = sourceURL; this.name = name; this.returnType = returnType; this.compileUnit = compileUnit; @@ -307,6 +316,38 @@ public final class FunctionNode extends LexicalContextExpression implements Flag return source; } + /** + * get source name - sourceURL or name derived from Source. + * + * @return name for the script source + */ + public String getSourceName() { + return (sourceURL != null)? sourceURL : source.getName(); + } + + /** + * get the sourceURL + * @return the sourceURL + */ + public String getSourceURL() { + return sourceURL; + } + + /** + * Set the sourceURL + * + * @param lc lexical context + * @param newSourceURL source url string to set + * @return function node or a new one if state was changed + */ + public FunctionNode setSourceURL(final LexicalContext lc, final String newSourceURL) { + if (Objects.equals(sourceURL, newSourceURL)) { + return this; + } + + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, newSourceURL, name, returnType, compileUnit, compilationState, body, parameters, null, hints)); + } + /** * Returns the line number. * @return the line number. @@ -335,7 +376,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (this.snapshot == null) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, null, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, null, hints)); } /** @@ -351,7 +392,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (isProgram() || parameters.isEmpty()) { return this; //never specialize anything that won't be recompiled } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, this, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, this, hints)); } /** @@ -409,7 +450,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag } final EnumSet<CompilationState> newState = EnumSet.copyOf(this.compilationState); newState.add(state); - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, newState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, newState, body, parameters, snapshot, hints)); } /** @@ -430,7 +471,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (this.hints == hints) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); } /** @@ -483,7 +524,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (this.flags == flags) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); } @Override @@ -593,7 +634,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if(this.body == body) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags | (body.needsScope() ? FunctionNode.HAS_SCOPE_BLOCK : 0), name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags | (body.needsScope() ? FunctionNode.HAS_SCOPE_BLOCK : 0), sourceURL, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); } /** @@ -688,7 +729,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (this.lastToken == lastToken) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); } /** @@ -710,7 +751,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (this.name.equals(name)) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); } /** @@ -760,7 +801,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (this.parameters == parameters) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); } /** @@ -825,6 +866,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag this, lastToken, flags, + sourceURL, name, type, compileUnit, @@ -863,7 +905,7 @@ public final class FunctionNode extends LexicalContextExpression implements Flag if (this.compileUnit == compileUnit) { return this; } - return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); + return Node.replaceInLexicalContext(lc, this, new FunctionNode(this, lastToken, flags, sourceURL, name, returnType, compileUnit, compilationState, body, parameters, snapshot, hints)); } /** diff --git a/nashorn/src/jdk/nashorn/internal/objects/Global.java b/nashorn/src/jdk/nashorn/internal/objects/Global.java index 0a09370aac9..819095c05e4 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/Global.java +++ b/nashorn/src/jdk/nashorn/internal/objects/Global.java @@ -44,6 +44,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import jdk.internal.dynalink.linker.GuardedInvocation; import jdk.internal.dynalink.linker.LinkRequest; +import jdk.nashorn.internal.lookup.Lookup; import jdk.nashorn.internal.objects.annotations.Attribute; import jdk.nashorn.internal.objects.annotations.Property; import jdk.nashorn.internal.objects.annotations.ScriptClass; @@ -364,6 +365,11 @@ public final class Global extends ScriptObject implements GlobalObject, Scope { private ScriptObject builtinFloat32Array; private ScriptObject builtinFloat64Array; + /* + * ECMA section 13.2.3 The [[ThrowTypeError]] Function Object + */ + private ScriptFunction typeErrorThrower; + private PropertyMap accessorPropertyDescriptorMap; private PropertyMap arrayBufferViewMap; private PropertyMap dataPropertyDescriptorMap; @@ -1114,6 +1120,10 @@ public final class Global extends ScriptObject implements GlobalObject, Scope { return builtinArray; } + ScriptFunction getTypeErrorThrower() { + return typeErrorThrower; + } + /** * Called from compiled script code to test if builtin has been overridden * @@ -1695,8 +1705,25 @@ public final class Global extends ScriptObject implements GlobalObject, Scope { initScripting(env); } - if (Context.DEBUG && System.getSecurityManager() == null) { - initDebug(); + if (Context.DEBUG) { + boolean debugOkay; + final SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + try { + sm.checkPermission(new RuntimePermission(Context.NASHORN_DEBUG_MODE)); + debugOkay = true; + } catch (final SecurityException ignored) { + // if no permission, don't initialize Debug object + debugOkay = false; + } + + } else { + debugOkay = true; + } + + if (debugOkay) { + initDebug(); + } } copyBuiltins(); @@ -2000,6 +2027,13 @@ public final class Global extends ScriptObject implements GlobalObject, Scope { anon.set("constructor", builtinFunction, false); anon.deleteOwnProperty(anon.getMap().findProperty("prototype")); + // use "getter" so that [[ThrowTypeError]] function's arity is 0 - as specified in step 10 of section 13.2.3 + this.typeErrorThrower = new ScriptFunctionImpl("TypeErrorThrower", Lookup.TYPE_ERROR_THROWER_GETTER, null, null, false, false, false); + typeErrorThrower.setPrototype(UNDEFINED); + // Non-constructor built-in functions do not have "prototype" property + typeErrorThrower.deleteOwnProperty(typeErrorThrower.getMap().findProperty("prototype")); + typeErrorThrower.preventExtensions(); + // now initialize Object this.builtinObject = (ScriptFunction)initConstructor("Object"); final ScriptObject ObjectPrototype = getObjectPrototype(); diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeError.java index d3e2effed3f..0541084d8bf 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeError.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeError.java @@ -38,7 +38,6 @@ import jdk.nashorn.internal.objects.annotations.Function; import jdk.nashorn.internal.objects.annotations.Property; import jdk.nashorn.internal.objects.annotations.ScriptClass; import jdk.nashorn.internal.objects.annotations.Where; -import jdk.nashorn.internal.objects.ScriptFunctionImpl; import jdk.nashorn.internal.runtime.ECMAException; import jdk.nashorn.internal.runtime.JSType; import jdk.nashorn.internal.runtime.PropertyMap; @@ -75,7 +74,7 @@ public final class NativeError extends ScriptObject { static final String FILENAME = "__fileName__"; /** Message property name */ - @Property(name = NativeError.MESSAGE) + @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) public Object instMessage; /** ECMA 15.11.4.2 Error.prototype.name */ @@ -86,6 +85,10 @@ public final class NativeError extends ScriptObject { @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) public Object message; + /** Nashorn extension: underlying exception */ + @Property(attributes = Attribute.NOT_ENUMERABLE) + public Object nashornException; + // initialized by nasgen private static PropertyMap $nasgenmap$; @@ -93,6 +96,7 @@ public final class NativeError extends ScriptObject { return $nasgenmap$; } + @SuppressWarnings("LeakingThisInConstructor") private NativeError(final Object msg, final ScriptObject proto, final PropertyMap map) { super(proto, map); if (msg != UNDEFINED) { @@ -100,6 +104,7 @@ public final class NativeError extends ScriptObject { } else { this.delete(NativeError.MESSAGE, false); } + initException(this); } NativeError(final Object msg, final Global global) { @@ -129,6 +134,14 @@ public final class NativeError extends ScriptObject { return new NativeError(msg); } + // This is called NativeError, NativeTypeError etc. to + // associate a ECMAException with the ECMA Error object. + @SuppressWarnings("unused") + static void initException(final ScriptObject self) { + // ECMAException constructor has side effects + new ECMAException(self, null); + } + /** * Nashorn extension: Error.captureStackTrace. Capture stack trace at the point of call into the Error object provided. * @@ -136,16 +149,17 @@ public final class NativeError extends ScriptObject { * @param errorObj the error object * @return undefined */ - @SuppressWarnings("unused") @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) public static Object captureStackTrace(final Object self, final Object errorObj) { Global.checkObject(errorObj); final ScriptObject sobj = (ScriptObject)errorObj; - new ECMAException(sobj, null); //constructor has side effects - sobj.delete("stack", false); - final ScriptFunction getStack = ScriptFunctionImpl.makeFunction("getStack", GET_STACK); - final ScriptFunction setStack = ScriptFunctionImpl.makeFunction("setStack", SET_STACK); - sobj.addOwnProperty("stack", Attribute.NOT_ENUMERABLE, getStack, setStack); + initException(sobj); + sobj.delete(STACK, false); + if (! sobj.has("stack")) { + final ScriptFunction getStack = ScriptFunctionImpl.makeFunction("getStack", GET_STACK); + final ScriptFunction setStack = ScriptFunctionImpl.makeFunction("setStack", SET_STACK); + sobj.addOwnProperty("stack", Attribute.NOT_ENUMERABLE, getStack, setStack); + } return UNDEFINED; } @@ -226,7 +240,11 @@ public final class NativeError extends ScriptObject { public static Object setLineNumber(final Object self, final Object value) { Global.checkObject(self); final ScriptObject sobj = (ScriptObject)self; - sobj.set(LINENUMBER, value, false); + if (sobj.hasOwnProperty(LINENUMBER)) { + sobj.put(LINENUMBER, value, false); + } else { + sobj.addOwnProperty(LINENUMBER, Attribute.NOT_ENUMERABLE, value); + } return value; } @@ -254,7 +272,11 @@ public final class NativeError extends ScriptObject { public static Object setColumnNumber(final Object self, final Object value) { Global.checkObject(self); final ScriptObject sobj = (ScriptObject)self; - sobj.set(COLUMNNUMBER, value, false); + if (sobj.hasOwnProperty(COLUMNNUMBER)) { + sobj.put(COLUMNNUMBER, value, false); + } else { + sobj.addOwnProperty(COLUMNNUMBER, Attribute.NOT_ENUMERABLE, value); + } return value; } @@ -282,7 +304,11 @@ public final class NativeError extends ScriptObject { public static Object setFileName(final Object self, final Object value) { Global.checkObject(self); final ScriptObject sobj = (ScriptObject)self; - sobj.set(FILENAME, value, false); + if (sobj.hasOwnProperty(FILENAME)) { + sobj.put(FILENAME, value, false); + } else { + sobj.addOwnProperty(FILENAME, Attribute.NOT_ENUMERABLE, value); + } return value; } @@ -304,10 +330,12 @@ public final class NativeError extends ScriptObject { final Object exception = ECMAException.getException(sobj); if (exception instanceof Throwable) { - return getScriptStackString(sobj, (Throwable)exception); + Object value = getScriptStackString(sobj, (Throwable)exception); + sobj.put(STACK, value, false); + return value; } - return ""; + return UNDEFINED; } /** diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeEvalError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeEvalError.java index 89e9485fd9d..df8164c1119 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeEvalError.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeEvalError.java @@ -44,7 +44,7 @@ import jdk.nashorn.internal.runtime.ScriptObject; public final class NativeEvalError extends ScriptObject { /** message property in instance */ - @Property(name = NativeError.MESSAGE) + @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) public Object instMessage; /** error name property */ @@ -55,6 +55,10 @@ public final class NativeEvalError extends ScriptObject { @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) public Object message; + /** Nashorn extension: underlying exception */ + @Property(attributes = Attribute.NOT_ENUMERABLE) + public Object nashornException; + // initialized by nasgen private static PropertyMap $nasgenmap$; @@ -62,6 +66,7 @@ public final class NativeEvalError extends ScriptObject { return $nasgenmap$; } + @SuppressWarnings("LeakingThisInConstructor") private NativeEvalError(final Object msg, final ScriptObject proto, final PropertyMap map) { super(proto, map); if (msg != UNDEFINED) { @@ -69,6 +74,7 @@ public final class NativeEvalError extends ScriptObject { } else { this.delete(NativeError.MESSAGE, false); } + NativeError.initException(this); } NativeEvalError(final Object msg, final Global global) { diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeJavaImporter.java b/nashorn/src/jdk/nashorn/internal/objects/NativeJavaImporter.java index c2d2bd10e81..dd9231d9386 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeJavaImporter.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeJavaImporter.java @@ -133,6 +133,11 @@ public final class NativeJavaImporter extends ScriptObject { return createAndSetProperty(desc) ? super.lookup(desc, request) : super.noSuchMethod(desc, request); } + @Override + protected Object invokeNoSuchProperty(final String name) { + return createProperty(name); + } + private boolean createAndSetProperty(final CallSiteDescriptor desc) { final String name = desc.getNameToken(CallSiteDescriptor.NAME_OPERAND); final Object value = createProperty(name); diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeMath.java b/nashorn/src/jdk/nashorn/internal/objects/NativeMath.java index cc50fbb4f00..ec53965ad1b 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeMath.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeMath.java @@ -92,7 +92,7 @@ public final class NativeMath extends ScriptObject { * @return abs of value */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object abs(final Object self, final Object x) { + public static double abs(final Object self, final Object x) { return Math.abs(JSType.toNumber(x)); } @@ -144,7 +144,7 @@ public final class NativeMath extends ScriptObject { * @return acos of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object acos(final Object self, final Object x) { + public static double acos(final Object self, final Object x) { return Math.acos(JSType.toNumber(x)); } @@ -170,7 +170,7 @@ public final class NativeMath extends ScriptObject { * @return asin of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object asin(final Object self, final Object x) { + public static double asin(final Object self, final Object x) { return Math.asin(JSType.toNumber(x)); } @@ -196,7 +196,7 @@ public final class NativeMath extends ScriptObject { * @return atan of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object atan(final Object self, final Object x) { + public static double atan(final Object self, final Object x) { return Math.atan(JSType.toNumber(x)); } @@ -223,7 +223,7 @@ public final class NativeMath extends ScriptObject { * @return atan2 of x and y */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object atan2(final Object self, final Object y, final Object x) { + public static double atan2(final Object self, final Object y, final Object x) { return Math.atan2(JSType.toNumber(y), JSType.toNumber(x)); } @@ -250,7 +250,7 @@ public final class NativeMath extends ScriptObject { * @return ceil of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object ceil(final Object self, final Object x) { + public static double ceil(final Object self, final Object x) { return Math.ceil(JSType.toNumber(x)); } @@ -302,7 +302,7 @@ public final class NativeMath extends ScriptObject { * @return cos of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object cos(final Object self, final Object x) { + public static double cos(final Object self, final Object x) { return Math.cos(JSType.toNumber(x)); } @@ -328,7 +328,7 @@ public final class NativeMath extends ScriptObject { * @return exp of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object exp(final Object self, final Object x) { + public static double exp(final Object self, final Object x) { return Math.exp(JSType.toNumber(x)); } @@ -341,7 +341,7 @@ public final class NativeMath extends ScriptObject { * @return floor of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object floor(final Object self, final Object x) { + public static double floor(final Object self, final Object x) { return Math.floor(JSType.toNumber(x)); } @@ -393,7 +393,7 @@ public final class NativeMath extends ScriptObject { * @return log of argument */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object log(final Object self, final Object x) { + public static double log(final Object self, final Object x) { return Math.log(JSType.toNumber(x)); } @@ -419,7 +419,7 @@ public final class NativeMath extends ScriptObject { * @return the largest of the arguments, {@link Double#NEGATIVE_INFINITY} if no args given, or identity if one arg is given */ @Function(arity = 2, attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object max(final Object self, final Object... args) { + public static double max(final Object self, final Object... args) { switch (args.length) { case 0: return Double.NEGATIVE_INFINITY; @@ -497,7 +497,7 @@ public final class NativeMath extends ScriptObject { * @return the smallest of the arguments, {@link Double#NEGATIVE_INFINITY} if no args given, or identity if one arg is given */ @Function(arity = 2, attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object min(final Object self, final Object... args) { + public static double min(final Object self, final Object... args) { switch (args.length) { case 0: return Double.POSITIVE_INFINITY; @@ -576,7 +576,7 @@ public final class NativeMath extends ScriptObject { * @return x raised to the power of y */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object pow(final Object self, final Object x, final Object y) { + public static double pow(final Object self, final Object x, final Object y) { return Math.pow(JSType.toNumber(x), JSType.toNumber(y)); } @@ -602,7 +602,7 @@ public final class NativeMath extends ScriptObject { * @return random number in the range [0..1) */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object random(final Object self) { + public static double random(final Object self) { return Math.random(); } @@ -615,7 +615,7 @@ public final class NativeMath extends ScriptObject { * @return x rounded */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object round(final Object self, final Object x) { + public static double round(final Object self, final Object x) { final double d = JSType.toNumber(x); if (Math.getExponent(d) >= 52) { return d; @@ -632,7 +632,7 @@ public final class NativeMath extends ScriptObject { * @return sin of x */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object sin(final Object self, final Object x) { + public static double sin(final Object self, final Object x) { return Math.sin(JSType.toNumber(x)); } @@ -658,7 +658,7 @@ public final class NativeMath extends ScriptObject { * @return sqrt of x */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) - public static Object sqrt(final Object self, final Object x) { + public static double sqrt(final Object self, final Object x) { return Math.sqrt(JSType.toNumber(x)); } @@ -684,7 +684,7 @@ public final class NativeMath extends ScriptObject { * @return tan of x */ @Function(attributes = Attribute.NOT_ENUMERABLE, where=Where.CONSTRUCTOR) - public static Object tan(final Object self, final Object x) { + public static double tan(final Object self, final Object x) { return Math.tan(JSType.toNumber(x)); } diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeRangeError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeRangeError.java index d51a0c09d41..a71b28b19c2 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeRangeError.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeRangeError.java @@ -44,7 +44,7 @@ import jdk.nashorn.internal.runtime.ScriptObject; public final class NativeRangeError extends ScriptObject { /** message property in instance */ - @Property(name = NativeError.MESSAGE) + @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) public Object instMessage; /** error name property */ @@ -55,6 +55,10 @@ public final class NativeRangeError extends ScriptObject { @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) public Object message; + /** Nashorn extension: underlying exception */ + @Property(attributes = Attribute.NOT_ENUMERABLE) + public Object nashornException; + // initialized by nasgen private static PropertyMap $nasgenmap$; @@ -62,6 +66,7 @@ public final class NativeRangeError extends ScriptObject { return $nasgenmap$; } + @SuppressWarnings("LeakingThisInConstructor") private NativeRangeError(final Object msg, final ScriptObject proto, final PropertyMap map) { super(proto, map); if (msg != UNDEFINED) { @@ -69,6 +74,7 @@ public final class NativeRangeError extends ScriptObject { } else { this.delete(NativeError.MESSAGE, false); } + NativeError.initException(this); } NativeRangeError(final Object msg, final Global global) { diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeReferenceError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeReferenceError.java index a269b51520a..d02a325055b 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeReferenceError.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeReferenceError.java @@ -44,7 +44,7 @@ import jdk.nashorn.internal.runtime.ScriptObject; public final class NativeReferenceError extends ScriptObject { /** message property in instance */ - @Property(name = NativeError.MESSAGE) + @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) public Object instMessage; /** error name property */ @@ -55,6 +55,10 @@ public final class NativeReferenceError extends ScriptObject { @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) public Object message; + /** Nashorn extension: underlying exception */ + @Property(attributes = Attribute.NOT_ENUMERABLE) + public Object nashornException; + // initialized by nasgen private static PropertyMap $nasgenmap$; @@ -62,6 +66,7 @@ public final class NativeReferenceError extends ScriptObject { return $nasgenmap$; } + @SuppressWarnings("LeakingThisInConstructor") private NativeReferenceError(final Object msg, final ScriptObject proto, final PropertyMap map) { super(proto, map); if (msg != UNDEFINED) { @@ -69,6 +74,7 @@ public final class NativeReferenceError extends ScriptObject { } else { this.delete(NativeError.MESSAGE, false); } + NativeError.initException(this); } NativeReferenceError(final Object msg, final Global global) { diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeStrictArguments.java b/nashorn/src/jdk/nashorn/internal/objects/NativeStrictArguments.java index de6e4b51435..b81cc2afad4 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeStrictArguments.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeStrictArguments.java @@ -76,7 +76,7 @@ public final class NativeStrictArguments extends ScriptObject { super(proto, map); setIsArguments(); - final ScriptFunction func = ScriptFunctionImpl.getTypeErrorThrower(); + final ScriptFunction func = Global.instance().getTypeErrorThrower(); // We have to fill user accessor functions late as these are stored // in this object rather than in the PropertyMap of this object. setUserAccessors("caller", func, func); diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeSyntaxError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeSyntaxError.java index 45920ba7aec..5d71ade7d38 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeSyntaxError.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeSyntaxError.java @@ -44,7 +44,7 @@ import jdk.nashorn.internal.runtime.ScriptObject; public final class NativeSyntaxError extends ScriptObject { /** message property in instance */ - @Property(name = NativeError.MESSAGE) + @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) public Object instMessage; /** error name property */ @@ -55,6 +55,10 @@ public final class NativeSyntaxError extends ScriptObject { @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) public Object message; + /** Nashorn extension: underlying exception */ + @Property(attributes = Attribute.NOT_ENUMERABLE) + public Object nashornException; + // initialized by nasgen private static PropertyMap $nasgenmap$; @@ -62,6 +66,7 @@ public final class NativeSyntaxError extends ScriptObject { return $nasgenmap$; } + @SuppressWarnings("LeakingThisInConstructor") NativeSyntaxError(final Object msg, final Global global) { super(global.getSyntaxErrorPrototype(), global.getSyntaxErrorMap()); if (msg != UNDEFINED) { @@ -69,6 +74,7 @@ public final class NativeSyntaxError extends ScriptObject { } else { this.delete(NativeError.MESSAGE, false); } + NativeError.initException(this); } private NativeSyntaxError(final Object msg) { diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeTypeError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeTypeError.java index 2b2308b143e..8857da7142d 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeTypeError.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeTypeError.java @@ -44,7 +44,7 @@ import jdk.nashorn.internal.runtime.ScriptObject; public final class NativeTypeError extends ScriptObject { /** message property in instance */ - @Property(name = NativeError.MESSAGE) + @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) public Object instMessage; /** error name property */ @@ -55,6 +55,10 @@ public final class NativeTypeError extends ScriptObject { @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) public Object message; + /** Nashorn extension: underlying exception */ + @Property(attributes = Attribute.NOT_ENUMERABLE) + public Object nashornException; + // initialized by nasgen private static PropertyMap $nasgenmap$; @@ -62,6 +66,7 @@ public final class NativeTypeError extends ScriptObject { return $nasgenmap$; } + @SuppressWarnings("LeakingThisInConstructor") NativeTypeError(final Object msg, final Global global) { super(global.getTypeErrorPrototype(), global.getTypeErrorMap()); if (msg != UNDEFINED) { @@ -69,6 +74,7 @@ public final class NativeTypeError extends ScriptObject { } else { delete(NativeError.MESSAGE, false); } + NativeError.initException(this); } private NativeTypeError(final Object msg) { diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeURIError.java b/nashorn/src/jdk/nashorn/internal/objects/NativeURIError.java index 2caf136954d..7ff6c196e3f 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeURIError.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeURIError.java @@ -43,7 +43,7 @@ import jdk.nashorn.internal.runtime.ScriptObject; public final class NativeURIError extends ScriptObject { /** message property in instance */ - @Property(name = NativeError.MESSAGE) + @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) public Object instMessage; /** error name property */ @@ -54,6 +54,10 @@ public final class NativeURIError extends ScriptObject { @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) public Object message; + /** Nashorn extension: underlying exception */ + @Property(attributes = Attribute.NOT_ENUMERABLE) + public Object nashornException; + // initialized by nasgen private static PropertyMap $nasgenmap$; @@ -61,6 +65,7 @@ public final class NativeURIError extends ScriptObject { return $nasgenmap$; } + @SuppressWarnings("LeakingThisInConstructor") NativeURIError(final Object msg, final Global global) { super(global.getURIErrorPrototype(), global.getURIErrorMap()); if (msg != UNDEFINED) { @@ -68,6 +73,7 @@ public final class NativeURIError extends ScriptObject { } else { this.delete(NativeError.MESSAGE, false); } + NativeError.initException(this); } private NativeURIError(final Object msg) { diff --git a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java index 638d18a2087..f0bea3a6e33 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java +++ b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java @@ -170,26 +170,6 @@ public class ScriptFunctionImpl extends ScriptFunction { boundfunctionmap$.setIsShared(); } - // function object representing TypeErrorThrower - private static ScriptFunction typeErrorThrower; - - /* - * ECMA section 13.2.3 The [[ThrowTypeError]] Function Object - */ - static synchronized ScriptFunction getTypeErrorThrower() { - if (typeErrorThrower == null) { - // use "getter" so that [[ThrowTypeError]] function's arity is 0 - as specified in step 10 of section 13.2.3 - final ScriptFunctionImpl func = new ScriptFunctionImpl("TypeErrorThrower", Lookup.TYPE_ERROR_THROWER_GETTER, null, null, false, false, false); - func.setPrototype(UNDEFINED); - // Non-constructor built-in functions do not have "prototype" property - func.deleteOwnProperty(func.getMap().findProperty("prototype")); - func.preventExtensions(); - typeErrorThrower = func; - } - - return typeErrorThrower; - } - private static PropertyMap createStrictModeMap(final PropertyMap map) { final int flags = Property.NOT_ENUMERABLE | Property.NOT_CONFIGURABLE; PropertyMap newMap = map; @@ -313,12 +293,13 @@ public class ScriptFunctionImpl extends ScriptFunction { // We have to fill user accessor functions late as these are stored // in this object rather than in the PropertyMap of this object. + final ScriptFunction errorThrower = global.getTypeErrorThrower(); if (findProperty("arguments", true) != null) { - setUserAccessors("arguments", getTypeErrorThrower(), getTypeErrorThrower()); + setUserAccessors("arguments", errorThrower, errorThrower); } if (findProperty("caller", true) != null) { - setUserAccessors("caller", getTypeErrorThrower(), getTypeErrorThrower()); + setUserAccessors("caller", errorThrower, errorThrower); } } } diff --git a/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java b/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java index 587ae869ef6..d4a42ba4497 100644 --- a/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java +++ b/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java @@ -26,6 +26,7 @@ package jdk.nashorn.internal.parser; import static jdk.nashorn.internal.parser.TokenType.COMMENT; +import static jdk.nashorn.internal.parser.TokenType.DIRECTIVE_COMMENT; import static jdk.nashorn.internal.parser.TokenType.EOF; import static jdk.nashorn.internal.parser.TokenType.EOL; import static jdk.nashorn.internal.parser.TokenType.IDENT; @@ -84,6 +85,9 @@ public abstract class AbstractParser { /** Is this parser running under strict mode? */ protected boolean isStrictMode; + /** //@ sourceURL or //# sourceURL */ + protected String sourceURL; + /** * Construct a parser. * @@ -156,17 +160,38 @@ public abstract class AbstractParser { protected final TokenType nextOrEOL() { do { nextToken(); - } while (type == COMMENT); + if (type == DIRECTIVE_COMMENT) { + checkDirectiveComment(); + } + } while (type == COMMENT || type == DIRECTIVE_COMMENT); return type; } + // sourceURL= after directive comment + private static final String SOURCE_URL_PREFIX = "sourceURL="; + + // currently only @sourceURL=foo supported + private void checkDirectiveComment() { + // if already set, ignore this one + if (sourceURL != null) { + return; + } + + final String comment = (String) lexer.getValueOf(token, isStrictMode); + final int len = comment.length(); + // 4 characters for directive comment marker //@\s or //#\s + if (len > 4 && comment.substring(4).startsWith(SOURCE_URL_PREFIX)) { + sourceURL = comment.substring(4 + SOURCE_URL_PREFIX.length()); + } + } + /** * Seek next token. * * @return tokenType of next token. */ - private final TokenType nextToken() { + private TokenType nextToken() { // Capture last token tokenType. last = type; if (type != EOF) { diff --git a/nashorn/src/jdk/nashorn/internal/parser/Lexer.java b/nashorn/src/jdk/nashorn/internal/parser/Lexer.java index a01705dd956..653f04c02f5 100644 --- a/nashorn/src/jdk/nashorn/internal/parser/Lexer.java +++ b/nashorn/src/jdk/nashorn/internal/parser/Lexer.java @@ -27,6 +27,7 @@ package jdk.nashorn.internal.parser; import static jdk.nashorn.internal.parser.TokenType.ADD; import static jdk.nashorn.internal.parser.TokenType.COMMENT; +import static jdk.nashorn.internal.parser.TokenType.DIRECTIVE_COMMENT; import static jdk.nashorn.internal.parser.TokenType.DECIMAL; import static jdk.nashorn.internal.parser.TokenType.EOF; import static jdk.nashorn.internal.parser.TokenType.EOL; @@ -434,12 +435,18 @@ public class Lexer extends Scanner { if (ch1 == '/') { // Skip over //. skip(2); + + boolean directiveComment = false; + if ((ch0 == '#' || ch0 == '@') && (ch1 == ' ')) { + directiveComment = true; + } + // Scan for EOL. while (!atEOF() && !isEOL(ch0)) { skip(1); } // Did detect a comment. - add(COMMENT, start); + add(directiveComment? DIRECTIVE_COMMENT : COMMENT, start); return true; } else if (ch1 == '*') { // Skip over /*. @@ -1623,6 +1630,8 @@ public class Lexer extends Scanner { return valueOfPattern(start, len); // RegexToken::LexerToken case XML: return valueOfXML(start, len); // XMLToken::LexerToken + case DIRECTIVE_COMMENT: + return source.getString(start, len); default: break; } diff --git a/nashorn/src/jdk/nashorn/internal/parser/Parser.java b/nashorn/src/jdk/nashorn/internal/parser/Parser.java index 8e04fdceda7..60cbaccb68e 100644 --- a/nashorn/src/jdk/nashorn/internal/parser/Parser.java +++ b/nashorn/src/jdk/nashorn/internal/parser/Parser.java @@ -26,7 +26,7 @@ package jdk.nashorn.internal.parser; import static jdk.nashorn.internal.codegen.CompilerConstants.EVAL; -import static jdk.nashorn.internal.codegen.CompilerConstants.FUNCTION_PREFIX; +import static jdk.nashorn.internal.codegen.CompilerConstants.ANON_FUNCTION_PREFIX; import static jdk.nashorn.internal.codegen.CompilerConstants.RUN_SCRIPT; import static jdk.nashorn.internal.parser.TokenType.ASSIGN; import static jdk.nashorn.internal.parser.TokenType.CASE; @@ -389,7 +389,9 @@ loop: sb.append(parentFunction.getName()).append('$'); } - sb.append(ident != null ? ident.getName() : FUNCTION_PREFIX.symbolName()); + assert ident.getName() != null; + sb.append(ident.getName()); + final String name = namespace.uniqueName(sb.toString()); assert parentFunction != null || name.equals(RUN_SCRIPT.symbolName()) : "name = " + name;// must not rename runScript(). @@ -419,7 +421,8 @@ loop: name, parameters, kind, - flags); + flags, + sourceURL); lc.push(functionNode); // Create new block, and just put it on the context stack, restoreFunctionNode() will associate it with the @@ -638,6 +641,10 @@ loop: script = restoreFunctionNode(script, token); //commit code script = script.setBody(lc, script.getBody().setNeedsScope(lc)); + // user may have directive comment to set sourceURL + if (sourceURL != null) { + script = script.setSourceURL(lc, sourceURL); + } return script; } @@ -2132,11 +2139,20 @@ loop: final String setterName = setIdent.getPropertyName(); final IdentNode setNameNode = new IdentNode(((Node)setIdent).getToken(), finish, NameCodec.encode("set " + setterName)); expect(LPAREN); - final IdentNode argIdent = getIdent(); - verifyStrictIdent(argIdent, "setter argument"); + // be sloppy and allow missing setter parameter even though + // spec does not permit it! + final IdentNode argIdent; + if (type == IDENT || isNonStrictModeIdent()) { + argIdent = getIdent(); + verifyStrictIdent(argIdent, "setter argument"); + } else { + argIdent = null; + } expect(RPAREN); List<IdentNode> parameters = new ArrayList<>(); - parameters.add(argIdent); + if (argIdent != null) { + parameters.add(argIdent); + } functionNode = functionBody(getSetToken, setNameNode, parameters, FunctionNode.Kind.SETTER); return new PropertyNode(propertyToken, finish, setIdent, null, null, functionNode); @@ -2448,7 +2464,7 @@ loop: // name is null, generate anonymous name boolean isAnonymous = false; if (name == null) { - final String tmpName = "_L" + functionLine; + final String tmpName = ANON_FUNCTION_PREFIX.symbolName() + functionLine; name = new IdentNode(functionToken, Token.descPosition(functionToken), tmpName); isAnonymous = true; } diff --git a/nashorn/src/jdk/nashorn/internal/parser/TokenType.java b/nashorn/src/jdk/nashorn/internal/parser/TokenType.java index 6287a234cf2..5c696cb92b7 100644 --- a/nashorn/src/jdk/nashorn/internal/parser/TokenType.java +++ b/nashorn/src/jdk/nashorn/internal/parser/TokenType.java @@ -41,10 +41,14 @@ import static jdk.nashorn.internal.parser.TokenKind.UNARY; */ @SuppressWarnings("javadoc") public enum TokenType { - ERROR (SPECIAL, null), - EOF (SPECIAL, null), - EOL (SPECIAL, null), - COMMENT (SPECIAL, null), + ERROR (SPECIAL, null), + EOF (SPECIAL, null), + EOL (SPECIAL, null), + COMMENT (SPECIAL, null), + // comments of the form //@ foo=bar or //# foo=bar + // These comments are treated as special instructions + // to the lexer, parser or codegenerator. + DIRECTIVE_COMMENT (SPECIAL, null), NOT (UNARY, "!", 14, false), NE (BINARY, "!=", 9, true), diff --git a/nashorn/src/jdk/nashorn/internal/runtime/Context.java b/nashorn/src/jdk/nashorn/internal/runtime/Context.java index c9deee3501d..1817ca928ba 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/Context.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/Context.java @@ -91,6 +91,11 @@ public final class Context { */ public static final String NASHORN_JAVA_REFLECTION = "nashorn.JavaReflection"; + /** + * Permission to enable nashorn debug mode. + */ + public static final String NASHORN_DEBUG_MODE = "nashorn.debugMode"; + // nashorn load psuedo URL prefixes private static final String LOAD_CLASSPATH = "classpath:"; private static final String LOAD_FX = "fx:"; diff --git a/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java b/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java index 0ff843a4271..754ebbf955f 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java @@ -30,6 +30,7 @@ import java.util.Locale; import java.util.ResourceBundle; import jdk.nashorn.api.scripting.NashornException; import jdk.nashorn.internal.scripts.JS; +import jdk.nashorn.internal.codegen.CompilerConstants; /** * Helper class to throw various standard "ECMA error" exceptions such as Error, ReferenceError, TypeError etc. @@ -401,7 +402,7 @@ public final class ECMAErrors { final String className = frame.getClassName(); // Look for script package in class name (into which compiler puts generated code) - if (className.startsWith(scriptPackage)) { + if (className.startsWith(scriptPackage) && !frame.getMethodName().startsWith(CompilerConstants.INTERNAL_METHOD_PREFIX)) { final String source = frame.getFileName(); /* * Make sure that it is not some Java code that Nashorn has in that package! diff --git a/nashorn/src/jdk/nashorn/internal/runtime/ECMAException.java b/nashorn/src/jdk/nashorn/internal/runtime/ECMAException.java index a32e721cc46..c900963de4a 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/ECMAException.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/ECMAException.java @@ -25,7 +25,7 @@ package jdk.nashorn.internal.runtime; -import static jdk.nashorn.internal.codegen.CompilerConstants.constructorNoLookup; +import static jdk.nashorn.internal.codegen.CompilerConstants.staticCallNoLookup; import static jdk.nashorn.internal.codegen.CompilerConstants.virtualField; import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED; @@ -44,9 +44,9 @@ import jdk.nashorn.internal.codegen.CompilerConstants.FieldAccess; @SuppressWarnings("serial") public final class ECMAException extends NashornException { /** - * Method handle pointing to the constructor {@link ECMAException#ECMAException(Object, String, int, int)}, + * Method handle pointing to the constructor {@link ECMAException#create(Object, String, int, int)}, */ - public static final Call THROW_INIT = constructorNoLookup(ECMAException.class, Object.class, String.class, int.class, int.class); + public static final Call CREATE = staticCallNoLookup(ECMAException.class, "create", ECMAException.class, Object.class, String.class, int.class, int.class); /** Field handle to the{@link ECMAException#thrown} field, so that it can be accessed from generated code */ public static final FieldAccess THROWN = virtualField(ECMAException.class, "thrown", Object.class); @@ -57,23 +57,21 @@ public final class ECMAException extends NashornException { public final Object thrown; /** - * Constructor. This is called from generated code to implement the {@code throw} - * instruction from generated script code + * Constructor. Called from the factory method 'create'. * * @param thrown object to be thrown * @param fileName script file name * @param line line number of throw * @param column column number of throw */ - public ECMAException(final Object thrown, final String fileName, final int line, final int column) { + private ECMAException(final Object thrown, final String fileName, final int line, final int column) { super(ScriptRuntime.safeToString(thrown), asThrowable(thrown), fileName, line, column); this.thrown = thrown; setExceptionToThrown(); } /** - * Constructor. This is called from runtime code in Nashorn to throw things like - * type errors. + * Constructor. This is called from the runtime code. * * @param thrown object to be thrown * @param cause Java exception that triggered this throw @@ -84,10 +82,40 @@ public final class ECMAException extends NashornException { setExceptionToThrown(); } + /** + * Factory method to retrieve the underlying exception or create an exception. + * This method is called from the generated code. + * + * @param thrown object to be thrown + * @param fileName script file name + * @param line line number of throw + * @param column column number of throw + * @return ECMAException object + */ + public static ECMAException create(final Object thrown, final String fileName, final int line, final int column) { + // If thrown object is an Error or sub-object like TypeError, then + // an ECMAException object has been already initialized at constructor. + if (thrown instanceof ScriptObject) { + ScriptObject sobj = (ScriptObject)thrown; + Object exception = getException(sobj); + if (exception instanceof ECMAException) { + // copy over file name, line number and column number. + final ECMAException ee = (ECMAException)exception; + ee.setFileName(fileName); + ee.setLineNumber(line); + ee.setColumnNumber(column); + return ee; + } + } + + return new ECMAException(thrown, fileName, line, column); + } + /** * Get the thrown object * @return thrown object */ + @Override public Object getThrown() { return thrown; } @@ -256,6 +284,8 @@ public final class ECMAException extends NashornException { final ScriptObject sobj = (ScriptObject)thrown; if (!sobj.has(EXCEPTION_PROPERTY)) { sobj.addOwnProperty(EXCEPTION_PROPERTY, Property.NOT_ENUMERABLE, this); + } else { + sobj.set(EXCEPTION_PROPERTY, this, false); } } } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/FindProperty.java b/nashorn/src/jdk/nashorn/internal/runtime/FindProperty.java index c14accb7c4e..87a8c74849a 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/FindProperty.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/FindProperty.java @@ -112,7 +112,7 @@ public final class FindProperty { return property != null && property.hasGetterFunction(prototype) ? self : prototype; } - /** + /** * Return the appropriate receiver for a setter. * @return appropriate receiver */ @@ -172,5 +172,20 @@ public final class FindProperty { property.setObjectValue(getSetterReceiver(), getOwner(), value, strict); } + /** + * Get the number of objects in the prototype chain between the {@code self} and the + * {@code owner} objects. + * @return the prototype chain length + */ + int getProtoChainLength() { + assert self != null; + int length = 0; + for (ScriptObject obj = self; obj != prototype; obj = obj.getProto()) { + assert !(obj instanceof WithObject); + ++length; + } + return length; + } + } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java b/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java index 99ba9e19fa5..a5abacb2134 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java @@ -196,26 +196,15 @@ public final class NativeJavaPackage extends ScriptObject { @Override public GuardedInvocation noSuchProperty(final CallSiteDescriptor desc, final LinkRequest request) { final String propertyName = desc.getNameToken(2); - final String fullName = name.isEmpty() ? propertyName : name + "." + propertyName; - - final Context context = Context.getContextTrusted(); - - Class<?> javaClass = null; - try { - javaClass = context.findClass(fullName); - } catch (final NoClassDefFoundError | ClassNotFoundException e) { - //ignored - } - - if (javaClass == null) { - set(propertyName, new NativeJavaPackage(fullName, getProto()), false); - } else { - set(propertyName, StaticClass.forClass(javaClass), false); - } - + createProperty(propertyName); return super.lookup(desc, request); } + @Override + protected Object invokeNoSuchProperty(final String name) { + return createProperty(name); + } + @Override public GuardedInvocation noSuchMethod(final CallSiteDescriptor desc, final LinkRequest request) { return noSuchProperty(desc, request); @@ -224,4 +213,26 @@ public final class NativeJavaPackage extends ScriptObject { private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) { return MH.findStatic(MethodHandles.lookup(), NativeJavaPackage.class, name, MH.type(rtype, types)); } + + private Object createProperty(final String propertyName) { + final String fullName = name.isEmpty() ? propertyName : name + "." + propertyName; + final Context context = Context.getContextTrusted(); + + Class<?> javaClass = null; + try { + javaClass = context.findClass(fullName); + } catch (final NoClassDefFoundError | ClassNotFoundException e) { + //ignored + } + + final Object propertyValue; + if (javaClass == null) { + propertyValue = new NativeJavaPackage(fullName, getProto()); + } else { + propertyValue = StaticClass.forClass(javaClass); + } + + set(propertyName, propertyValue, false); + return propertyValue; + } } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java b/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java index 02160d69eee..4b85ed4ed5c 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java @@ -143,6 +143,8 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr private static final MethodHandle TRUNCATINGFILTER = findOwnMH("truncatingFilter", Object[].class, int.class, Object[].class); private static final MethodHandle KNOWNFUNCPROPGUARD = findOwnMH("knownFunctionPropertyGuard", boolean.class, Object.class, PropertyMap.class, MethodHandle.class, Object.class, ScriptFunction.class); + private static final ArrayList<MethodHandle> protoFilters = new ArrayList<>(); + /** Method handle for getting a function argument at a given index. Used from MapCreator */ public static final Call GET_ARGUMENT = virtualCall(MethodHandles.lookup(), ScriptObject.class, "getArgument", Object.class, int.class); @@ -1711,6 +1713,44 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr return getter.replaceMethods(MH.foldArguments(invoker, argDroppingGetter), getter.getGuard()); } + /** + * Test whether this object contains in its prototype chain or is itself a with-object. + * @return true if a with-object was found + */ + final boolean hasWithScope() { + if (isScope()) { + for (ScriptObject obj = this; obj != null; obj = obj.getProto()) { + if (obj instanceof WithObject) { + return true; + } + } + } + return false; + } + + /** + * Add a filter to the first argument of {@code methodHandle} that calls its {@link #getProto()} method + * {@code depth} times. + * @param methodHandle a method handle + * @param depth distance to target prototype + * @return the filtered method handle + */ + static MethodHandle addProtoFilter(final MethodHandle methodHandle, final int depth) { + if (depth == 0) { + return methodHandle; + } + final int listIndex = depth - 1; // We don't need 0-deep walker + MethodHandle filter = listIndex < protoFilters.size() ? protoFilters.get(listIndex) : null; + + if(filter == null) { + filter = addProtoFilter(GETPROTO, depth - 1); + protoFilters.add(null); + protoFilters.set(listIndex, filter); + } + + return MH.filterArguments(methodHandle, 0, filter.asType(filter.type().changeReturnType(methodHandle.type().parameterType(0)))); + } + /** * Find the appropriate GET method for an invoke dynamic call. * @@ -1722,7 +1762,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr */ protected GuardedInvocation findGetMethod(final CallSiteDescriptor desc, final LinkRequest request, final String operator) { final String name = desc.getNameToken(CallSiteDescriptor.NAME_OPERAND); - if (request.isCallSiteUnstable()) { + if (request.isCallSiteUnstable() || hasWithScope()) { return findMegaMorphicGetMethod(desc, name, "getMethod".equals(operator)); } @@ -1748,22 +1788,24 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr final Property property = find.getProperty(); methodHandle = find.getGetter(returnType); + final boolean noGuard = ObjectClassGenerator.OBJECT_FIELDS_ONLY && NashornCallSiteDescriptor.isFastScope(desc) && !property.canChangeType(); // getMap() is fine as we have the prototype switchpoint depending on where the property was found - final MethodHandle guard = NashornGuards.getMapGuard(getMap()); + final MethodHandle guard = noGuard ? null : NashornGuards.getMapGuard(getMap()); if (methodHandle != null) { assert methodHandle.type().returnType().equals(returnType); if (find.isSelf()) { - return new GuardedInvocation(methodHandle, ObjectClassGenerator.OBJECT_FIELDS_ONLY && - NashornCallSiteDescriptor.isFastScope(desc) && !property.canChangeType() ? null : guard); + return new GuardedInvocation(methodHandle, guard); } - final ScriptObject prototype = find.getOwner(); - - if (!property.hasGetterFunction(prototype)) { - methodHandle = bindTo(methodHandle, prototype); + if (!property.hasGetterFunction(find.getOwner())) { + // If not a scope bind to actual prototype as changing prototype will change the property map. + // For scopes we install a filter that replaces the self object with the prototype owning the property. + methodHandle = isScope() ? + addProtoFilter(methodHandle, find.getProtoChainLength()) : + bindTo(methodHandle, find.getOwner()); } - return new GuardedInvocation(methodHandle, getMap().getProtoGetSwitchPoint(proto, name), guard); + return new GuardedInvocation(methodHandle, noGuard ? null : getMap().getProtoGetSwitchPoint(proto, name), guard); } assert !NashornCallSiteDescriptor.isFastScope(desc); @@ -1833,7 +1875,7 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr */ protected GuardedInvocation findSetMethod(final CallSiteDescriptor desc, final LinkRequest request) { final String name = desc.getNameToken(CallSiteDescriptor.NAME_OPERAND); - if (request.isCallSiteUnstable()) { + if (request.isCallSiteUnstable() || hasWithScope()) { return findMegaMorphicSetMethod(desc, name); } @@ -1888,7 +1930,9 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr final ScriptObject obj = (ScriptObject)self; final boolean isStrict = NashornCallSiteDescriptor.isStrict(desc); if (!obj.isExtensible()) { - throw typeError("object.non.extensible", desc.getNameToken(2), ScriptRuntime.safeToString(obj)); + if (isStrict) { + throw typeError("object.non.extensible", desc.getNameToken(2), ScriptRuntime.safeToString(obj)); + } } else if (obj.compareAndSetMap(oldMap, newMap)) { setter.invokeExact(self, value); } else { @@ -2049,12 +2093,13 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr return createEmptyGetter(desc, name); } + /** * Invoke fall back if a property is not found. * @param name Name of property. * @return Result from call. */ - private Object invokeNoSuchProperty(final String name) { + protected Object invokeNoSuchProperty(final String name) { final FindProperty find = findProperty(NO_SUCH_PROPERTY_NAME, true); if (find != null) { @@ -2759,7 +2804,8 @@ public abstract class ScriptObject extends PropertyListenerManager implements Pr public final void setObject(final FindProperty find, final boolean strict, final String key, final Object value) { FindProperty f = find; - if (f != null && f.isInherited() && !(f.getProperty() instanceof UserAccessorProperty)) { + if (f != null && f.isInherited() && !(f.getProperty() instanceof UserAccessorProperty) && !isScope()) { + // Setting a property should not modify the property in prototype unless this is a scope object. f = null; } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/SetMethodCreator.java b/nashorn/src/jdk/nashorn/internal/runtime/SetMethodCreator.java index 777254d831c..7390aadd0cd 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/SetMethodCreator.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/SetMethodCreator.java @@ -151,10 +151,12 @@ final class SetMethodCreator { assert methodHandle != null; assert property != null; - final ScriptObject prototype = find.getOwner(); final MethodHandle boundHandle; - if (!property.hasSetterFunction(prototype) && find.isInherited()) { - boundHandle = ScriptObject.bindTo(methodHandle, prototype); + if (!property.hasSetterFunction(find.getOwner()) && find.isInherited()) { + // Bind or add prototype filter depending on whether this is a scope object. + boundHandle = sobj.isScope() ? + ScriptObject.addProtoFilter(methodHandle, find.getProtoChainLength()): + ScriptObject.bindTo(methodHandle, find.getOwner()); } else { boundHandle = methodHandle; } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java index 5b8d4cfe3f0..ef2a6829a25 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java @@ -317,7 +317,7 @@ final class JavaAdapterBytecodeGenerator { final InstructionAdapter mv = new InstructionAdapter(cw.visitMethod(ACC_STATIC, CLASS_INIT, Type.getMethodDescriptor(Type.VOID_TYPE), null, null)); - mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getClassOverrides", GET_CLASS_INITIALIZER_DESCRIPTOR); + mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getClassOverrides", GET_CLASS_INITIALIZER_DESCRIPTOR, false); final Label initGlobal; if(samName != null) { // If the class is a SAM, allow having a ScriptFunction passed as class overrides @@ -333,7 +333,7 @@ final class JavaAdapterBytecodeGenerator { if(mi.getName().equals(samName)) { mv.dup(); mv.aconst(Type.getMethodType(mi.type.toMethodDescriptorString())); - mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", GET_HANDLE_FUNCTION_DESCRIPTOR); + mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", GET_HANDLE_FUNCTION_DESCRIPTOR, false); } else { mv.visitInsn(ACONST_NULL); } @@ -350,7 +350,7 @@ final class JavaAdapterBytecodeGenerator { mv.dup(); mv.aconst(mi.getName()); mv.aconst(Type.getMethodType(mi.type.toMethodDescriptorString())); - mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", GET_HANDLE_OBJECT_DESCRIPTOR); + mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", GET_HANDLE_OBJECT_DESCRIPTOR, false); mv.putstatic(generatedClassName, mi.methodHandleClassFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); } @@ -367,7 +367,7 @@ final class JavaAdapterBytecodeGenerator { private static void invokeGetGlobalWithNullCheck(final InstructionAdapter mv) { invokeGetGlobal(mv); mv.dup(); - mv.invokevirtual(OBJECT_TYPE_NAME, "getClass", GET_CLASS_METHOD_DESCRIPTOR); // check against null Context + mv.invokevirtual(OBJECT_TYPE_NAME, "getClass", GET_CLASS_METHOD_DESCRIPTOR, false); // check against null Context mv.pop(); } @@ -424,7 +424,7 @@ final class JavaAdapterBytecodeGenerator { mv.load(offset, argType); offset += argType.getSize(); } - mv.invokespecial(superClassName, INIT, originalCtorType.getDescriptor()); + mv.invokespecial(superClassName, INIT, originalCtorType.getDescriptor(), false); endInitMethod(mv); } @@ -477,7 +477,7 @@ final class JavaAdapterBytecodeGenerator { mv.load(offset, argType); offset += argType.getSize(); } - mv.invokespecial(superClassName, INIT, originalCtorType.getDescriptor()); + mv.invokespecial(superClassName, INIT, originalCtorType.getDescriptor(), false); // Get a descriptor to the appropriate "JavaAdapterFactory.getHandle" method. final String getHandleDescriptor = fromFunction ? GET_HANDLE_FUNCTION_DESCRIPTOR : GET_HANDLE_OBJECT_DESCRIPTOR; @@ -496,7 +496,7 @@ final class JavaAdapterBytecodeGenerator { mv.aconst(mi.getName()); } mv.aconst(Type.getMethodType(mi.type.toMethodDescriptorString())); - mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", getHandleDescriptor); + mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", getHandleDescriptor, false); } mv.putfield(generatedClassName, mi.methodHandleInstanceFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); } @@ -520,11 +520,11 @@ final class JavaAdapterBytecodeGenerator { } private static void invokeGetGlobal(final InstructionAdapter mv) { - mv.invokestatic(CONTEXT_TYPE_NAME, "getGlobal", GET_GLOBAL_METHOD_DESCRIPTOR); + mv.invokestatic(CONTEXT_TYPE_NAME, "getGlobal", GET_GLOBAL_METHOD_DESCRIPTOR, false); } private static void invokeSetGlobal(final InstructionAdapter mv) { - mv.invokestatic(CONTEXT_TYPE_NAME, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR); + mv.invokestatic(CONTEXT_TYPE_NAME, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR, false); } /** @@ -647,11 +647,11 @@ final class JavaAdapterBytecodeGenerator { // If the super method is abstract, throw an exception mv.anew(UNSUPPORTED_OPERATION_TYPE); mv.dup(); - mv.invokespecial(UNSUPPORTED_OPERATION_TYPE_NAME, INIT, VOID_NOARG_METHOD_DESCRIPTOR); + mv.invokespecial(UNSUPPORTED_OPERATION_TYPE_NAME, INIT, VOID_NOARG_METHOD_DESCRIPTOR, false); mv.athrow(); } else { // If the super method is not abstract, delegate to it. - emitSuperCall(mv, name, methodDesc); + emitSuperCall(mv, method.getDeclaringClass(), name, methodDesc); } final Label setupGlobal = new Label(); @@ -728,7 +728,7 @@ final class JavaAdapterBytecodeGenerator { // Invoke the target method handle final Label tryBlockStart = new Label(); mv.visitLabel(tryBlockStart); - mv.invokevirtual(METHOD_HANDLE_TYPE.getInternalName(), "invokeExact", type.toMethodDescriptorString()); + mv.invokevirtual(METHOD_HANDLE_TYPE.getInternalName(), "invokeExact", type.toMethodDescriptorString(), false); final Label tryBlockEnd = new Label(); mv.visitLabel(tryBlockEnd); emitFinally(mv, currentGlobalVar, globalsDifferVar); @@ -744,7 +744,7 @@ final class JavaAdapterBytecodeGenerator { mv.anew(RUNTIME_EXCEPTION_TYPE); mv.dupX1(); mv.swap(); - mv.invokespecial(RUNTIME_EXCEPTION_TYPE_NAME, INIT, Type.getMethodDescriptor(Type.VOID_TYPE, THROWABLE_TYPE)); + mv.invokespecial(RUNTIME_EXCEPTION_TYPE_NAME, INIT, Type.getMethodDescriptor(Type.VOID_TYPE, THROWABLE_TYPE), false); // Fall through to rethrow handler } else { throwableHandler = null; @@ -830,12 +830,12 @@ final class JavaAdapterBytecodeGenerator { SUPER_PREFIX + name, methodDesc, null, getExceptionNames(method.getExceptionTypes()))); mv.visitCode(); - emitSuperCall(mv, name, methodDesc); + emitSuperCall(mv, method.getDeclaringClass(), name, methodDesc); endMethod(mv); } - private void emitSuperCall(final InstructionAdapter mv, final String name, final String methodDesc) { + private void emitSuperCall(final InstructionAdapter mv, final Class owner, final String name, final String methodDesc) { mv.visitVarInsn(ALOAD, 0); int nextParam = 1; final Type methodType = Type.getMethodType(methodDesc); @@ -843,7 +843,13 @@ final class JavaAdapterBytecodeGenerator { mv.load(nextParam, t); nextParam += t.getSize(); } - mv.invokespecial(superClassName, name, methodDesc); + + // default method - non-abstract, interface method + if (Modifier.isInterface(owner.getModifiers())) { + mv.invokespecial(Type.getInternalName(owner), name, methodDesc, false); + } else { + mv.invokespecial(superClassName, name, methodDesc, false); + } mv.areturn(methodType.getReturnType()); } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java index 39f9364233d..6772cbee037 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java @@ -75,7 +75,8 @@ final class ReflectionCheckLinker implements TypeBasedGuardingDynamicLinker{ if ((self instanceof Class) && Modifier.isPublic(((Class<?>)self).getModifiers())) { final CallSiteDescriptor desc = requestWithoutContext.getCallSiteDescriptor(); if(CallSiteDescriptorFactory.tokenizeOperators(desc).contains("getProp")) { - if ("static".equals(desc.getNameToken(CallSiteDescriptor.NAME_OPERAND))) { + if (desc.getNameTokenCount() > CallSiteDescriptor.NAME_OPERAND && + "static".equals(desc.getNameToken(CallSiteDescriptor.NAME_OPERAND))) { if (Context.isAccessibleClass((Class<?>)self) && !isReflectionClass((Class<?>)self)) { // If "getProp:static" passes access checks, allow access. return; diff --git a/nashorn/test/script/basic/JDK-8010731.js b/nashorn/test/script/basic/JDK-8010731.js new file mode 100644 index 00000000000..532cf135e81 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8010731.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8010731: Nashorn exposes internal symbols such as __callee__, __scope__ to scripts + * + * @test + * @run + */ + +function checkCallee() { + var x = arguments[0]; // force __callee__ (renamed as :callee) + + print(__callee__); +} + +try { + checkCallee(); + fail("Should have thrown ReferenceError for __callee__"); +} catch (e) { + if (! (e instanceof ReferenceError)) { + fail("ReferenceError expected, got " + e); + } +} + +function checkScope() { + var x = 334; + + function inner() { + var y = x * x; // force __scope__ (renamed as :scope") + print(__scope__); + } + + inner(); +} + +try { + checkScope(); + fail("Should have thrown ReferenceError for __scope__"); +} catch (e) { + if (! (e instanceof ReferenceError)) { + fail("ReferenceError expected, got " + e); + } +} diff --git a/nashorn/test/script/basic/JDK-8025515.js b/nashorn/test/script/basic/JDK-8025515.js index f3d7cee47c0..29574d2a86a 100644 --- a/nashorn/test/script/basic/JDK-8025515.js +++ b/nashorn/test/script/basic/JDK-8025515.js @@ -30,13 +30,23 @@ // Make sure synthetic names of anonymous functions have correct line numbers +function getFirstScriptFrame(stack) { + for (frameNum in stack) { + var frame = stack[frameNum]; + if (frame.className.startsWith("jdk.nashorn.internal.scripts.Script$")) { + return frame; + } + } +} + function testMethodName(f, expected) { try { f(); fail("expected error"); } catch (e) { - var stack = e.getStackTrace(); - if (stack[0].methodName !== expected) { + var stack = e.nashornException.getStackTrace(); + var name = getFirstScriptFrame(stack).methodName; + if (name !== expected) { fail("got " + stack[0].methodName + ", expected " + expected); } } @@ -44,15 +54,15 @@ function testMethodName(f, expected) { testMethodName(function() { return a.b.c; -}, "_L45"); +}, "L:55"); -testMethodName(function() { throw new Error() }, "_L49"); +testMethodName(function() { throw new Error() }, "L:59"); var f = (function() { return function() { a.b.c; }; })(); -testMethodName(f, "_L51$_L52"); +testMethodName(f, "L:61$L:62"); testMethodName((function() { return function() { return a.b.c; }; -})(), "_L56$_L57"); +})(), "L:66$L:67"); diff --git a/nashorn/test/script/basic/JDK-8029364.js b/nashorn/test/script/basic/JDK-8029364.js new file mode 100644 index 00000000000..dfa8ea9de4f --- /dev/null +++ b/nashorn/test/script/basic/JDK-8029364.js @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8029364: NashornException to expose thrown object + * + * @test + * @run + */ + +var m = new javax.script.ScriptEngineManager(); +var e = m.getEngineByName("nashorn"); +var g = e.eval("this"); +try { + e.eval("var e = new Error('foo'); e.bar = 33; throw e"); +} catch (se) { + // ScriptException instance's cause is a NashornException + print(se.getClass()); + var cause = se.cause; + print(cause.getClass()); + // NashornException instance has 'ecmaError' bean getter + print(cause.ecmaError); + // access to underlying ECMA Error object + print(cause.ecmaError instanceof g.Error); + print(cause.ecmaError.name); + print(cause.ecmaError.message); + print(cause.ecmaError.bar); +} + diff --git a/nashorn/test/script/basic/JDK-8029364.js.EXPECTED b/nashorn/test/script/basic/JDK-8029364.js.EXPECTED new file mode 100644 index 00000000000..d01bb9ee0b7 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8029364.js.EXPECTED @@ -0,0 +1,7 @@ +class javax.script.ScriptException +class jdk.nashorn.internal.runtime.ECMAException +Error: foo +true +Error +foo +33 diff --git a/nashorn/test/script/basic/JDK-8029467.js b/nashorn/test/script/basic/JDK-8029467.js new file mode 100644 index 00000000000..ad7f2fde6bb --- /dev/null +++ b/nashorn/test/script/basic/JDK-8029467.js @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8029467: Widening of booleans causes bad results + * + * @test + * @run + */ + +print((function (x) { return x ? true : 0 })(true)) +print((function (x) { if(x) { return true } else { return 0 } })(true)) +print(typeof (function (x) { return x ? 1 : "123" })(true) === "number") +print(typeof (function (x) { if(x) { return 1 } else { return "123" } })(true) === "number") diff --git a/nashorn/test/script/basic/JDK-8029467.js.EXPECTED b/nashorn/test/script/basic/JDK-8029467.js.EXPECTED new file mode 100644 index 00000000000..1140ff52e2b --- /dev/null +++ b/nashorn/test/script/basic/JDK-8029467.js.EXPECTED @@ -0,0 +1,4 @@ +true +true +true +true diff --git a/nashorn/test/script/basic/JDK-8029667.js b/nashorn/test/script/basic/JDK-8029667.js new file mode 100644 index 00000000000..c0c2d156200 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8029667.js @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8029667: Prototype linking is incorrect + * + * @test + * @run + */ + +function f(x) { + return (function inner() { + var y; (function dummy() { return y })() // force own scope for the inner function + with({}) { // 'with' block turns off fast scopes + return x + } + })(); +} +print(f(1)); +print(f(2)); + +function g(x) { + (function inner() { + var y; (function dummy() { return y })() // force own scope for the inner function + with({}) { // 'with' block turns off fast scopes + // Test setter as well as getter + x = x + 2; + } + })(); + print(x); +} + +g(1); +g(2); + +var withScopes = [{ func: function() { print("called 1");} }, { func: function() { print("called 2");} }]; + +for(var i in withScopes) { + with (withScopes[i]) { + var main = function() { + var frame; // <---- this local variable caused scope to be not set properly prior to fix + + function callFunc() { + frame = func(); + } + + callFunc(); + } + } + main(); +} + +for(var i in withScopes) { + with (withScopes[i]) { + var main = function() { + var frame; // <---- this local variable caused scope to be not set properly prior to fix + + function callFunc() { + frame = func = i; + } + + callFunc(); + } + } + main(); +} + +print(withScopes[0].func); +print(withScopes[1].func); + + diff --git a/nashorn/test/script/basic/JDK-8029667.js.EXPECTED b/nashorn/test/script/basic/JDK-8029667.js.EXPECTED new file mode 100644 index 00000000000..8aa78efed12 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8029667.js.EXPECTED @@ -0,0 +1,8 @@ +1 +2 +3 +4 +called 1 +called 2 +0 +1 diff --git a/nashorn/test/script/basic/JDK-8030182.js b/nashorn/test/script/basic/JDK-8030182.js new file mode 100644 index 00000000000..f3c492d41b2 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8030182.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8030182: scopeCall with -1 as line number + * + * @test + * @run + */ + +function func() { + throw new Error("Strange..."); +} + +var f2 = func; +var f3 = func; +var f4 = func; +var f5 = func; + +// check that "scopeCall" or some such internal method +// does not appear in script stack trace. +try { + func(); +} catch(err) { + print(err.stack.replace(/\\/g, '/')); +} diff --git a/nashorn/test/script/basic/JDK-8030182.js.EXPECTED b/nashorn/test/script/basic/JDK-8030182.js.EXPECTED new file mode 100644 index 00000000000..d12b6d7fd72 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8030182.js.EXPECTED @@ -0,0 +1,3 @@ +Error: Strange... + at func (test/script/basic/JDK-8030182.js:32) + at <program> (test/script/basic/JDK-8030182.js:43) diff --git a/nashorn/test/script/basic/JDK-8030182_2.js b/nashorn/test/script/basic/JDK-8030182_2.js new file mode 100644 index 00000000000..de507e1dad4 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8030182_2.js @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8030182: scopeCall with -1 as line number + * + * @test + * @run + */ + +var str = ""; + +// large code to force splitting +for (i = 0; i < 1000; ++i) + str +="o = new Object()\n"; + +str +="g()"; + +// check that "$split" or some such internal method +// does not appear in script stack trace!! +try { + eval(str); +} catch (e) { + print(e.stack.replace(/\\/g, '/')); +} + diff --git a/nashorn/test/script/basic/JDK-8030182_2.js.EXPECTED b/nashorn/test/script/basic/JDK-8030182_2.js.EXPECTED new file mode 100644 index 00000000000..772e504d917 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8030182_2.js.EXPECTED @@ -0,0 +1,3 @@ +ReferenceError: "g" is not defined + at <program> (test/script/basic/JDK-8030182_2.js#42:4<eval>@0:-1) + at <program> (test/script/basic/JDK-8030182_2.js:42) diff --git a/langtools/test/tools/javac/varargs/warning/Warn1.java b/nashorn/test/script/basic/JDK-8030809.js similarity index 71% rename from langtools/test/tools/javac/varargs/warning/Warn1.java rename to nashorn/test/script/basic/JDK-8030809.js index 8ffaabfbe11..01c7687c08a 100644 --- a/langtools/test/tools/javac/varargs/warning/Warn1.java +++ b/nashorn/test/script/basic/JDK-8030809.js @@ -1,42 +1,41 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. - * + * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). - * + * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * + * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ -/* - * @test - * @bug 5035307 - * @summary fixed-arity warning given too often - * @author gafter +/** + * JDK-8030809: Anonymous functions should not be shown with internal names in script stack trace * - * @compile -Werror -source 1.4 -Xlint:-options Warn1.java + * @test + * @run */ -package varargs.warning.warn1; - -import java.util.List; -import java.util.Arrays; - -class Warn1 { - void f(String[] args) { - List l = java.util.Arrays.asList(args); - } +function func() { + (function() { + throw new Error(); + })(); +} + +try { + func(); +} catch (e) { + print(e.stack.replace(/\\/g, '/')); } diff --git a/nashorn/test/script/basic/JDK-8030809.js.EXPECTED b/nashorn/test/script/basic/JDK-8030809.js.EXPECTED new file mode 100644 index 00000000000..6d2ee69b12a --- /dev/null +++ b/nashorn/test/script/basic/JDK-8030809.js.EXPECTED @@ -0,0 +1,4 @@ +Error + at <anonymous> (test/script/basic/JDK-8030809.js:33) + at func (test/script/basic/JDK-8030809.js:32) + at <program> (test/script/basic/JDK-8030809.js:38) diff --git a/langtools/test/tools/doclint/tool/AAA.java b/nashorn/test/script/basic/JDK-8031317.js similarity index 74% rename from langtools/test/tools/doclint/tool/AAA.java rename to nashorn/test/script/basic/JDK-8031317.js index 3880733edc9..240a63377a4 100644 --- a/langtools/test/tools/doclint/tool/AAA.java +++ b/nashorn/test/script/basic/JDK-8031317.js @@ -1,35 +1,41 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. - * + * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). - * + * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * + * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** + * JDK-8031317: SyntaxError when property setter has no parameter + * * @test - * @bug 8006728 - * @summary temporarily workaround jtreg problems for doclint tests in othervm + * @run */ -// dummy test/class to be compiled before other tests in this directory -// see JDK-8006730 -public class AAA { - public static void main(String... args) { } +var obj = { + get toto() { + print("in getter for 'toto'"); + }, + set toto() { + print("in setter for 'toto'"); + } } +obj.toto; +obj.toto = 344; diff --git a/nashorn/test/script/basic/JDK-8031317.js.EXPECTED b/nashorn/test/script/basic/JDK-8031317.js.EXPECTED new file mode 100644 index 00000000000..dda72eae985 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8031317.js.EXPECTED @@ -0,0 +1,2 @@ +in getter for 'toto' +in setter for 'toto' diff --git a/nashorn/test/script/basic/JDK-8031359.js b/nashorn/test/script/basic/JDK-8031359.js new file mode 100644 index 00000000000..278fd7d2f32 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8031359.js @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2010, 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8031359: Invocable.getInterface() works incorrectly if interface has default methods + * + * @test + * @run + */ + +var func = new java.util.function.Function() { + apply: function(arg) { + print("func called with " + arg); + return arg.toUpperCase(); + } +}; + +// Function.andThen is a default method +func.andThen(func)("hello"); + +// Function.compose is another default method +func.compose(new java.util.function.Function() { + apply: function(arg) { + print("compose called with " + arg); + return arg.charAt(0); + } +})("hello"); + +var func2 = new java.util.function.Function() { + apply: function(arg) { + print("I am func2: " + arg); + return arg; + }, + + andThen: function(func) { + print("This is my andThen!"); + return func; + } +}; + +func2.apply("hello"); +func2.andThen(func); diff --git a/nashorn/test/script/basic/JDK-8031359.js.EXPECTED b/nashorn/test/script/basic/JDK-8031359.js.EXPECTED new file mode 100644 index 00000000000..3fb72f1bc33 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8031359.js.EXPECTED @@ -0,0 +1,6 @@ +func called with hello +func called with HELLO +compose called with hello +func called with h +I am func2: hello +This is my andThen! diff --git a/langtools/test/tools/javac/Source5.java b/nashorn/test/script/basic/JDK-8031715.js similarity index 65% rename from langtools/test/tools/javac/Source5.java rename to nashorn/test/script/basic/JDK-8031715.js index 0b35c4cb651..19994f51f58 100644 --- a/langtools/test/tools/javac/Source5.java +++ b/nashorn/test/script/basic/JDK-8031715.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,19 +21,29 @@ * questions. */ -/* +/** + * JDK-8031715: Indexed access to java package not working * @test - * @bug 5044157 - * @summary please accept -source 5 and -target 5 - * @author Peter von der Ahé - * - * @compile -source 5 -target 5 -encoding iso-8859-1 Source5.java - * @run main Source5 + * @run */ -public enum Source5 { - JDK5; - public static void main(String[] args) { - System.out.println("Hello, world!"); - } -} +print(java["net"]); +print(java["net"]["URL"]); +print(java["net"].URL); +print(java.net["URL"]); + +var is = "InputStream"; +var io = "io"; + +print(java.io[is]); +print(java[io]); +print(java[io][is]); + +var ji = new JavaImporter(java.util, java.io); +print(ji["InputStream"]); +print(ji['Vector']); + +var hash = "Hashtable"; +var printStream = "PrintStream"; +print(ji[hash]); +print(ji[printStream]); diff --git a/nashorn/test/script/basic/JDK-8031715.js.EXPECTED b/nashorn/test/script/basic/JDK-8031715.js.EXPECTED new file mode 100644 index 00000000000..1a71de34110 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8031715.js.EXPECTED @@ -0,0 +1,11 @@ +[JavaPackage java.net] +[JavaClass java.net.URL] +[JavaClass java.net.URL] +[JavaClass java.net.URL] +[JavaClass java.io.InputStream] +[JavaPackage java.io] +[JavaClass java.io.InputStream] +[JavaClass java.io.InputStream] +[JavaClass java.util.Vector] +[JavaClass java.util.Hashtable] +[JavaClass java.io.PrintStream] diff --git a/nashorn/test/script/basic/JDK-8031983.js b/nashorn/test/script/basic/JDK-8031983.js new file mode 100644 index 00000000000..f0bfca13164 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8031983.js @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8031983: Error objects should capture stack at the constructor + * + * @test + * @run + */ + +var e = new Error(); +print("hello"); + +try { + throw e; +} catch (e) { + print(e.lineNumber); + print(e.stack.replace(/\\/g, '/')); +} + +Error.captureStackTrace(e); +try { + throw e; +} catch (e) { + print(e.lineNumber); + print(e.stack.replace(/\\/g, '/')); +} + +var obj = {}; +Error.captureStackTrace(obj); +try { + throw obj; +} catch (e) { + print(e.stack.replace(/\\/g, '/')); +} diff --git a/nashorn/test/script/basic/JDK-8031983.js.EXPECTED b/nashorn/test/script/basic/JDK-8031983.js.EXPECTED new file mode 100644 index 00000000000..9d62db31954 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8031983.js.EXPECTED @@ -0,0 +1,9 @@ +hello +35 +Error + at <program> (test/script/basic/JDK-8031983.js:31) +43 +Error + at <program> (test/script/basic/JDK-8031983.js:41) +[object Object] + at <program> (test/script/basic/JDK-8031983.js:50) diff --git a/nashorn/test/script/basic/JDK-8032004.js b/nashorn/test/script/basic/JDK-8032004.js new file mode 100644 index 00000000000..2995566c50a --- /dev/null +++ b/nashorn/test/script/basic/JDK-8032004.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8032004: instance property "message" of Error objects should be non-enumerable + * + * @test + * @run + */ + +function check(obj) { + if (obj.propertyIsEnumerable("message")) { + fail(obj.name + " object's message property is enumerable!"); + } +} + +check(new Error("test")); +check(new EvalError("test")); +check(new RangeError("test")); +check(new ReferenceError("test")); +check(new SyntaxError("test")); +check(new TypeError("test")); +check(new URIError("test")); diff --git a/nashorn/test/script/basic/JDK-8032068.js b/nashorn/test/script/basic/JDK-8032068.js new file mode 100644 index 00000000000..570789d737d --- /dev/null +++ b/nashorn/test/script/basic/JDK-8032068.js @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8032068: implement @sourceURL and #sourceURL directives. + * + * @test + * @run + */ + + +try { + Function("throw new Error();\n//# sourceURL=foo.js")(); +} catch (e) { + print(e.stack.replace(/\\/g, '/')); +} + +try { + eval("function g() { throw Error('x');\n } g();\n//# sourceURL=bar.js"); +} catch (e) { + print(e.stack.replace(/\\/g, '/')); +} + +// check @sourceURL for compatibility +try { + Function("throw new Error();\n//@ sourceURL=foo2.js")(); +} catch (e) { + print(e.stack.replace(/\\/g, '/')); +} + +try { + eval("function g() { throw Error('x');\n } g();\n//@ sourceURL=bar2.js"); +} catch (e) { + print(e.stack.replace(/\\/g, '/')); +} + diff --git a/nashorn/test/script/basic/JDK-8032068.js.EXPECTED b/nashorn/test/script/basic/JDK-8032068.js.EXPECTED new file mode 100644 index 00000000000..b8891eee077 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8032068.js.EXPECTED @@ -0,0 +1,14 @@ +Error + at <anonymous> (foo.js:2) + at <program> (test/script/basic/JDK-8032068.js:33) +Error: x + at g (bar.js:1) + at <program> (bar.js:2) + at <program> (test/script/basic/JDK-8032068.js:39) +Error + at <anonymous> (foo2.js:2) + at <program> (test/script/basic/JDK-8032068.js:46) +Error: x + at g (bar2.js:1) + at <program> (bar2.js:2) + at <program> (test/script/basic/JDK-8032068.js:52) diff --git a/nashorn/test/script/basic/NASHORN-111.js.EXPECTED b/nashorn/test/script/basic/NASHORN-111.js.EXPECTED index 287f25580c4..0967ef424bc 100644 --- a/nashorn/test/script/basic/NASHORN-111.js.EXPECTED +++ b/nashorn/test/script/basic/NASHORN-111.js.EXPECTED @@ -1 +1 @@ -{"message":"type error"} +{} diff --git a/nashorn/test/script/basic/NASHORN-441.js.EXPECTED b/nashorn/test/script/basic/NASHORN-441.js.EXPECTED index de9ea224be4..c0038426b2b 100644 --- a/nashorn/test/script/basic/NASHORN-441.js.EXPECTED +++ b/nashorn/test/script/basic/NASHORN-441.js.EXPECTED @@ -12,6 +12,6 @@ finally 4 try 5 rethrow 5 finally 5 -Error: try 5 thrown in line 71 +Error: try 5 thrown in line 74 try 6 finally 6 diff --git a/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED b/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED index 153524c70b4..9e4920dcfbf 100644 --- a/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED +++ b/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED @@ -1,13 +1,14 @@ -Compiled OK: box2d -Compiled OK: code-load -Compiled OK: crypto -Compiled OK: deltablue -Compiled OK: earley-boyer -Compiled OK: gbemu -Compiled OK: mandreel -Compiled OK: navier-stokes -Compiled OK: pdfjs -Compiled OK: raytrace -Compiled OK: regexp -Compiled OK: richards -Compiled OK: splay +[box2d] Compiled OK +[code-load] Compiled OK +[crypto] Compiled OK +[deltablue] Compiled OK +[earley-boyer] Compiled OK +[gbemu] Compiled OK +[mandreel] Compiled OK +[navier-stokes] Compiled OK +[pdfjs] Compiled OK +[raytrace] Compiled OK +[regexp] Compiled OK +[richards] Compiled OK +[splay] Compiled OK +[typescript] Compiled OK diff --git a/nashorn/test/script/basic/compile-octane.js.EXPECTED b/nashorn/test/script/basic/compile-octane.js.EXPECTED index 153524c70b4..9e4920dcfbf 100644 --- a/nashorn/test/script/basic/compile-octane.js.EXPECTED +++ b/nashorn/test/script/basic/compile-octane.js.EXPECTED @@ -1,13 +1,14 @@ -Compiled OK: box2d -Compiled OK: code-load -Compiled OK: crypto -Compiled OK: deltablue -Compiled OK: earley-boyer -Compiled OK: gbemu -Compiled OK: mandreel -Compiled OK: navier-stokes -Compiled OK: pdfjs -Compiled OK: raytrace -Compiled OK: regexp -Compiled OK: richards -Compiled OK: splay +[box2d] Compiled OK +[code-load] Compiled OK +[crypto] Compiled OK +[deltablue] Compiled OK +[earley-boyer] Compiled OK +[gbemu] Compiled OK +[mandreel] Compiled OK +[navier-stokes] Compiled OK +[pdfjs] Compiled OK +[raytrace] Compiled OK +[regexp] Compiled OK +[richards] Compiled OK +[splay] Compiled OK +[typescript] Compiled OK diff --git a/nashorn/test/script/basic/run-octane.js b/nashorn/test/script/basic/run-octane.js index b730040e4c5..840f07b743f 100644 --- a/nashorn/test/script/basic/run-octane.js +++ b/nashorn/test/script/basic/run-octane.js @@ -26,19 +26,22 @@ */ var tests = [ - {file:"box2d",suite:"Box2DBenchmark"}, - {file:"code-load",suite:"CodeLoad"}, - {file:"crypto",suite:"Crypto"}, - {file:"deltablue",suite:"DeltaBlue"}, - {file:"earley-boyer", suite:"EarleyBoyer"}, - {file:"gbemu", suite:"GameboyBenchmark"}, - {file:"mandreel", suite:"MandreelBenchmark"}, - {file:"navier-stokes", suite:"NavierStokes"}, - {file:"pdfjs", suite:"PdfJS"}, - {file:"raytrace", suite:"RayTrace"}, - {file:"regexp", suite:"RegExpSuite"}, - {file:"richards", suite:"Richards"}, - {file:"splay", suite:"Splay"} + {name:"box2d", files:["box2d.js"], suite:"Box2DBenchmark"}, + {name:"code-load", files:["code-load.js"], suite:"CodeLoad"}, + {name:"crypto", files:["crypto.js"], suite:"Crypto"}, + {name:"deltablue", files:["deltablue.js"], suite:"DeltaBlue"}, + {name:"earley-boyer", files:["earley-boyer.js"], suite:"EarleyBoyer"}, + {name:"gbemu", files:["gbemu-part1.js", "gbemu-part2.js"], suite:"GameboyBenchmark"}, + {name:"mandreel", files:["mandreel.js"], suite:"MandreelBenchmark"}, + {name:"navier-stokes", files:["navier-stokes.js"], suite:"NavierStokes"}, + {name:"pdfjs", files:["pdfjs.js"], suite:"PdfJS"}, + {name:"raytrace", files:["raytrace.js"], suite:"RayTrace"}, + {name:"regexp", files:["regexp.js"], suite:"RegExpSuite"}, + {name:"richards", files:["richards.js"], suite:"Richards"}, + {name:"splay", files:["splay.js"], suite:"Splay"}, + {name:"typescript", files:["typescript.js", "typescript-input.js", "typescript-compiler.js"], suite:"typescript"} + //zlib currently disabled - requires read + // {name:"zlib", files:["zlib.js", "zlib-data.js"], suite:"zlib"}, ]; var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__; @@ -58,26 +61,36 @@ function should_compile_only(name) { return (typeof compile_only !== 'undefined') } -function run_one_benchmark(arg, iters) { - var file_name; - var file = (arg.file + ".js").split('/'); +function load_bench(arg) { + + for (var idx = 0; idx < arg.files.length; idx++) { + var f = arg.files[idx]; + var file = f.split('/'); + var file_name = path + file[file.length - 1]; - file_name = path + file[file.length - 1]; - - var compile_and_return = should_compile_only(file_name); - if (compile_and_return) { - if (typeof compile_only === 'undefined') { //for a run, skip compile onlies, don't even compile them - return; + var compile_and_return = should_compile_only(file_name); + if (compile_and_return) { + if (typeof compile_only === 'undefined') { //for a run, skip compile onlies, don't even compile them + return true; + } } + + print_verbose(arg, "loading '" + arg.name + "' [" + f + "]..."); + load(file_name); } - - print_verbose("Loading... " + file_name); - load(file_name); - + if (compile_and_return) { - print_always("Compiled OK: " + arg.file); - return; + print_always(arg, "Compiled OK"); } + return !compile_and_return; + +} + +function run_one_benchmark(arg, iters) { + + if (!load_bench(arg)) { + return; + } var success = true; var current_name; @@ -95,9 +108,13 @@ function run_one_benchmark(arg, iters) { try { for (var x = 0; x < benchmarks.length ; x++) { + //do warmup run + //reset random number generator needed as of octane 9 before each run + BenchmarkSuite.ResetRNG(); benchmarks[x].Setup(); } - print_verbose("Running '" + arg.file + "' for " + iters + " iterations of no less than " + min_time + " seconds (" + runtime + ")"); + BenchmarkSuite.ResetRNG(); + print_verbose(arg, "running '" + arg.name + "' for " + iters + " iterations of no less than " + min_time + " seconds (" + runtime + ")"); var scores = []; @@ -112,6 +129,9 @@ function run_one_benchmark(arg, iters) { do { for (var i = 0; i < len; i++) { benchmarks[i].run(); + //important - no timing here like elapsed = new Date() - start, as in the + //original harness. This will make timing very non-deterministic. + //NOTHING else must live in this loop } ops += len; elapsed = new Date - start; @@ -120,7 +140,7 @@ function run_one_benchmark(arg, iters) { var score = ops / elapsed * 1000 * 60; scores.push(score); var name = it == 0 ? "warmup" : "iteration " + it; - print_verbose("[" + arg.file + "] " + name + " finished " + score.toFixed(0) + " ops/minute"); + print_verbose(arg, name + " finished " + score.toFixed(0) + " ops/minute"); } for (var x = 0; x < benchmarks.length ; x++) { @@ -140,20 +160,20 @@ function run_one_benchmark(arg, iters) { scores = [0]; } - var res = "[" + arg.file + "] " + mean_score.toFixed(0); + var res = mean_score.toFixed(0); if (verbose) { res += " ops/minute (" + min_score.toFixed(0) + "-" + max_score.toFixed(0) + "), warmup=" + scores[0].toFixed(0); } - print_always(res); + print_always(arg, res); } -function print_always(x) { - print(x); +function print_always(arg, x) { + print("[" + arg.name + "] " + x); } -function print_verbose(x) { +function print_verbose(arg, x) { if (verbose) { - print(x); + print_always(arg, x) } } @@ -209,7 +229,7 @@ for (var i = 0; i < args.length; i++) { } else { var found = false; for (j in tests) { - if (tests[j].file === arg) { + if (tests[j].name === arg) { tests_found.push(tests[j]); found = true; break; @@ -221,7 +241,7 @@ for (var i = 0; i < args.length; i++) { if (j != 0) { str += ", "; } - str += "'" + tests[j].file + "'"; + str += "'" + tests[j].name + "'"; } throw str; } diff --git a/langtools/test/tools/doclint/html/AAA.java b/nashorn/test/script/markdown.js similarity index 76% rename from langtools/test/tools/doclint/html/AAA.java rename to nashorn/test/script/markdown.js index 3880733edc9..c2ba57c9b25 100644 --- a/langtools/test/tools/doclint/html/AAA.java +++ b/nashorn/test/script/markdown.js @@ -1,35 +1,38 @@ /* * Copyright (c) 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. - * + * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). - * + * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * + * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** - * @test - * @bug 8006728 - * @summary temporarily workaround jtreg problems for doclint tests in othervm + * Base library for Showdown markdown engine Nashorn testing. + * @subtest + * + * */ -// dummy test/class to be compiled before other tests in this directory -// see JDK-8006730 -public class AAA { - public static void main(String... args) { } +load(__DIR__ + "external/showdown/showdown.js"); +var shdwn = Showdown; +var window = { + Showdown: shdwn } +load(__DIR__ + "external/showdown/table.js"); +var converter = new Showdown.converter({extensions: ['table']}); diff --git a/langtools/test/tools/javac/Capture.java b/nashorn/test/script/markdown/anchors-by-reference.js similarity index 61% rename from langtools/test/tools/javac/Capture.java rename to nashorn/test/script/markdown/anchors-by-reference.js index e2baa883e5e..ea284fcd655 100644 --- a/langtools/test/tools/javac/Capture.java +++ b/nashorn/test/script/markdown/anchors-by-reference.js @@ -1,46 +1,33 @@ /* - * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. - * + * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). - * + * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * + * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ -/* - * @test - * @bug 4441338 4994508 - * @summary Captured variable synthetic parameters should be passed before explicit params. - * @author gafter +/** + * Test for Showdown markdown parser work with Nashorn. * - * @compile -source 1.4 -target 1.4 Capture.java - * @run main Capture + * @test + * @run */ -public class Capture { - final int k; - Capture(int n) { - k = n; - } - public static void main(String args[]) { - final int j; - int k1 = new Capture(2 + (j=3)){ - int get () {return k+j;} - }.get(); - if (k1 != 8) throw new Error("k1 = " + k1); - } -} +var input = "\nThis is [an example][id] reference-style link.\nThis is [another] [foo] reference-style link.\nThis is [a third][bar] reference-style link.\nThis is [a fourth][4] reference-style link.\n\n [id]: http://example.com/ \"Optional Title Here\"\n [foo]: http://example.com/ (Optional Title Here)\n [bar]: http://example.com/ (Optional Title Here)\n [4]: <http://example.com/>\n \"Optional Title Here\""; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/anchors-by-reference.js.EXPECTED b/nashorn/test/script/markdown/anchors-by-reference.js.EXPECTED new file mode 100644 index 00000000000..6115d50e302 --- /dev/null +++ b/nashorn/test/script/markdown/anchors-by-reference.js.EXPECTED @@ -0,0 +1,4 @@ +<p>This is <a href="http://example.com/" title="Optional Title Here">an example</a> reference-style link. +This is <a href="http://example.com/" title="Optional Title Here">another</a> reference-style link. +This is <a href="http://example.com/" title="Optional Title Here">a third</a> reference-style link. +This is <a href="http://example.com/" title="Optional Title Here">a fourth</a> reference-style link.</p> diff --git a/nashorn/test/script/markdown/automatic-anchors.js b/nashorn/test/script/markdown/automatic-anchors.js new file mode 100644 index 00000000000..d34ce77f317 --- /dev/null +++ b/nashorn/test/script/markdown/automatic-anchors.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n<http://example.com/>"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/automatic-anchors.js.EXPECTED b/nashorn/test/script/markdown/automatic-anchors.js.EXPECTED new file mode 100644 index 00000000000..6de71a9d275 --- /dev/null +++ b/nashorn/test/script/markdown/automatic-anchors.js.EXPECTED @@ -0,0 +1 @@ +<p><a href="http://example.com/">http://example.com/</a></p> diff --git a/nashorn/test/script/markdown/blockquote-nested-markdown.js b/nashorn/test/script/markdown/blockquote-nested-markdown.js new file mode 100644 index 00000000000..818ea0f32dc --- /dev/null +++ b/nashorn/test/script/markdown/blockquote-nested-markdown.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "> ## This is a header.\n>\n> 1. This is the first list item.\n> 2. This is the second list item.\n>\n> Here's some example code:\n>\n> return shell_exec(\"echo $input | $markdown_script\");"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/blockquote-nested-markdown.js.EXPECTED b/nashorn/test/script/markdown/blockquote-nested-markdown.js.EXPECTED new file mode 100644 index 00000000000..b32199cead1 --- /dev/null +++ b/nashorn/test/script/markdown/blockquote-nested-markdown.js.EXPECTED @@ -0,0 +1,13 @@ +<blockquote> + <h2 id="thisisaheader">This is a header.</h2> + + <ol> + <li>This is the first list item.</li> + <li>This is the second list item.</li> + </ol> + + <p>Here's some example code:</p> + +<pre><code>return shell_exec("echo $input | $markdown_script"); +</code></pre> +</blockquote> diff --git a/nashorn/test/script/markdown/blockquote.js b/nashorn/test/script/markdown/blockquote.js new file mode 100644 index 00000000000..7167a911a05 --- /dev/null +++ b/nashorn/test/script/markdown/blockquote.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = " \n > This is a multi line blockquote test\n >\n > With more than one line."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/blockquote.js.EXPECTED b/nashorn/test/script/markdown/blockquote.js.EXPECTED new file mode 100644 index 00000000000..c4956bbe5cf --- /dev/null +++ b/nashorn/test/script/markdown/blockquote.js.EXPECTED @@ -0,0 +1,5 @@ +<blockquote> + <p>This is a multi line blockquote test</p> + + <p>With more than one line.</p> +</blockquote> diff --git a/nashorn/test/script/markdown/code-block-html-escape.js b/nashorn/test/script/markdown/code-block-html-escape.js new file mode 100644 index 00000000000..dff9329f38f --- /dev/null +++ b/nashorn/test/script/markdown/code-block-html-escape.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nThis is some HTML:\n\n <h1>Heading</h1>"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/code-block-html-escape.js.EXPECTED b/nashorn/test/script/markdown/code-block-html-escape.js.EXPECTED new file mode 100644 index 00000000000..028f874db70 --- /dev/null +++ b/nashorn/test/script/markdown/code-block-html-escape.js.EXPECTED @@ -0,0 +1,4 @@ +<p>This is some HTML:</p> + +<pre><code><h1>Heading</h1> +</code></pre> diff --git a/nashorn/test/script/markdown/code-block.js b/nashorn/test/script/markdown/code-block.js new file mode 100644 index 00000000000..e4c7413aaf3 --- /dev/null +++ b/nashorn/test/script/markdown/code-block.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nThis is a normal paragraph:\n\n This is a code block."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/code-block.js.EXPECTED b/nashorn/test/script/markdown/code-block.js.EXPECTED new file mode 100644 index 00000000000..3e56099735f --- /dev/null +++ b/nashorn/test/script/markdown/code-block.js.EXPECTED @@ -0,0 +1,4 @@ +<p>This is a normal paragraph:</p> + +<pre><code>This is a code block. +</code></pre> diff --git a/nashorn/test/script/markdown/doubline-list.js b/nashorn/test/script/markdown/doubline-list.js new file mode 100644 index 00000000000..4a5736c9472 --- /dev/null +++ b/nashorn/test/script/markdown/doubline-list.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n * Bird\n\n * Magic"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/doubline-list.js.EXPECTED b/nashorn/test/script/markdown/doubline-list.js.EXPECTED new file mode 100644 index 00000000000..1065a44547e --- /dev/null +++ b/nashorn/test/script/markdown/doubline-list.js.EXPECTED @@ -0,0 +1,4 @@ +<ul> +<li><p>Bird</p></li> +<li><p>Magic</p></li> +</ul> diff --git a/nashorn/test/script/markdown/emphasis.js b/nashorn/test/script/markdown/emphasis.js new file mode 100644 index 00000000000..b9db46cdda4 --- /dev/null +++ b/nashorn/test/script/markdown/emphasis.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n*important*\n\n_important_\n\nthis mid*important*sentence"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/emphasis.js.EXPECTED b/nashorn/test/script/markdown/emphasis.js.EXPECTED new file mode 100644 index 00000000000..a1fda4ab651 --- /dev/null +++ b/nashorn/test/script/markdown/emphasis.js.EXPECTED @@ -0,0 +1,5 @@ +<p><em>important</em></p> + +<p><em>important</em></p> + +<p>this mid<em>important</em>sentence</p> diff --git a/nashorn/test/script/markdown/escaped-number-period.js b/nashorn/test/script/markdown/escaped-number-period.js new file mode 100644 index 00000000000..5f477449af1 --- /dev/null +++ b/nashorn/test/script/markdown/escaped-number-period.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "It happened in 1986\. What a great season."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/escaped-number-period.js.EXPECTED b/nashorn/test/script/markdown/escaped-number-period.js.EXPECTED new file mode 100644 index 00000000000..0ea83bac1bd --- /dev/null +++ b/nashorn/test/script/markdown/escaped-number-period.js.EXPECTED @@ -0,0 +1 @@ +<p>It happened in 1986. What a great season.</p> diff --git a/nashorn/test/script/markdown/escaping.js b/nashorn/test/script/markdown/escaping.js new file mode 100644 index 00000000000..077df7ecfcb --- /dev/null +++ b/nashorn/test/script/markdown/escaping.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nThese should all be escaped:\n\n\\\n\n\`\n\n\*\n\n\_\n\n\{\n\n\}\n\n\[\n\n\]\n\n\(\n\n\)\n\n\#\n\n\+\n\n\-\n\n\.\n\n\!"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/escaping.js.EXPECTED b/nashorn/test/script/markdown/escaping.js.EXPECTED new file mode 100644 index 00000000000..1ac6a291997 --- /dev/null +++ b/nashorn/test/script/markdown/escaping.js.EXPECTED @@ -0,0 +1,31 @@ +<p>These should all be escaped:</p> + +<p>\</p> + +<p>`</p> + +<p>*</p> + +<p>_</p> + +<p>{</p> + +<p>}</p> + +<p>[</p> + +<p>]</p> + +<p>(</p> + +<p>)</p> + +<p>#</p> + +<p>+</p> + +<p>-</p> + +<p>.</p> + +<p>!</p> diff --git a/nashorn/test/script/markdown/github-style-at-start.js b/nashorn/test/script/markdown/github-style-at-start.js new file mode 100644 index 00000000000..0a99bec2b51 --- /dev/null +++ b/nashorn/test/script/markdown/github-style-at-start.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "```\nfunction MyFunc(a) {\n // ...\n}\n```\n\nThat is some code!"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/github-style-at-start.js.EXPECTED b/nashorn/test/script/markdown/github-style-at-start.js.EXPECTED new file mode 100644 index 00000000000..4f119a7697a --- /dev/null +++ b/nashorn/test/script/markdown/github-style-at-start.js.EXPECTED @@ -0,0 +1,6 @@ +<pre><code>function MyFunc(a) { + // ... +} +</code></pre> + +<p>That is some code!</p> diff --git a/nashorn/test/script/markdown/github-style-codeblock.js b/nashorn/test/script/markdown/github-style-codeblock.js new file mode 100644 index 00000000000..32341892605 --- /dev/null +++ b/nashorn/test/script/markdown/github-style-codeblock.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nDefine a function in javascript:\n\n```\nfunction MyFunc(a) {\n var s = '`';\n}\n```\n\nAnd some HTML\n\n```html\n<div>HTML!</div>\n```"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/github-style-codeblock.js.EXPECTED b/nashorn/test/script/markdown/github-style-codeblock.js.EXPECTED new file mode 100644 index 00000000000..5daca2f94ae --- /dev/null +++ b/nashorn/test/script/markdown/github-style-codeblock.js.EXPECTED @@ -0,0 +1,11 @@ +<p>Define a function in javascript:</p> + +<pre><code>function MyFunc(a) { + var s = '`'; +} +</code></pre> + +<p>And some HTML</p> + +<pre><code class="html"><div>HTML!</div> +</code></pre> diff --git a/nashorn/test/script/markdown/github-style-linebreaks.js b/nashorn/test/script/markdown/github-style-linebreaks.js new file mode 100644 index 00000000000..c912bee06f9 --- /dev/null +++ b/nashorn/test/script/markdown/github-style-linebreaks.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "```\ncode can go here\nthis is rendered on a second line\n```"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/github-style-linebreaks.js.EXPECTED b/nashorn/test/script/markdown/github-style-linebreaks.js.EXPECTED new file mode 100644 index 00000000000..276dbf03cb8 --- /dev/null +++ b/nashorn/test/script/markdown/github-style-linebreaks.js.EXPECTED @@ -0,0 +1,3 @@ +<pre><code>code can go here +this is rendered on a second line +</code></pre> diff --git a/nashorn/test/script/markdown/h1-with-double-hash.js b/nashorn/test/script/markdown/h1-with-double-hash.js new file mode 100644 index 00000000000..bd965702922 --- /dev/null +++ b/nashorn/test/script/markdown/h1-with-double-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "# This is an H1 #"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h1-with-double-hash.js.EXPECTED b/nashorn/test/script/markdown/h1-with-double-hash.js.EXPECTED new file mode 100644 index 00000000000..ab5b5555dd5 --- /dev/null +++ b/nashorn/test/script/markdown/h1-with-double-hash.js.EXPECTED @@ -0,0 +1 @@ +<h1 id="thisisanh1">This is an H1</h1> diff --git a/nashorn/test/script/markdown/h1-with-equals.js b/nashorn/test/script/markdown/h1-with-equals.js new file mode 100644 index 00000000000..54ee9628f50 --- /dev/null +++ b/nashorn/test/script/markdown/h1-with-equals.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "This is an H1\n============="; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h1-with-equals.js.EXPECTED b/nashorn/test/script/markdown/h1-with-equals.js.EXPECTED new file mode 100644 index 00000000000..ab5b5555dd5 --- /dev/null +++ b/nashorn/test/script/markdown/h1-with-equals.js.EXPECTED @@ -0,0 +1 @@ +<h1 id="thisisanh1">This is an H1</h1> diff --git a/nashorn/test/script/markdown/h1-with-single-hash.js b/nashorn/test/script/markdown/h1-with-single-hash.js new file mode 100644 index 00000000000..3559c22f615 --- /dev/null +++ b/nashorn/test/script/markdown/h1-with-single-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "# This is an H1"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h1-with-single-hash.js.EXPECTED b/nashorn/test/script/markdown/h1-with-single-hash.js.EXPECTED new file mode 100644 index 00000000000..ab5b5555dd5 --- /dev/null +++ b/nashorn/test/script/markdown/h1-with-single-hash.js.EXPECTED @@ -0,0 +1 @@ +<h1 id="thisisanh1">This is an H1</h1> diff --git a/nashorn/test/script/markdown/h2-with-dashes.js b/nashorn/test/script/markdown/h2-with-dashes.js new file mode 100644 index 00000000000..016502f60d4 --- /dev/null +++ b/nashorn/test/script/markdown/h2-with-dashes.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "This is an H2\n-------------"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h2-with-dashes.js.EXPECTED b/nashorn/test/script/markdown/h2-with-dashes.js.EXPECTED new file mode 100644 index 00000000000..375a0d06ba8 --- /dev/null +++ b/nashorn/test/script/markdown/h2-with-dashes.js.EXPECTED @@ -0,0 +1 @@ +<h2 id="thisisanh2">This is an H2</h2> diff --git a/nashorn/test/script/markdown/h2-with-double-hash.js b/nashorn/test/script/markdown/h2-with-double-hash.js new file mode 100644 index 00000000000..246c1701f5d --- /dev/null +++ b/nashorn/test/script/markdown/h2-with-double-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "## This is an H2 ##"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h2-with-double-hash.js.EXPECTED b/nashorn/test/script/markdown/h2-with-double-hash.js.EXPECTED new file mode 100644 index 00000000000..375a0d06ba8 --- /dev/null +++ b/nashorn/test/script/markdown/h2-with-double-hash.js.EXPECTED @@ -0,0 +1 @@ +<h2 id="thisisanh2">This is an H2</h2> diff --git a/nashorn/test/script/markdown/h2-with-single-hash.js b/nashorn/test/script/markdown/h2-with-single-hash.js new file mode 100644 index 00000000000..d1f7f000c44 --- /dev/null +++ b/nashorn/test/script/markdown/h2-with-single-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "## This is an H2"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h2-with-single-hash.js.EXPECTED b/nashorn/test/script/markdown/h2-with-single-hash.js.EXPECTED new file mode 100644 index 00000000000..375a0d06ba8 --- /dev/null +++ b/nashorn/test/script/markdown/h2-with-single-hash.js.EXPECTED @@ -0,0 +1 @@ +<h2 id="thisisanh2">This is an H2</h2> diff --git a/nashorn/test/script/markdown/h3-with-double-hash.js b/nashorn/test/script/markdown/h3-with-double-hash.js new file mode 100644 index 00000000000..e60e00988cb --- /dev/null +++ b/nashorn/test/script/markdown/h3-with-double-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "### This is an H3 ###"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h3-with-double-hash.js.EXPECTED b/nashorn/test/script/markdown/h3-with-double-hash.js.EXPECTED new file mode 100644 index 00000000000..13f8c9e7a59 --- /dev/null +++ b/nashorn/test/script/markdown/h3-with-double-hash.js.EXPECTED @@ -0,0 +1 @@ +<h3 id="thisisanh3">This is an H3</h3> diff --git a/nashorn/test/script/markdown/h3-with-single-hash.js b/nashorn/test/script/markdown/h3-with-single-hash.js new file mode 100644 index 00000000000..6af497079d0 --- /dev/null +++ b/nashorn/test/script/markdown/h3-with-single-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "### This is an H3"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h3-with-single-hash.js.EXPECTED b/nashorn/test/script/markdown/h3-with-single-hash.js.EXPECTED new file mode 100644 index 00000000000..13f8c9e7a59 --- /dev/null +++ b/nashorn/test/script/markdown/h3-with-single-hash.js.EXPECTED @@ -0,0 +1 @@ +<h3 id="thisisanh3">This is an H3</h3> diff --git a/nashorn/test/script/markdown/h4-with-single-hash.js b/nashorn/test/script/markdown/h4-with-single-hash.js new file mode 100644 index 00000000000..01bc08e0a58 --- /dev/null +++ b/nashorn/test/script/markdown/h4-with-single-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "#### This is an H4"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h4-with-single-hash.js.EXPECTED b/nashorn/test/script/markdown/h4-with-single-hash.js.EXPECTED new file mode 100644 index 00000000000..165b4ef2f46 --- /dev/null +++ b/nashorn/test/script/markdown/h4-with-single-hash.js.EXPECTED @@ -0,0 +1 @@ +<h4 id="thisisanh4">This is an H4</h4> diff --git a/nashorn/test/script/markdown/h5-with-single-hash.js b/nashorn/test/script/markdown/h5-with-single-hash.js new file mode 100644 index 00000000000..5fe8638bf8b --- /dev/null +++ b/nashorn/test/script/markdown/h5-with-single-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "##### This is an H5"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h5-with-single-hash.js.EXPECTED b/nashorn/test/script/markdown/h5-with-single-hash.js.EXPECTED new file mode 100644 index 00000000000..28eac14834e --- /dev/null +++ b/nashorn/test/script/markdown/h5-with-single-hash.js.EXPECTED @@ -0,0 +1 @@ +<h5 id="thisisanh5">This is an H5</h5> diff --git a/nashorn/test/script/markdown/h6-with-single-hash.js b/nashorn/test/script/markdown/h6-with-single-hash.js new file mode 100644 index 00000000000..b1f20f5c8fe --- /dev/null +++ b/nashorn/test/script/markdown/h6-with-single-hash.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "###### This is an H6"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/h6-with-single-hash.js.EXPECTED b/nashorn/test/script/markdown/h6-with-single-hash.js.EXPECTED new file mode 100644 index 00000000000..47574cc5b92 --- /dev/null +++ b/nashorn/test/script/markdown/h6-with-single-hash.js.EXPECTED @@ -0,0 +1 @@ +<h6 id="thisisanh6">This is an H6</h6> diff --git a/nashorn/test/script/markdown/horizontal-rules.js b/nashorn/test/script/markdown/horizontal-rules.js new file mode 100644 index 00000000000..af2cabb91a2 --- /dev/null +++ b/nashorn/test/script/markdown/horizontal-rules.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n* * *\n\n***\n\n*****\n\n- - -\n\n---------------------------------------\n"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/horizontal-rules.js.EXPECTED b/nashorn/test/script/markdown/horizontal-rules.js.EXPECTED new file mode 100644 index 00000000000..aaef23eb8bb --- /dev/null +++ b/nashorn/test/script/markdown/horizontal-rules.js.EXPECTED @@ -0,0 +1,9 @@ +<hr /> + +<hr /> + +<hr /> + +<hr /> + +<hr /> diff --git a/nashorn/test/script/markdown/html5-strutural-tags.js b/nashorn/test/script/markdown/html5-strutural-tags.js new file mode 100644 index 00000000000..3bc4aad54bf --- /dev/null +++ b/nashorn/test/script/markdown/html5-strutural-tags.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nThese HTML5 tags should pass through just fine.\n\n<section>hello</section>\n<header>head</header>\n<footer>footsies</footer>\n<nav>navigation</nav>\n<article>read me</article>\n<aside>ignore me</aside>\n<article>read\nme</article>\n<aside>\nignore me\n</aside>\n\nthe end"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/html5-strutural-tags.js.EXPECTED b/nashorn/test/script/markdown/html5-strutural-tags.js.EXPECTED new file mode 100644 index 00000000000..528731f56ef --- /dev/null +++ b/nashorn/test/script/markdown/html5-strutural-tags.js.EXPECTED @@ -0,0 +1,22 @@ +<p>These HTML5 tags should pass through just fine.</p> + +<section>hello</section> + +<header>head</header> + +<footer>footsies</footer> + +<nav>navigation</nav> + +<article>read me</article> + +<aside>ignore me</aside> + +<article>read +me</article> + +<aside> +ignore me +</aside> + +<p>the end</p> diff --git a/nashorn/test/script/markdown/images.js b/nashorn/test/script/markdown/images.js new file mode 100644 index 00000000000..da2a16a29ff --- /dev/null +++ b/nashorn/test/script/markdown/images.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n![Alt text](/path/to/img.jpg)\n\n![Alt text](/path/to/img.jpg \"Optional title\")\n\n![Alt text][id]\n\n [id]: url/to/image \"Optional title attribute\""; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/images.js.EXPECTED b/nashorn/test/script/markdown/images.js.EXPECTED new file mode 100644 index 00000000000..7df585521d9 --- /dev/null +++ b/nashorn/test/script/markdown/images.js.EXPECTED @@ -0,0 +1,5 @@ +<p><img src="/path/to/img.jpg" alt="Alt text" title="" /></p> + +<p><img src="/path/to/img.jpg" alt="Alt text" title="Optional title" /></p> + +<p><img src="url/to/image" alt="Alt text" title="Optional title attribute" /></p> diff --git a/nashorn/test/script/markdown/implicit-anchors.js b/nashorn/test/script/markdown/implicit-anchors.js new file mode 100644 index 00000000000..ba627fb9cb4 --- /dev/null +++ b/nashorn/test/script/markdown/implicit-anchors.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nSearch the web at [Google][] or [Daring Fireball][].\n\n [Google]: http://google.com/\n [Daring Fireball]: http://daringfireball.net/"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/implicit-anchors.js.EXPECTED b/nashorn/test/script/markdown/implicit-anchors.js.EXPECTED new file mode 100644 index 00000000000..01e62d9af84 --- /dev/null +++ b/nashorn/test/script/markdown/implicit-anchors.js.EXPECTED @@ -0,0 +1 @@ +<p>Search the web at <a href="http://google.com/">Google</a> or <a href="http://daringfireball.net/">Daring Fireball</a>.</p> diff --git a/nashorn/test/script/markdown/inline-anchors.js b/nashorn/test/script/markdown/inline-anchors.js new file mode 100644 index 00000000000..90fe181271c --- /dev/null +++ b/nashorn/test/script/markdown/inline-anchors.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nThis is [an example](http://example.com/ \"Title\") inline link.\n\n[This link](http://example.net/) has no title attribute."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/inline-anchors.js.EXPECTED b/nashorn/test/script/markdown/inline-anchors.js.EXPECTED new file mode 100644 index 00000000000..52f90ed319d --- /dev/null +++ b/nashorn/test/script/markdown/inline-anchors.js.EXPECTED @@ -0,0 +1,3 @@ +<p>This is <a href="http://example.com/" title="Title">an example</a> inline link.</p> + +<p><a href="http://example.net/">This link</a> has no title attribute.</p> diff --git a/nashorn/test/script/markdown/inline-code.js b/nashorn/test/script/markdown/inline-code.js new file mode 100644 index 00000000000..6ab4f4f657e --- /dev/null +++ b/nashorn/test/script/markdown/inline-code.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nCreate a new `function`.\n\nUse the backtick in MySQL syntax ``SELECT `column` FROM whatever``.\n\nA single backtick in a code span: `` ` ``\n\nA backtick-delimited string in a code span: `` `foo` ``\n\nPlease don't use any `<blink>` tags.\n\n`—` is the decimal-encoded equivalent of `—`."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/inline-code.js.EXPECTED b/nashorn/test/script/markdown/inline-code.js.EXPECTED new file mode 100644 index 00000000000..ebb7fdc0dca --- /dev/null +++ b/nashorn/test/script/markdown/inline-code.js.EXPECTED @@ -0,0 +1,11 @@ +<p>Create a new <code>function</code>.</p> + +<p>Use the backtick in MySQL syntax <code>SELECT `column` FROM whatever</code>.</p> + +<p>A single backtick in a code span: <code>`</code></p> + +<p>A backtick-delimited string in a code span: <code>`foo`</code></p> + +<p>Please don't use any <code><blink></code> tags.</p> + +<p><code>&#8212;</code> is the decimal-encoded equivalent of <code>&mdash;</code>.</p> diff --git a/nashorn/test/script/markdown/inline-style-tag.js b/nashorn/test/script/markdown/inline-style-tag.js new file mode 100644 index 00000000000..a97ba64a5e5 --- /dev/null +++ b/nashorn/test/script/markdown/inline-style-tag.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n<style>\n p { line-height: 20px; }\n</style>\n\nAn exciting sentence."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/inline-style-tag.js.EXPECTED b/nashorn/test/script/markdown/inline-style-tag.js.EXPECTED new file mode 100644 index 00000000000..1006aa8fac4 --- /dev/null +++ b/nashorn/test/script/markdown/inline-style-tag.js.EXPECTED @@ -0,0 +1,5 @@ +<style> + p { line-height: 20px; } +</style> + +<p>An exciting sentence.</p> diff --git a/nashorn/test/script/markdown/lazy-blockquote.js b/nashorn/test/script/markdown/lazy-blockquote.js new file mode 100644 index 00000000000..274121658f2 --- /dev/null +++ b/nashorn/test/script/markdown/lazy-blockquote.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n > This is a multi line blockquote test\n\n > With more than one line."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/lazy-blockquote.js.EXPECTED b/nashorn/test/script/markdown/lazy-blockquote.js.EXPECTED new file mode 100644 index 00000000000..c4956bbe5cf --- /dev/null +++ b/nashorn/test/script/markdown/lazy-blockquote.js.EXPECTED @@ -0,0 +1,5 @@ +<blockquote> + <p>This is a multi line blockquote test</p> + + <p>With more than one line.</p> +</blockquote> diff --git a/nashorn/test/script/markdown/list-with-blockquote.js b/nashorn/test/script/markdown/list-with-blockquote.js new file mode 100644 index 00000000000..fa0044e616a --- /dev/null +++ b/nashorn/test/script/markdown/list-with-blockquote.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "* A list item with a blockquote:\n\n > This is a blockquote\n > inside a list item."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/list-with-blockquote.js.EXPECTED b/nashorn/test/script/markdown/list-with-blockquote.js.EXPECTED new file mode 100644 index 00000000000..7f18f5c11aa --- /dev/null +++ b/nashorn/test/script/markdown/list-with-blockquote.js.EXPECTED @@ -0,0 +1,8 @@ +<ul> +<li><p>A list item with a blockquote:</p> + +<blockquote> + <p>This is a blockquote + inside a list item.</p> +</blockquote></li> +</ul> diff --git a/nashorn/test/script/markdown/list-with-code.js b/nashorn/test/script/markdown/list-with-code.js new file mode 100644 index 00000000000..61cc1e9befb --- /dev/null +++ b/nashorn/test/script/markdown/list-with-code.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "* A list item with code:\n\n alert('Hello world!');"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/list-with-code.js.EXPECTED b/nashorn/test/script/markdown/list-with-code.js.EXPECTED new file mode 100644 index 00000000000..566fdae96a8 --- /dev/null +++ b/nashorn/test/script/markdown/list-with-code.js.EXPECTED @@ -0,0 +1,6 @@ +<ul> +<li><p>A list item with code:</p> + +<pre><code>alert('Hello world!'); +</code></pre></li> +</ul> diff --git a/nashorn/test/script/markdown/multi-paragraph-list.js b/nashorn/test/script/markdown/multi-paragraph-list.js new file mode 100644 index 00000000000..23ba37319e0 --- /dev/null +++ b/nashorn/test/script/markdown/multi-paragraph-list.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n 1. This is a major bullet point.\n\n That contains multiple paragraphs.\n\n 2. And another line"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/multi-paragraph-list.js.EXPECTED b/nashorn/test/script/markdown/multi-paragraph-list.js.EXPECTED new file mode 100644 index 00000000000..3d751c503f5 --- /dev/null +++ b/nashorn/test/script/markdown/multi-paragraph-list.js.EXPECTED @@ -0,0 +1,6 @@ +<ol> +<li><p>This is a major bullet point.</p> + +<p>That contains multiple paragraphs.</p></li> +<li><p>And another line</p></li> +</ol> diff --git a/nashorn/test/script/markdown/multiline-unordered-list.js b/nashorn/test/script/markdown/multiline-unordered-list.js new file mode 100644 index 00000000000..bb1c2337e4a --- /dev/null +++ b/nashorn/test/script/markdown/multiline-unordered-list.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n - This line spans\n more than one line and is lazy\n - Similar to this line"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/multiline-unordered-list.js.EXPECTED b/nashorn/test/script/markdown/multiline-unordered-list.js.EXPECTED new file mode 100644 index 00000000000..fb2a58e0e7d --- /dev/null +++ b/nashorn/test/script/markdown/multiline-unordered-list.js.EXPECTED @@ -0,0 +1,5 @@ +<ul> +<li>This line spans +more than one line and is lazy</li> +<li>Similar to this line</li> +</ul> diff --git a/nashorn/test/script/markdown/nested-blockquote.js b/nashorn/test/script/markdown/nested-blockquote.js new file mode 100644 index 00000000000..e447494a58e --- /dev/null +++ b/nashorn/test/script/markdown/nested-blockquote.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n > This is a multi line blockquote test\n >\n > > And nesting!\n >\n > With more than one line."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/nested-blockquote.js.EXPECTED b/nashorn/test/script/markdown/nested-blockquote.js.EXPECTED new file mode 100644 index 00000000000..0b004934473 --- /dev/null +++ b/nashorn/test/script/markdown/nested-blockquote.js.EXPECTED @@ -0,0 +1,9 @@ +<blockquote> + <p>This is a multi line blockquote test</p> + + <blockquote> + <p>And nesting!</p> + </blockquote> + + <p>With more than one line.</p> +</blockquote> diff --git a/nashorn/test/script/markdown/ordered-list-same-number.js b/nashorn/test/script/markdown/ordered-list-same-number.js new file mode 100644 index 00000000000..00d05d2ae2a --- /dev/null +++ b/nashorn/test/script/markdown/ordered-list-same-number.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n 1. Red\n 1. Green\n 1. Blue"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/ordered-list-same-number.js.EXPECTED b/nashorn/test/script/markdown/ordered-list-same-number.js.EXPECTED new file mode 100644 index 00000000000..b1abb536d96 --- /dev/null +++ b/nashorn/test/script/markdown/ordered-list-same-number.js.EXPECTED @@ -0,0 +1,5 @@ +<ol> +<li>Red</li> +<li>Green</li> +<li>Blue</li> +</ol> diff --git a/nashorn/test/script/markdown/ordered-list-wrong-numbers.js b/nashorn/test/script/markdown/ordered-list-wrong-numbers.js new file mode 100644 index 00000000000..2592020bbee --- /dev/null +++ b/nashorn/test/script/markdown/ordered-list-wrong-numbers.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n 8. Red\n 1. Green\n 3. Blue"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/ordered-list-wrong-numbers.js.EXPECTED b/nashorn/test/script/markdown/ordered-list-wrong-numbers.js.EXPECTED new file mode 100644 index 00000000000..b1abb536d96 --- /dev/null +++ b/nashorn/test/script/markdown/ordered-list-wrong-numbers.js.EXPECTED @@ -0,0 +1,5 @@ +<ol> +<li>Red</li> +<li>Green</li> +<li>Blue</li> +</ol> diff --git a/nashorn/test/script/markdown/ordered-list.js b/nashorn/test/script/markdown/ordered-list.js new file mode 100644 index 00000000000..d79529f1c06 --- /dev/null +++ b/nashorn/test/script/markdown/ordered-list.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n 1. Red\n 2. Green\n 3. Blue"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/ordered-list.js.EXPECTED b/nashorn/test/script/markdown/ordered-list.js.EXPECTED new file mode 100644 index 00000000000..b1abb536d96 --- /dev/null +++ b/nashorn/test/script/markdown/ordered-list.js.EXPECTED @@ -0,0 +1,5 @@ +<ol> +<li>Red</li> +<li>Green</li> +<li>Blue</li> +</ol> diff --git a/nashorn/test/script/markdown/relative-anchors.js b/nashorn/test/script/markdown/relative-anchors.js new file mode 100644 index 00000000000..7bfe01a6675 --- /dev/null +++ b/nashorn/test/script/markdown/relative-anchors.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nSee my [About](/about/) page for details."; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/relative-anchors.js.EXPECTED b/nashorn/test/script/markdown/relative-anchors.js.EXPECTED new file mode 100644 index 00000000000..6db73dc48c8 --- /dev/null +++ b/nashorn/test/script/markdown/relative-anchors.js.EXPECTED @@ -0,0 +1 @@ +<p>See my <a href="/about/">About</a> page for details.</p> diff --git a/nashorn/test/script/markdown/simple-paragraph.js b/nashorn/test/script/markdown/simple-paragraph.js new file mode 100644 index 00000000000..218918b7de2 --- /dev/null +++ b/nashorn/test/script/markdown/simple-paragraph.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nHello, world!"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/simple-paragraph.js.EXPECTED b/nashorn/test/script/markdown/simple-paragraph.js.EXPECTED new file mode 100644 index 00000000000..7ce535433d8 --- /dev/null +++ b/nashorn/test/script/markdown/simple-paragraph.js.EXPECTED @@ -0,0 +1 @@ +<p>Hello, world!</p> diff --git a/nashorn/test/script/markdown/strong.js b/nashorn/test/script/markdown/strong.js new file mode 100644 index 00000000000..a1778726640 --- /dev/null +++ b/nashorn/test/script/markdown/strong.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n**important**\n\n__important__\n\nreally **freaking**strong"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/strong.js.EXPECTED b/nashorn/test/script/markdown/strong.js.EXPECTED new file mode 100644 index 00000000000..5bcc675613d --- /dev/null +++ b/nashorn/test/script/markdown/strong.js.EXPECTED @@ -0,0 +1,5 @@ +<p><strong>important</strong></p> + +<p><strong>important</strong></p> + +<p>really <strong>freaking</strong>strong</p> diff --git a/nashorn/test/script/markdown/table-basic.js b/nashorn/test/script/markdown/table-basic.js new file mode 100644 index 00000000000..f2b9a3742e5 --- /dev/null +++ b/nashorn/test/script/markdown/table-basic.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "| First Header | Second Header |\n| ------------- | ------------- |\n| Row 1 Cell 1 | Row 1 Cell 2 |\n| Row 2 Cell 1 | Row 2 Cell 2 |\n"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/table-basic.js.EXPECTED b/nashorn/test/script/markdown/table-basic.js.EXPECTED new file mode 100644 index 00000000000..d909e65b45d --- /dev/null +++ b/nashorn/test/script/markdown/table-basic.js.EXPECTED @@ -0,0 +1,21 @@ +<table> +<thead> +<tr> +<th id="first_header" style="text-align:left;"> First Header </th> +<th id="second_header" style="text-align:left;"> Second Header </th> +</tr> +</thead> + +<tbody> +<tr> +<td style="text-align:left;"><p>Row 1 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 1 Cell 2 </p></td> +</tr> + +<tr> +<td style="text-align:left;"><p>Row 2 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 2 Cell 2 </p></td> +</tr> + +</tbody> +</table> diff --git a/nashorn/test/script/markdown/table-large.js b/nashorn/test/script/markdown/table-large.js new file mode 100644 index 00000000000..ad7554d06d4 --- /dev/null +++ b/nashorn/test/script/markdown/table-large.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "| First Header | Second Header | Third Header | Fourth Header |\n| ------------- | ------------- | ------------ | ------------- |\n| Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 | Row 1 Cell 4 |\n| Row 2 Cell 1 | Row 2 Cell 2 | Row 2 Cell 3 | Row 2 Cell 4 |\n| Row 3 Cell 1 | Row 3 Cell 2 | Row 3 Cell 3 | Row 3 Cell 4 |\n| Row 4 Cell 1 | Row 4 Cell 2 | Row 4 Cell 3 | Row 4 Cell 4 |\n| Row 5 Cell 1 | Row 5 Cell 2 | Row 5 Cell 3 | Row 5 Cell 4 |\n"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/table-large.js.EXPECTED b/nashorn/test/script/markdown/table-large.js.EXPECTED new file mode 100644 index 00000000000..332bdab6e85 --- /dev/null +++ b/nashorn/test/script/markdown/table-large.js.EXPECTED @@ -0,0 +1,48 @@ +<table> +<thead> +<tr> +<th id="first_header" style="text-align:left;"> First Header </th> +<th id="second_header" style="text-align:left;"> Second Header </th> +<th id="third_header" style="text-align:left;"> Third Header </th> +<th id="fourth_header" style="text-align:left;"> Fourth Header </th> +</tr> +</thead> + +<tbody> +<tr> +<td style="text-align:left;"><p>Row 1 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 1 Cell 2 </p></td> +<td style="text-align:left;"><p>Row 1 Cell 3 </p></td> +<td style="text-align:left;"><p>Row 1 Cell 4 </p></td> +</tr> + +<tr> +<td style="text-align:left;"><p>Row 2 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 2 Cell 2 </p></td> +<td style="text-align:left;"><p>Row 2 Cell 3 </p></td> +<td style="text-align:left;"><p>Row 2 Cell 4 </p></td> +</tr> + +<tr> +<td style="text-align:left;"><p>Row 3 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 3 Cell 2 </p></td> +<td style="text-align:left;"><p>Row 3 Cell 3 </p></td> +<td style="text-align:left;"><p>Row 3 Cell 4 </p></td> +</tr> + +<tr> +<td style="text-align:left;"><p>Row 4 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 4 Cell 2 </p></td> +<td style="text-align:left;"><p>Row 4 Cell 3 </p></td> +<td style="text-align:left;"><p>Row 4 Cell 4 </p></td> +</tr> + +<tr> +<td style="text-align:left;"><p>Row 5 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 5 Cell 2 </p></td> +<td style="text-align:left;"><p>Row 5 Cell 3 </p></td> +<td style="text-align:left;"><p>Row 5 Cell 4 </p></td> +</tr> + +</tbody> +</table> diff --git a/nashorn/test/script/markdown/table-with-equals.js b/nashorn/test/script/markdown/table-with-equals.js new file mode 100644 index 00000000000..574223956d6 --- /dev/null +++ b/nashorn/test/script/markdown/table-with-equals.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "| First Header | Second Header |\n| ============= | ============= |\n| Row 1 Cell 1 | Row 1 Cell 2 |\n| Row 2 Cell 1 | Row 2 Cell 2 |\n"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/table-with-equals.js.EXPECTED b/nashorn/test/script/markdown/table-with-equals.js.EXPECTED new file mode 100644 index 00000000000..d909e65b45d --- /dev/null +++ b/nashorn/test/script/markdown/table-with-equals.js.EXPECTED @@ -0,0 +1,21 @@ +<table> +<thead> +<tr> +<th id="first_header" style="text-align:left;"> First Header </th> +<th id="second_header" style="text-align:left;"> Second Header </th> +</tr> +</thead> + +<tbody> +<tr> +<td style="text-align:left;"><p>Row 1 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 1 Cell 2 </p></td> +</tr> + +<tr> +<td style="text-align:left;"><p>Row 2 Cell 1 </p></td> +<td style="text-align:left;"><p>Row 2 Cell 2 </p></td> +</tr> + +</tbody> +</table> diff --git a/nashorn/test/script/markdown/unordered-list-asterisk.js b/nashorn/test/script/markdown/unordered-list-asterisk.js new file mode 100644 index 00000000000..8e2c01b10e5 --- /dev/null +++ b/nashorn/test/script/markdown/unordered-list-asterisk.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n * Red\n * Green\n * Blue"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/unordered-list-asterisk.js.EXPECTED b/nashorn/test/script/markdown/unordered-list-asterisk.js.EXPECTED new file mode 100644 index 00000000000..b445990aede --- /dev/null +++ b/nashorn/test/script/markdown/unordered-list-asterisk.js.EXPECTED @@ -0,0 +1,5 @@ +<ul> +<li>Red</li> +<li>Green</li> +<li>Blue</li> +</ul> diff --git a/nashorn/test/script/markdown/unordered-list-minus.js b/nashorn/test/script/markdown/unordered-list-minus.js new file mode 100644 index 00000000000..19bcbac7085 --- /dev/null +++ b/nashorn/test/script/markdown/unordered-list-minus.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n - Red\n - Green\n - Blue"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/unordered-list-minus.js.EXPECTED b/nashorn/test/script/markdown/unordered-list-minus.js.EXPECTED new file mode 100644 index 00000000000..b445990aede --- /dev/null +++ b/nashorn/test/script/markdown/unordered-list-minus.js.EXPECTED @@ -0,0 +1,5 @@ +<ul> +<li>Red</li> +<li>Green</li> +<li>Blue</li> +</ul> diff --git a/nashorn/test/script/markdown/unordered-list-plus.js b/nashorn/test/script/markdown/unordered-list-plus.js new file mode 100644 index 00000000000..55b4dfb8fa9 --- /dev/null +++ b/nashorn/test/script/markdown/unordered-list-plus.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\n + Red\n + Green\n + Blue"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/unordered-list-plus.js.EXPECTED b/nashorn/test/script/markdown/unordered-list-plus.js.EXPECTED new file mode 100644 index 00000000000..b445990aede --- /dev/null +++ b/nashorn/test/script/markdown/unordered-list-plus.js.EXPECTED @@ -0,0 +1,5 @@ +<ul> +<li>Red</li> +<li>Green</li> +<li>Blue</li> +</ul> diff --git a/nashorn/test/script/markdown/url-with-parenthesis.js b/nashorn/test/script/markdown/url-with-parenthesis.js new file mode 100644 index 00000000000..dc6ce740938 --- /dev/null +++ b/nashorn/test/script/markdown/url-with-parenthesis.js @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010, 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test for Showdown markdown parser work with Nashorn. + * + * @test + * @run + */ + +var input = "\nThere's an [episode](http://en.memory-alpha.org/wiki/Darmok_(episode)) of Star Trek: The Next Generation"; +var output = converter.makeHtml(input); +print(output); diff --git a/nashorn/test/script/markdown/url-with-parenthesis.js.EXPECTED b/nashorn/test/script/markdown/url-with-parenthesis.js.EXPECTED new file mode 100644 index 00000000000..9e1e7cc9966 --- /dev/null +++ b/nashorn/test/script/markdown/url-with-parenthesis.js.EXPECTED @@ -0,0 +1 @@ +<p>There's an <a href="http://en.memory-alpha.org/wiki/Darmok_(episode)">episode</a> of Star Trek: The Next Generation</p> diff --git a/nashorn/test/script/sandbox/JDK-8031106.js b/nashorn/test/script/sandbox/JDK-8031106.js new file mode 100644 index 00000000000..d5d83f6927f --- /dev/null +++ b/nashorn/test/script/sandbox/JDK-8031106.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010, 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8031106: Nashorn: IndexOutOfBoundsException in NashornCallSiteDescriptor.getNameToken() + * + * @test + * @run + */ + +var cl = new java.lang.Object().getClass(); +try { + cl["forName"]; + fail("Should have thrown exception!"); +} catch (e) { + if (! (e instanceof java.lang.SecurityException)) { + fail("SecurityException expected, got " + e); + } +} diff --git a/nashorn/test/script/trusted/JDK-8032060.js b/nashorn/test/script/trusted/JDK-8032060.js new file mode 100644 index 00000000000..8cb350cc238 --- /dev/null +++ b/nashorn/test/script/trusted/JDK-8032060.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8032060: PropertyMap of Error objects is not stable + * + * @test + * @option -Dnashorn.debug=true + * @fork + * @run + */ + +function checkMap(e1, e2) { + if (! Debug.identical(Debug.map(e1), Debug.map(e2))) { + fail("e1 and e2 have different maps"); + } + + var m1, m2; + + try { + throw e1 + } catch (e) { + m1 = Debug.map(e) + } + + try { + throw e2 + } catch (e) { + m2 = Debug.map(e) + } + + if (! Debug.identical(m1, m2)) { + fail("e1 and e2 have different maps after being thrown"); + } +} + +checkMap(new Error(), new Error()); +checkMap(new EvalError(), new EvalError()); +checkMap(new RangeError(), new RangeError()); +checkMap(new ReferenceError(), new ReferenceError()); +checkMap(new SyntaxError(), new SyntaxError()); +checkMap(new TypeError(), new TypeError()); +checkMap(new URIError(), new URIError()); + +// now try with message param +checkMap(new Error("x"), new Error("y")); +checkMap(new EvalError("x"), new EvalError("y")); +checkMap(new RangeError("x"), new RangeError("y")); +checkMap(new ReferenceError("x"), new ReferenceError("y")); +checkMap(new SyntaxError("x"), new SyntaxError("y")); +checkMap(new TypeError("x"), new TypeError("y")); +checkMap(new URIError("x"), new URIError("y")); diff --git a/nashorn/test/src/jdk/nashorn/api/scripting/InvocableTest.java b/nashorn/test/src/jdk/nashorn/api/scripting/InvocableTest.java index fad3f3722b1..a6722f571f5 100644 --- a/nashorn/test/src/jdk/nashorn/api/scripting/InvocableTest.java +++ b/nashorn/test/src/jdk/nashorn/api/scripting/InvocableTest.java @@ -26,6 +26,7 @@ package jdk.nashorn.api.scripting; import java.util.Objects; +import java.util.function.Function; import javax.script.Invocable; import javax.script.ScriptContext; import javax.script.ScriptEngine; @@ -522,4 +523,16 @@ public class InvocableTest { Assert.assertEquals(itf.test1(42, "a", "b"), "i == 42, strings instanceof java.lang.String[] == true, strings == [a, b]"); Assert.assertEquals(itf.test2(44, "c", "d", "e"), "arguments[0] == 44, arguments[1] instanceof java.lang.String[] == true, arguments[1] == [c, d, e]"); } + + @Test + @SuppressWarnings("unchecked") + public void defaultMethodTest() throws ScriptException { + final ScriptEngineManager m = new ScriptEngineManager(); + final ScriptEngine e = m.getEngineByName("nashorn"); + final Invocable inv = (Invocable) e; + + Object obj = e.eval("({ apply: function(arg) { return arg.toUpperCase(); }})"); + Function<String, String> func = inv.getInterface(obj, Function.class); + assertEquals(func.apply("hello"), "HELLO"); + } }