aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlana <none@none>2013-11-27 10:47:53 -0800
committerlana <none@none>2013-11-27 10:47:53 -0800
commit7cc6a7af83a1c73d464cf02c656543cb925a7186 (patch)
treec82ae54fb8acfe7b45e804409f2e0633d4cabae5 /src
parent9ad656a18ac87f96b3928e49200c925e1492c820 (diff)
parentcd0dc1f751b9f330b66ac17502844504d8af5b5d (diff)
Merge
--HG-- rename : makefiles/CompileDemos.gmk => make/CompileDemos.gmk
Diffstat (limited to 'src')
-rw-r--r--src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java16
-rw-r--r--src/share/classes/com/sun/crypto/provider/CipherCore.java31
-rw-r--r--src/share/classes/com/sun/crypto/provider/DESedeWrapCipher.java48
-rw-r--r--src/share/classes/java/io/EOFException.java1
-rw-r--r--src/share/classes/java/io/FilePermission.java2
-rw-r--r--src/share/classes/java/lang/String.java63
-rw-r--r--src/share/classes/java/lang/annotation/ElementType.java46
-rw-r--r--src/share/classes/java/lang/annotation/Target.java40
-rw-r--r--src/share/classes/java/nio/channels/AsynchronousChannelGroup.java1
-rw-r--r--src/share/classes/java/nio/channels/AsynchronousFileChannel.java2
-rw-r--r--src/share/classes/java/nio/channels/FileChannel.java2
-rw-r--r--src/share/classes/java/nio/charset/Charset.java4
-rw-r--r--src/share/classes/java/nio/file/FileSystem.java1
-rw-r--r--src/share/classes/java/nio/file/Files.java2
-rw-r--r--src/share/classes/java/nio/package.html4
-rw-r--r--src/share/classes/java/util/logging/XMLFormatter.java2
-rw-r--r--src/share/classes/java/util/stream/DoubleStream.java12
-rw-r--r--src/share/classes/java/util/stream/IntStream.java12
-rw-r--r--src/share/classes/java/util/stream/LongStream.java12
-rw-r--r--src/share/classes/java/util/stream/Stream.java12
-rw-r--r--src/share/classes/sun/misc/Unsafe.java10
-rw-r--r--src/share/classes/sun/reflect/annotation/TypeAnnotation.java20
-rw-r--r--src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java31
-rw-r--r--src/share/classes/sun/security/pkcs11/P11Signature.java64
-rw-r--r--src/share/classes/sun/security/pkcs11/Token.java7
-rw-r--r--src/share/classes/sun/security/provider/certpath/OCSP.java10
-rw-r--r--src/share/classes/sun/security/provider/certpath/OCSPRequest.java9
-rw-r--r--src/share/classes/sun/security/provider/certpath/OCSPResponse.java128
-rw-r--r--src/share/classes/sun/security/provider/certpath/RevocationChecker.java13
-rw-r--r--src/share/classes/sun/security/x509/X509CertImpl.java14
-rw-r--r--src/share/classes/sun/util/calendar/ZoneInfoFile.java7
-rw-r--r--src/share/classes/sun/util/resources/TimeZoneNames.java15
-rw-r--r--src/share/classes/sun/util/resources/de/TimeZoneNames_de.java14
-rw-r--r--src/share/classes/sun/util/resources/es/TimeZoneNames_es.java14
-rw-r--r--src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java14
-rw-r--r--src/share/classes/sun/util/resources/it/TimeZoneNames_it.java14
-rw-r--r--src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java14
-rw-r--r--src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java14
-rw-r--r--src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java14
-rw-r--r--src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java14
-rw-r--r--src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java14
-rw-r--r--src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java14
42 files changed, 486 insertions, 295 deletions
diff --git a/src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java b/src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java
index c32aa7fea..51d95c12e 100644
--- a/src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java
+++ b/src/share/classes/com/sun/crypto/provider/CipherBlockChaining.java
@@ -186,29 +186,15 @@ class CipherBlockChaining extends FeedbackCipher {
byte[] plain, int plainOffset)
{
int i;
- byte[] cipherOrig=null;
int endIndex = cipherOffset + cipherLen;
- if (cipher==plain && (cipherOffset >= plainOffset)
- && ((cipherOffset - plainOffset) < blockSize)) {
- // Save the original ciphertext blocks, so they can be
- // stored in the feedback register "r".
- // This is necessary because in this constellation, a
- // ciphertext block (or parts of it) will be overridden by
- // the plaintext result.
- cipherOrig = cipher.clone();
- }
for (; cipherOffset < endIndex;
cipherOffset += blockSize, plainOffset += blockSize) {
embeddedCipher.decryptBlock(cipher, cipherOffset, k, 0);
for (i = 0; i < blockSize; i++) {
plain[i+plainOffset] = (byte)(k[i] ^ r[i]);
}
- if (cipherOrig==null) {
- System.arraycopy(cipher, cipherOffset, r, 0, blockSize);
- } else {
- System.arraycopy(cipherOrig, cipherOffset, r, 0, blockSize);
- }
+ System.arraycopy(cipher, cipherOffset, r, 0, blockSize);
}
return cipherLen;
}
diff --git a/src/share/classes/com/sun/crypto/provider/CipherCore.java b/src/share/classes/com/sun/crypto/provider/CipherCore.java
index dab1b4d6f..8d54633ad 100644
--- a/src/share/classes/com/sun/crypto/provider/CipherCore.java
+++ b/src/share/classes/com/sun/crypto/provider/CipherCore.java
@@ -732,8 +732,12 @@ final class CipherCore {
System.arraycopy(buffer, len, buffer, 0, buffered);
}
} else { // len > buffered
- if (buffered == 0) {
+ if ((input != output) && (buffered == 0)) {
// all to-be-processed data are from 'input'
+ // however, note that if 'input' and 'output' are the same,
+ // then they can't be passed directly to the underlying cipher
+ // engine operations as data may be overwritten before they
+ // are read.
if (decrypting) {
outLen = cipher.decrypt(input, inputOffset, len, output, outputOffset);
} else {
@@ -744,12 +748,16 @@ final class CipherCore {
} else {
// assemble the data using both 'buffer' and 'input'
byte[] in = new byte[len];
- System.arraycopy(buffer, 0, in, 0, buffered);
int inConsumed = len - buffered;
- System.arraycopy(input, inputOffset, in, buffered, inConsumed);
- buffered = 0;
- inputOffset += inConsumed;
- inputLen -= inConsumed;
+ if (buffered != 0) {
+ System.arraycopy(buffer, 0, in, 0, buffered);
+ buffered = 0;
+ }
+ if (inConsumed != 0) {
+ System.arraycopy(input, inputOffset, in, len - inConsumed, inConsumed);
+ inputOffset += inConsumed;
+ inputLen -= inConsumed;
+ }
if (decrypting) {
outLen = cipher.decrypt(in, 0, len, output, outputOffset);
} else {
@@ -907,11 +915,18 @@ final class CipherCore {
" when decrypting with padded cipher");
}
- // prepare the final input avoiding copying if possible
+ /*
+ * prepare the final input, assemble a new buffer if any
+ * of the following is true:
+ * - 'input' and 'output' are the same buffer
+ * - there are internally buffered bytes
+ * - doing encryption and padding is needed
+ */
byte[] finalBuf = input;
int finalOffset = inputOffset;
int finalBufLen = inputLen;
- if ((buffered != 0) || (!decrypting && padding != null)) {
+ if ((input == output) || (buffered != 0) ||
+ (!decrypting && padding != null)) {
if (decrypting || padding == null) {
paddingLen = 0;
}
diff --git a/src/share/classes/com/sun/crypto/provider/DESedeWrapCipher.java b/src/share/classes/com/sun/crypto/provider/DESedeWrapCipher.java
index d4e27528d..06ef9e2b6 100644
--- a/src/share/classes/com/sun/crypto/provider/DESedeWrapCipher.java
+++ b/src/share/classes/com/sun/crypto/provider/DESedeWrapCipher.java
@@ -50,6 +50,9 @@ public final class DESedeWrapCipher extends CipherSpi {
(byte) 0x79, (byte) 0xe8, (byte) 0x21, (byte) 0x05
};
+ private static final int CHECKSUM_LEN = 8;
+ private static final int IV_LEN = 8;
+
/*
* internal cipher object which does the real work.
*/
@@ -135,7 +138,7 @@ public final class DESedeWrapCipher extends CipherSpi {
// can only return an upper-limit if not initialized yet.
int result = 0;
if (decrypting) {
- result = inputLen - 16;
+ result = inputLen - 16; // CHECKSUM_LEN + IV_LEN;
} else {
result = inputLen + 16;
}
@@ -215,7 +218,7 @@ public final class DESedeWrapCipher extends CipherSpi {
if (opmode == Cipher.WRAP_MODE) {
decrypting = false;
if (params == null) {
- iv = new byte[8];
+ iv = new byte[IV_LEN];
if (random == null) {
random = SunJCE.getRandom();
}
@@ -449,14 +452,15 @@ public final class DESedeWrapCipher extends CipherSpi {
}
byte[] cks = getChecksum(keyVal);
- byte[] out = new byte[iv.length + keyVal.length + cks.length];
-
- System.arraycopy(keyVal, 0, out, iv.length, keyVal.length);
- System.arraycopy(cks, 0, out, iv.length+keyVal.length, cks.length);
- cipher.encrypt(out, iv.length, keyVal.length+cks.length,
- out, iv.length);
+ byte[] in = new byte[keyVal.length + CHECKSUM_LEN];
+ System.arraycopy(keyVal, 0, in, 0, keyVal.length);
+ System.arraycopy(cks, 0, in, keyVal.length, CHECKSUM_LEN);
+ byte[] out = new byte[iv.length + in.length];
System.arraycopy(iv, 0, out, 0, iv.length);
+
+ cipher.encrypt(in, 0, in.length, out, iv.length);
+
// reverse the array content
for (int i = 0; i < out.length/2; i++) {
byte temp = out[i];
@@ -470,7 +474,8 @@ public final class DESedeWrapCipher extends CipherSpi {
// should never happen
throw new RuntimeException("Internal cipher key is corrupted");
}
- cipher.encrypt(out, 0, out.length, out, 0);
+ byte[] out2 = new byte[out.length];
+ cipher.encrypt(out, 0, out.length, out2, 0);
// restore cipher state to prior to this call
try {
@@ -480,7 +485,7 @@ public final class DESedeWrapCipher extends CipherSpi {
// should never happen
throw new RuntimeException("Internal cipher key is corrupted");
}
- return out;
+ return out2;
}
/**
@@ -520,25 +525,26 @@ public final class DESedeWrapCipher extends CipherSpi {
buffer[i] = buffer[buffer.length-1-i];
buffer[buffer.length-1-i] = temp;
}
- iv = new byte[IV2.length];
+ iv = new byte[IV_LEN];
System.arraycopy(buffer, 0, iv, 0, iv.length);
cipher.init(true, cipherKey.getAlgorithm(), cipherKey.getEncoded(),
iv);
- cipher.decrypt(buffer, iv.length, buffer.length-iv.length,
- buffer, iv.length);
- int origLen = buffer.length - iv.length - 8;
- byte[] cks = getChecksum(buffer, iv.length, origLen);
- int offset = iv.length + origLen;
- for (int i = 0; i < cks.length; i++) {
- if (buffer[offset + i] != cks[i]) {
+ byte[] buffer2 = new byte[buffer.length - iv.length];
+ cipher.decrypt(buffer, iv.length, buffer2.length,
+ buffer2, 0);
+ int keyValLen = buffer2.length - CHECKSUM_LEN;
+ byte[] cks = getChecksum(buffer2, 0, keyValLen);
+ int offset = keyValLen;
+ for (int i = 0; i < CHECKSUM_LEN; i++) {
+ if (buffer2[offset + i] != cks[i]) {
throw new InvalidKeyException("Checksum comparison failed");
}
}
// restore cipher state to prior to this call
cipher.init(decrypting, cipherKey.getAlgorithm(),
cipherKey.getEncoded(), IV2);
- byte[] out = new byte[origLen];
- System.arraycopy(buffer, iv.length, out, 0, out.length);
+ byte[] out = new byte[keyValLen];
+ System.arraycopy(buffer2, 0, out, 0, keyValLen);
return ConstructKeys.constructKey(out, wrappedKeyAlgorithm,
wrappedKeyType);
}
@@ -554,7 +560,7 @@ public final class DESedeWrapCipher extends CipherSpi {
throw new RuntimeException("SHA1 message digest not available");
}
md.update(in, offset, len);
- byte[] cks = new byte[8];
+ byte[] cks = new byte[CHECKSUM_LEN];
System.arraycopy(md.digest(), 0, cks, 0, cks.length);
return cks;
}
diff --git a/src/share/classes/java/io/EOFException.java b/src/share/classes/java/io/EOFException.java
index ed6ca0fad..0f9a326c3 100644
--- a/src/share/classes/java/io/EOFException.java
+++ b/src/share/classes/java/io/EOFException.java
@@ -32,7 +32,6 @@ package java.io;
* This exception is mainly used by data input streams to signal end of
* stream. Note that many other input operations return a special value on
* end of stream rather than throwing an exception.
- * <p>
*
* @author Frank Yellin
* @see java.io.DataInputStream
diff --git a/src/share/classes/java/io/FilePermission.java b/src/share/classes/java/io/FilePermission.java
index 89f2c3328..bac39d304 100644
--- a/src/share/classes/java/io/FilePermission.java
+++ b/src/share/classes/java/io/FilePermission.java
@@ -380,7 +380,7 @@ public final class FilePermission extends Permission implements Serializable {
/**
* Checks two FilePermission objects for equality. Checks that <i>obj</i> is
* a FilePermission, and has the same pathname and actions as this object.
- * <P>
+ *
* @param obj the object we are testing for equality with this object.
* @return <code>true</code> if obj is a FilePermission, and has the same
* pathname and actions as this FilePermission object,
diff --git a/src/share/classes/java/lang/String.java b/src/share/classes/java/lang/String.java
index e0a73d557..4efec8338 100644
--- a/src/share/classes/java/lang/String.java
+++ b/src/share/classes/java/lang/String.java
@@ -123,7 +123,7 @@ public final class String
* Class String is special cased within the Serialization Stream Protocol.
*
* A String instance is written into an ObjectOutputStream according to
- * <a href="{@docroot}../platform/serialization/spec/output.html">
+ * <a href="{@docRoot}/../platform/serialization/spec/output.html">
* Object Serialization Specification, Section 6.2, "Stream Elements"</a>
*/
private static final ObjectStreamField[] serialPersistentFields =
@@ -1893,7 +1893,7 @@ public final class String
}
/**
- * Returns a new string that is a substring of this string. The
+ * Returns a string that is a substring of this string. The
* substring begins with the character at the specified index and
* extends to the end of this string. <p>
* Examples:
@@ -1921,7 +1921,7 @@ public final class String
}
/**
- * Returns a new string that is a substring of this string. The
+ * Returns a string that is a substring of this string. The
* substring begins at the specified {@code beginIndex} and
* extends to the character at index {@code endIndex - 1}.
* Thus the length of the substring is {@code endIndex-beginIndex}.
@@ -1970,6 +1970,7 @@ public final class String
* <blockquote><pre>
* str.substring(begin,&nbsp;end)</pre></blockquote>
*
+ * @apiNote
* This method is defined so that the {@code String} class can implement
* the {@link CharSequence} interface.
*
@@ -1993,8 +1994,8 @@ public final class String
* Concatenates the specified string to the end of this string.
* <p>
* If the length of the argument string is {@code 0}, then this
- * {@code String} object is returned. Otherwise, a new
- * {@code String} object is created, representing a character
+ * {@code String} object is returned. Otherwise, a
+ * {@code String} object is returned that represents a character
* sequence that is the concatenation of the character sequence
* represented by this {@code String} object and the character
* sequence represented by the argument string.<p>
@@ -2021,13 +2022,13 @@ public final class String
}
/**
- * Returns a new string resulting from replacing all occurrences of
+ * Returns a string resulting from replacing all occurrences of
* {@code oldChar} in this string with {@code newChar}.
* <p>
* If the character {@code oldChar} does not occur in the
* character sequence represented by this {@code String} object,
* then a reference to this {@code String} object is returned.
- * Otherwise, a new {@code String} object is created that
+ * Otherwise, a {@code String} object is returned that
* represents a character sequence identical to the character sequence
* represented by this {@code String} object, except that every
* occurrence of {@code oldChar} is replaced by an occurrence
@@ -2818,8 +2819,8 @@ public final class String
}
/**
- * Returns a copy of the string, with leading and trailing whitespace
- * omitted.
+ * Returns a string whose value is this string, with any leading and trailing
+ * whitespace removed.
* <p>
* If this {@code String} object represents an empty character
* sequence, or the first and last characters of character sequence
@@ -2828,15 +2829,15 @@ public final class String
* reference to this {@code String} object is returned.
* <p>
* Otherwise, if there is no character with a code greater than
- * {@code '\u005Cu0020'} in the string, then a new
- * {@code String} object representing an empty string is created
- * and returned.
+ * {@code '\u005Cu0020'} in the string, then a
+ * {@code String} object representing an empty string is
+ * returned.
* <p>
* Otherwise, let <i>k</i> be the index of the first character in the
* string whose code is greater than {@code '\u005Cu0020'}, and let
* <i>m</i> be the index of the last character in the string whose code
- * is greater than {@code '\u005Cu0020'}. A new {@code String}
- * object is created, representing the substring of this string that
+ * is greater than {@code '\u005Cu0020'}. A {@code String}
+ * object is returned, representing the substring of this string that
* begins with the character at index <i>k</i> and ends with the
* character at index <i>m</i>-that is, the result of
* {@code this.substring(k, m + 1)}.
@@ -2844,7 +2845,7 @@ public final class String
* This method may be used to trim whitespace (as defined above) from
* the beginning and end of a string.
*
- * @return A copy of this string with leading and trailing white
+ * @return A string whose value is this string, with any leading and trailing white
* space removed, or this string if it has no leading or
* trailing white space.
*/
@@ -2981,12 +2982,12 @@ public final class String
/**
* Returns the string representation of the {@code char} array
* argument. The contents of the character array are copied; subsequent
- * modification of the character array does not affect the newly
- * created string.
+ * modification of the character array does not affect the returned
+ * string.
*
- * @param data a {@code char} array.
- * @return a newly allocated string representing the same sequence of
- * characters contained in the character array argument.
+ * @param data the character array.
+ * @return a {@code String} that contains the characters of the
+ * character array.
*/
public static String valueOf(char data[]) {
return new String(data);
@@ -3000,14 +3001,13 @@ public final class String
* character of the subarray. The {@code count} argument
* specifies the length of the subarray. The contents of the subarray
* are copied; subsequent modification of the character array does not
- * affect the newly created string.
+ * affect the returned string.
*
* @param data the character array.
- * @param offset the initial offset into the value of the
- * {@code String}.
- * @param count the length of the value of the {@code String}.
- * @return a string representing the sequence of characters contained
- * in the subarray of the character array argument.
+ * @param offset initial offset of the subarray.
+ * @param count length of the subarray.
+ * @return a {@code String} that contains the characters of the
+ * specified subarray of the character array.
* @exception IndexOutOfBoundsException if {@code offset} is
* negative, or {@code count} is negative, or
* {@code offset+count} is larger than
@@ -3018,23 +3018,24 @@ public final class String
}
/**
- * Returns a String that represents the character sequence in the
- * array specified.
+ * Equivalent to {@link #valueOf(char[], int, int)}.
*
* @param data the character array.
* @param offset initial offset of the subarray.
* @param count length of the subarray.
* @return a {@code String} that contains the characters of the
* specified subarray of the character array.
+ * @exception IndexOutOfBoundsException if {@code offset} is
+ * negative, or {@code count} is negative, or
+ * {@code offset+count} is larger than
+ * {@code data.length}.
*/
public static String copyValueOf(char data[], int offset, int count) {
- // All public String constructors now copy the data.
return new String(data, offset, count);
}
/**
- * Returns a String that represents the character sequence in the
- * array specified.
+ * Equivalent to {@link #valueOf(char[])}.
*
* @param data the character array.
* @return a {@code String} that contains the characters of the
diff --git a/src/share/classes/java/lang/annotation/ElementType.java b/src/share/classes/java/lang/annotation/ElementType.java
index a1125ffe1..4590f39ed 100644
--- a/src/share/classes/java/lang/annotation/ElementType.java
+++ b/src/share/classes/java/lang/annotation/ElementType.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
@@ -26,15 +26,49 @@
package java.lang.annotation;
/**
- * A program element type. The constants of this enumerated type
- * provide a simple classification of the declared elements in a
- * Java program.
+ * The constants of this enumerated type provide a simple classification of the
+ * syntactic locations where annotations may appear in a Java program. These
+ * constants are used in {@link Target java.lang.annotation.Target}
+ * meta-annotations to specify where it is legal to write annotations of a
+ * given type.
*
- * <p>These constants are used with the {@link Target} meta-annotation type
- * to specify where it is legal to use an annotation type.
+ * <p>The syntactic locations where annotations may appear are split into
+ * <em>declaration contexts</em> , where annotations apply to declarations, and
+ * <em>type contexts</em> , where annotations apply to types used in
+ * declarations and expressions.
+ *
+ * <p>The constants {@link #ANNOTATION_TYPE} , {@link #CONSTRUCTOR} , {@link
+ * #FIELD} , {@link #LOCAL_VARIABLE} , {@link #METHOD} , {@link #PACKAGE} ,
+ * {@link #PARAMETER} , {@link #TYPE} , and {@link #TYPE_PARAMETER} correspond
+ * to the declaration contexts in JLS 9.6.4.1.
+ *
+ * <p>For example, an annotation whose type is meta-annotated with
+ * {@code @Target(ElementType.FIELD)} may only be written as a modifier for a
+ * field declaration.
+ *
+ * <p>The constant {@link #TYPE_USE} corresponds to the 15 type contexts in JLS
+ * 4.11, as well as to two declaration contexts: type declarations (including
+ * annotation type declarations) and type parameter declarations.
+ *
+ * <p>For example, an annotation whose type is meta-annotated with
+ * {@code @Target(ElementType.TYPE_USE)} may be written on the type of a field
+ * (or within the type of the field, if it is a nested, parameterized, or array
+ * type), and may also appear as a modifier for, say, a class declaration.
+ *
+ * <p>The {@code TYPE_USE} constant includes type declarations and type
+ * parameter declarations as a convenience for designers of type checkers which
+ * give semantics to annotation types. For example, if the annotation type
+ * {@code NonNull} is meta-annotated with
+ * {@code @Target(ElementType.TYPE_USE)}, then {@code @NonNull}
+ * {@code class C {...}} could be treated by a type checker as indicating that
+ * all variables of class {@code C} are non-null, while still allowing
+ * variables of other classes to be non-null or not non-null based on whether
+ * {@code @NonNull} appears at the variable's declaration.
*
* @author Joshua Bloch
* @since 1.5
+ * @jls 9.6.4.1 @Target
+ * @jls 4.1 The Kinds of Types and Values
*/
public enum ElementType {
/** Class, interface (including annotation type), or enum declaration */
diff --git a/src/share/classes/java/lang/annotation/Target.java b/src/share/classes/java/lang/annotation/Target.java
index 1ceec3806..1ad405633 100644
--- a/src/share/classes/java/lang/annotation/Target.java
+++ b/src/share/classes/java/lang/annotation/Target.java
@@ -26,33 +26,42 @@
package java.lang.annotation;
/**
- * Indicates the kinds of program element to which an annotation type
- * is applicable. If a Target meta-annotation is not present on an
- * annotation type declaration, the declared type may be used on any
- * program element. If such a meta-annotation is present, the compiler
- * will enforce the specified usage restriction.
+ * Indicates the contexts in which an annotation type is applicable. The
+ * declaration contexts and type contexts in which an annotation type may be
+ * applicable are specified in JLS 9.6.4.1, and denoted in source code by enum
+ * constants of {@link ElementType java.lang.annotation.ElementType}.
*
- * For example, this meta-annotation indicates that the declared type is
- * itself a meta-annotation type. It can only be used on annotation type
- * declarations:
+ * <p>If an {@code @Target} meta-annotation is not present on an annotation type
+ * {@code T} , then an annotation of type {@code T} may be written as a
+ * modifier for any declaration except a type parameter declaration.
+ *
+ * <p>If an {@code @Target} meta-annotation is present, the compiler will enforce
+ * the usage restrictions indicated by {@code ElementType}
+ * enum constants, in line with JLS 9.7.4.
+ *
+ * <p>For example, this {@code @Target} meta-annotation indicates that the
+ * declared type is itself a meta-annotation type. It can only be used on
+ * annotation type declarations:
* <pre>
* &#064;Target(ElementType.ANNOTATION_TYPE)
* public &#064;interface MetaAnnotationType {
* ...
* }
* </pre>
- * This meta-annotation indicates that the declared type is intended solely
- * for use as a member type in complex annotation type declarations. It
- * cannot be used to annotate anything directly:
+ *
+ * <p>This {@code @Target} meta-annotation indicates that the declared type is
+ * intended solely for use as a member type in complex annotation type
+ * declarations. It cannot be used to annotate anything directly:
* <pre>
* &#064;Target({})
* public &#064;interface MemberType {
* ...
* }
* </pre>
- * It is a compile-time error for a single ElementType constant to
- * appear more than once in a Target annotation. For example, the
- * following meta-annotation is illegal:
+ *
+ * <p>It is a compile-time error for a single {@code ElementType} constant to
+ * appear more than once in an {@code @Target} annotation. For example, the
+ * following {@code @Target} meta-annotation is illegal:
* <pre>
* &#064;Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})
* public &#064;interface Bogus {
@@ -61,7 +70,8 @@ package java.lang.annotation;
* </pre>
*
* @since 1.5
- * @jls 9.6.3.1 @Target
+ * @jls 9.6.4.1 @Target
+ * @jls 9.7.4 Where Annotations May Appear
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
diff --git a/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java b/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java
index aa56bbf38..8f7cdd649 100644
--- a/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java
+++ b/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java
@@ -66,7 +66,6 @@ import java.util.concurrent.TimeUnit;
* <th>Description</th>
* </tr>
* <tr>
- * <tr>
* <td> {@code java.nio.channels.DefaultThreadPool.threadFactory} </td>
* <td> The value of this property is taken to be the fully-qualified name
* of a concrete {@link java.util.concurrent.ThreadFactory ThreadFactory}
diff --git a/src/share/classes/java/nio/channels/AsynchronousFileChannel.java b/src/share/classes/java/nio/channels/AsynchronousFileChannel.java
index c40fb3762..24ec4df74 100644
--- a/src/share/classes/java/nio/channels/AsynchronousFileChannel.java
+++ b/src/share/classes/java/nio/channels/AsynchronousFileChannel.java
@@ -178,7 +178,7 @@ public abstract class AsynchronousFileChannel
* written synchronously to the underlying storage device. (see <a
* href="../file/package-summary.html#integrity"> Synchronized I/O file
* integrity</a>). </td>
- * <tr>
+ * </tr>
* <tr>
* <td> {@link StandardOpenOption#DSYNC DSYNC} </td>
* <td> Requires that every update to the file's content be written
diff --git a/src/share/classes/java/nio/channels/FileChannel.java b/src/share/classes/java/nio/channels/FileChannel.java
index 57ce3e10d..f6f332ae6 100644
--- a/src/share/classes/java/nio/channels/FileChannel.java
+++ b/src/share/classes/java/nio/channels/FileChannel.java
@@ -229,7 +229,7 @@ public abstract class FileChannel
* written synchronously to the underlying storage device. (see <a
* href="../file/package-summary.html#integrity"> Synchronized I/O file
* integrity</a>). </td>
- * <tr>
+ * </tr>
* <tr>
* <td> {@link StandardOpenOption#DSYNC DSYNC} </td>
* <td> Requires that every update to the file's content be written
diff --git a/src/share/classes/java/nio/charset/Charset.java b/src/share/classes/java/nio/charset/Charset.java
index 3d946f1d4..ae0566174 100644
--- a/src/share/classes/java/nio/charset/Charset.java
+++ b/src/share/classes/java/nio/charset/Charset.java
@@ -118,10 +118,10 @@ import sun.security.action.GetPropertyAction;
* {@link java.io.InputStreamReader#getEncoding InputStreamReader} and {@link
* java.io.OutputStreamWriter#getEncoding OutputStreamWriter} classes.
*
- * <p><a name="iana">If a charset listed in the <a
+ * <p><a name="iana"> </a>If a charset listed in the <a
* href="http://www.iana.org/assignments/character-sets"><i>IANA Charset
* Registry</i></a> is supported by an implementation of the Java platform then
- * its canonical name must be the name listed in the registry.</a> Many charsets
+ * its canonical name must be the name listed in the registry. Many charsets
* are given more than one name in the registry, in which case the registry
* identifies one of the names as <i>MIME-preferred</i>. If a charset has more
* than one registry name then its canonical name must be the MIME-preferred
diff --git a/src/share/classes/java/nio/file/FileSystem.java b/src/share/classes/java/nio/file/FileSystem.java
index 2a961fb8e..a5dbe0f1d 100644
--- a/src/share/classes/java/nio/file/FileSystem.java
+++ b/src/share/classes/java/nio/file/FileSystem.java
@@ -325,7 +325,6 @@ public abstract class FileSystem
* <td>Matches file names containing a dot</td>
* </tr>
* <tr>
- * <tr>
* <td>{@code *.{java,class}}</td>
* <td>Matches file names ending with {@code .java} or {@code .class}</td>
* </tr>
diff --git a/src/share/classes/java/nio/file/Files.java b/src/share/classes/java/nio/file/Files.java
index 920ac93d0..5c8d8be17 100644
--- a/src/share/classes/java/nio/file/Files.java
+++ b/src/share/classes/java/nio/file/Files.java
@@ -284,7 +284,7 @@ public final class Files {
* written synchronously to the underlying storage device. (see <a
* href="package-summary.html#integrity"> Synchronized I/O file
* integrity</a>). </td>
- * <tr>
+ * </tr>
* <tr>
* <td> {@link StandardOpenOption#DSYNC DSYNC} </td>
* <td> Requires that every update to the file's content be written
diff --git a/src/share/classes/java/nio/package.html b/src/share/classes/java/nio/package.html
index 27059e7df..1f02634d6 100644
--- a/src/share/classes/java/nio/package.html
+++ b/src/share/classes/java/nio/package.html
@@ -62,7 +62,7 @@ the platform's default implementations or to construct alternative
implementations.
-<a name="buffers">
+<a name="buffers"> </a>
<blockquote><table cellspacing=1 cellpadding=0 summary="Description of the various buffers">
<tr><th><p align="left">Buffers</p></th><th><p align="left">Description</p></th></tr>
@@ -115,7 +115,7 @@ other buffer classes:
best effort to perform native I/O operations directly upon it. </p></li>
<li><p> A byte buffer can be created by {@link
- java.nio.channels.FileChannel#map </code><i>mapping</i><code>} a region of a
+ java.nio.channels.FileChannel#map <i>mapping</i>} a region of a
file directly into memory, in which case a few additional file-related
operations defined in the {@link java.nio.MappedByteBuffer} class are
available. </p></li>
diff --git a/src/share/classes/java/util/logging/XMLFormatter.java b/src/share/classes/java/util/logging/XMLFormatter.java
index d32d978db..34c61c48b 100644
--- a/src/share/classes/java/util/logging/XMLFormatter.java
+++ b/src/share/classes/java/util/logging/XMLFormatter.java
@@ -58,7 +58,7 @@ public class XMLFormatter extends Formatter {
private void appendISO8601(StringBuilder sb, long millis) {
GregorianCalendar cal = new GregorianCalendar();
cal.setTimeInMillis(millis);
- sb.append(cal.get(Calendar.YEAR) + 1900);
+ sb.append(cal.get(Calendar.YEAR));
sb.append('-');
a2(sb, cal.get(Calendar.MONTH) + 1);
sb.append('-');
diff --git a/src/share/classes/java/util/stream/DoubleStream.java b/src/share/classes/java/util/stream/DoubleStream.java
index 68d792d38..163e5c42d 100644
--- a/src/share/classes/java/util/stream/DoubleStream.java
+++ b/src/share/classes/java/util/stream/DoubleStream.java
@@ -207,12 +207,12 @@ public interface DoubleStream extends BaseStream<Double, DoubleStream> {
* @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code
- * list.stream()
- * .filter(filteringFunction)
- * .peek(e -> System.out.println("Filtered value: " + e));
- * .map(mappingFunction)
- * .peek(e -> System.out.println("Mapped value: " + e));
- * .collect(Collectors.toDoubleSummaryStastistics());
+ * DoubleStream.of(1, 2, 3, 4)
+ * .filter(e -> e > 2)
+ * .peek(e -> System.out.println("Filtered value: " + e))
+ * .map(e -> e * e)
+ * .peek(e -> System.out.println("Mapped value: " + e))
+ * .sum();
* }</pre>
*
* @param action a <a href="package-summary.html#NonInterference">
diff --git a/src/share/classes/java/util/stream/IntStream.java b/src/share/classes/java/util/stream/IntStream.java
index b9fae57c7..3030f46e6 100644
--- a/src/share/classes/java/util/stream/IntStream.java
+++ b/src/share/classes/java/util/stream/IntStream.java
@@ -200,12 +200,12 @@ public interface IntStream extends BaseStream<Integer, IntStream> {
* @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code
- * list.stream()
- * .filter(filteringFunction)
- * .peek(e -> System.out.println("Filtered value: " + e));
- * .map(mappingFunction)
- * .peek(e -> System.out.println("Mapped value: " + e));
- * .collect(Collectors.toIntSummaryStastistics());
+ * IntStream.of(1, 2, 3, 4)
+ * .filter(e -> e > 2)
+ * .peek(e -> System.out.println("Filtered value: " + e))
+ * .map(e -> e * e)
+ * .peek(e -> System.out.println("Mapped value: " + e))
+ * .sum();
* }</pre>
*
* @param action a <a href="package-summary.html#NonInterference">
diff --git a/src/share/classes/java/util/stream/LongStream.java b/src/share/classes/java/util/stream/LongStream.java
index d9fe6b391..983afef78 100644
--- a/src/share/classes/java/util/stream/LongStream.java
+++ b/src/share/classes/java/util/stream/LongStream.java
@@ -205,12 +205,12 @@ public interface LongStream extends BaseStream<Long, LongStream> {
* @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code
- * list.stream()
- * .filter(filteringFunction)
- * .peek(e -> System.out.println("Filtered value: " + e));
- * .map(mappingFunction)
- * .peek(e -> System.out.println("Mapped value: " + e));
- * .collect(Collectors.toLongSummaryStastistics());
+ * LongStream.of(1, 2, 3, 4)
+ * .filter(e -> e > 2)
+ * .peek(e -> System.out.println("Filtered value: " + e))
+ * .map(e -> e * e)
+ * .peek(e -> System.out.println("Mapped value: " + e))
+ * .sum();
* }</pre>
*
* @param action a <a href="package-summary.html#NonInterference">
diff --git a/src/share/classes/java/util/stream/Stream.java b/src/share/classes/java/util/stream/Stream.java
index 9c88e6887..966cd7913 100644
--- a/src/share/classes/java/util/stream/Stream.java
+++ b/src/share/classes/java/util/stream/Stream.java
@@ -403,12 +403,12 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
* @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code
- * list.stream()
- * .filter(filteringFunction)
- * .peek(e -> System.out.println("Filtered value: " + e));
- * .map(mappingFunction)
- * .peek(e -> System.out.println("Mapped value: " + e));
- * .collect(Collectors.intoList());
+ * Stream.of("one", "two", "three", "four")
+ * .filter(e -> e.length() > 3)
+ * .peek(e -> System.out.println("Filtered value: " + e))
+ * .map(String::toUpperCase)
+ * .peek(e -> System.out.println("Mapped value: " + e))
+ * .collect(Collectors.toList());
* }</pre>
*
* @param action a <a href="package-summary.html#NonInterference">
diff --git a/src/share/classes/sun/misc/Unsafe.java b/src/share/classes/sun/misc/Unsafe.java
index 25fb99e26..1a2e9155e 100644
--- a/src/share/classes/sun/misc/Unsafe.java
+++ b/src/share/classes/sun/misc/Unsafe.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, 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
@@ -1131,4 +1131,12 @@ public final class Unsafe {
*/
public native void fullFence();
+ /**
+ * Throws IllegalAccessError; for use by the VM.
+ * @since 1.8
+ */
+ private static void throwIllegalAccessError() {
+ throw new IllegalAccessError();
+ }
+
}
diff --git a/src/share/classes/sun/reflect/annotation/TypeAnnotation.java b/src/share/classes/sun/reflect/annotation/TypeAnnotation.java
index 5c94db4d6..e1d1bba5e 100644
--- a/src/share/classes/sun/reflect/annotation/TypeAnnotation.java
+++ b/src/share/classes/sun/reflect/annotation/TypeAnnotation.java
@@ -147,13 +147,13 @@ public final class TypeAnnotation {
public static final LocationInfo BASE_LOCATION = new LocationInfo();
public static LocationInfo parseLocationInfo(ByteBuffer buf) {
- int depth = buf.get();
+ int depth = buf.get() & 0xFF;
if (depth == 0)
return BASE_LOCATION;
Location[] locations = new Location[depth];
for (int i = 0; i < depth; i++) {
byte tag = buf.get();
- byte index = buf.get();
+ short index = (short)(buf.get() & 0xFF);
if (!(tag == 0 || tag == 1 | tag == 2 || tag == 3))
throw new AnnotationFormatError("Bad Location encoding in Type Annotation");
if (tag != 3 && index != 0)
@@ -164,26 +164,26 @@ public final class TypeAnnotation {
}
public LocationInfo pushArray() {
- return pushLocation((byte)0, (byte)0);
+ return pushLocation((byte)0, (short)0);
}
public LocationInfo pushInner() {
- return pushLocation((byte)1, (byte)0);
+ return pushLocation((byte)1, (short)0);
}
public LocationInfo pushWildcard() {
- return pushLocation((byte) 2, (byte) 0);
+ return pushLocation((byte) 2, (short) 0);
}
- public LocationInfo pushTypeArg(byte index) {
+ public LocationInfo pushTypeArg(short index) {
return pushLocation((byte) 3, index);
}
- public LocationInfo pushLocation(byte tag, byte index) {
+ public LocationInfo pushLocation(byte tag, short index) {
int newDepth = this.depth + 1;
Location[] res = new Location[newDepth];
System.arraycopy(this.locations, 0, res, 0, depth);
- res[newDepth - 1] = new Location(tag, index);
+ res[newDepth - 1] = new Location(tag, (short)(index & 0xFF));
return new LocationInfo(newDepth, res);
}
@@ -207,13 +207,13 @@ public final class TypeAnnotation {
public static final class Location {
public final byte tag;
- public final byte index;
+ public final short index;
boolean isSameLocation(Location other) {
return tag == other.tag && index == other.index;
}
- public Location(byte tag, byte index) {
+ public Location(byte tag, short index) {
this.tag = tag;
this.index = index;
}
diff --git a/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java b/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java
index abd28cfaf..9bd4b6c64 100644
--- a/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java
+++ b/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java
@@ -394,20 +394,25 @@ public final class TypeAnnotationParser {
ConstantPool cp,
AnnotatedElement baseDecl,
Class<?> container) {
- TypeAnnotationTargetInfo ti = parseTargetInfo(buf);
- LocationInfo locationInfo = LocationInfo.parseLocationInfo(buf);
- Annotation a = AnnotationParser.parseAnnotation(buf, cp, container, false);
- if (ti == null) // Inside a method for example
- return null;
- return new TypeAnnotation(ti, locationInfo, a, baseDecl);
+ try {
+ TypeAnnotationTargetInfo ti = parseTargetInfo(buf);
+ LocationInfo locationInfo = LocationInfo.parseLocationInfo(buf);
+ Annotation a = AnnotationParser.parseAnnotation(buf, cp, container, false);
+ if (ti == null) // Inside a method for example
+ return null;
+ return new TypeAnnotation(ti, locationInfo, a, baseDecl);
+ } catch (IllegalArgumentException | // Bad type in const pool at specified index
+ BufferUnderflowException e) {
+ throw new AnnotationFormatError(e);
+ }
}
private static TypeAnnotationTargetInfo parseTargetInfo(ByteBuffer buf) {
- byte posCode = buf.get();
+ int posCode = buf.get() & 0xFF;
switch(posCode) {
case CLASS_TYPE_PARAMETER:
case METHOD_TYPE_PARAMETER: {
- byte index = buf.get();
+ int index = buf.get() & 0xFF;
TypeAnnotationTargetInfo res;
if (posCode == CLASS_TYPE_PARAMETER)
res = new TypeAnnotationTargetInfo(TypeAnnotationTarget.CLASS_TYPE_PARAMETER,
@@ -418,7 +423,7 @@ public final class TypeAnnotationParser {
return res;
} // unreachable break;
case CLASS_EXTENDS: {
- short index = buf.getShort();
+ short index = buf.getShort(); //needs to be signed
if (index == -1) {
return new TypeAnnotationTargetInfo(TypeAnnotationTarget.CLASS_EXTENDS);
} else if (index >= 0) {
@@ -437,7 +442,7 @@ public final class TypeAnnotationParser {
case METHOD_RECEIVER:
return new TypeAnnotationTargetInfo(TypeAnnotationTarget.METHOD_RECEIVER);
case METHOD_FORMAL_PARAMETER: {
- byte index = buf.get();
+ int index = buf.get() & 0xFF;
return new TypeAnnotationTargetInfo(TypeAnnotationTarget.METHOD_FORMAL_PARAMETER,
index);
} //unreachable break;
@@ -486,12 +491,12 @@ public final class TypeAnnotationParser {
}
private static TypeAnnotationTargetInfo parseShortTarget(TypeAnnotationTarget target, ByteBuffer buf) {
- short index = buf.getShort();
+ int index = buf.getShort() & 0xFFFF;
return new TypeAnnotationTargetInfo(target, index);
}
private static TypeAnnotationTargetInfo parse2ByteTarget(TypeAnnotationTarget target, ByteBuffer buf) {
- byte count = buf.get();
- byte secondaryIndex = buf.get();
+ int count = buf.get() & 0xFF;
+ int secondaryIndex = buf.get() & 0xFF;
return new TypeAnnotationTargetInfo(target,
count,
secondaryIndex);
diff --git a/src/share/classes/sun/security/pkcs11/P11Signature.java b/src/share/classes/sun/security/pkcs11/P11Signature.java
index cbbda2e0c..4a0733d71 100644
--- a/src/share/classes/sun/security/pkcs11/P11Signature.java
+++ b/src/share/classes/sun/security/pkcs11/P11Signature.java
@@ -326,6 +326,48 @@ final class P11Signature extends SignatureSpi {
}
}
+ private void checkKeySize(String keyAlgo, Key key)
+ throws InvalidKeyException {
+ CK_MECHANISM_INFO mechInfo = null;
+ try {
+ mechInfo = token.getMechanismInfo(mechanism);
+ } catch (PKCS11Exception e) {
+ // should not happen, ignore for now.
+ }
+ if (mechInfo == null) {
+ // skip the check if no native info available
+ return;
+ }
+ int minKeySize = (int) mechInfo.ulMinKeySize;
+ int maxKeySize = (int) mechInfo.ulMaxKeySize;
+
+ int keySize = 0;
+ if (key instanceof P11Key) {
+ keySize = ((P11Key) key).length();
+ } else {
+ if (keyAlgo.equals("RSA")) {
+ keySize = ((RSAKey) key).getModulus().bitLength();
+ } else if (keyAlgo.equals("DSA")) {
+ keySize = ((DSAKey) key).getParams().getP().bitLength();
+ } else if (keyAlgo.equals("EC")) {
+ keySize = ((ECKey) key).getParams().getCurve().getField().getFieldSize();
+ } else {
+ throw new ProviderException("Error: unsupported algo " + keyAlgo);
+ }
+ }
+ if ((minKeySize != -1) && (keySize < minKeySize)) {
+ throw new InvalidKeyException(keyAlgo +
+ " key must be at least " + minKeySize + " bits");
+ }
+ if ((maxKeySize != -1) && (keySize > maxKeySize)) {
+ throw new InvalidKeyException(keyAlgo +
+ " key must be at most " + maxKeySize + " bits");
+ }
+ if (keyAlgo.equals("RSA")) {
+ checkRSAKeyLength(keySize);
+ }
+ }
+
private void checkRSAKeyLength(int len) throws InvalidKeyException {
RSAPadding padding;
try {
@@ -364,15 +406,9 @@ final class P11Signature extends SignatureSpi {
if (publicKey == null) {
throw new InvalidKeyException("Key must not be null");
}
- // Need to check RSA key length whenever a new key is set
- if (keyAlgorithm.equals("RSA") && publicKey != p11Key) {
- int keyLen;
- if (publicKey instanceof P11Key) {
- keyLen = ((P11Key) publicKey).length();
- } else {
- keyLen = ((RSAKey) publicKey).getModulus().bitLength();
- }
- checkRSAKeyLength(keyLen);
+ // Need to check key length whenever a new key is set
+ if (publicKey != p11Key) {
+ checkKeySize(keyAlgorithm, publicKey);
}
cancelOperation();
mode = M_VERIFY;
@@ -387,14 +423,8 @@ final class P11Signature extends SignatureSpi {
throw new InvalidKeyException("Key must not be null");
}
// Need to check RSA key length whenever a new key is set
- if (keyAlgorithm.equals("RSA") && privateKey != p11Key) {
- int keyLen;
- if (privateKey instanceof P11Key) {
- keyLen = ((P11Key) privateKey).keyLength;
- } else {
- keyLen = ((RSAKey) privateKey).getModulus().bitLength();
- }
- checkRSAKeyLength(keyLen);
+ if (privateKey != p11Key) {
+ checkKeySize(keyAlgorithm, privateKey);
}
cancelOperation();
mode = M_SIGN;
diff --git a/src/share/classes/sun/security/pkcs11/Token.java b/src/share/classes/sun/security/pkcs11/Token.java
index f19f8b7ca..b97ab0cc9 100644
--- a/src/share/classes/sun/security/pkcs11/Token.java
+++ b/src/share/classes/sun/security/pkcs11/Token.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, 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 sun.security.pkcs11;
import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
import java.io.*;
import java.lang.ref.*;
@@ -151,8 +152,8 @@ class Token implements Serializable {
privateCache = new KeyCache();
templateManager = config.getTemplateManager();
explicitCancel = config.getExplicitCancel();
- mechInfoMap = Collections.synchronizedMap
- (new HashMap<Long, CK_MECHANISM_INFO>(10));
+ mechInfoMap =
+ new ConcurrentHashMap<Long, CK_MECHANISM_INFO>(10);
}
boolean isWriteProtected() {
diff --git a/src/share/classes/sun/security/provider/certpath/OCSP.java b/src/share/classes/sun/security/provider/certpath/OCSP.java
index 2c375a869..dce8fd6b9 100644
--- a/src/share/classes/sun/security/provider/certpath/OCSP.java
+++ b/src/share/classes/sun/security/provider/certpath/OCSP.java
@@ -129,7 +129,8 @@ public final class OCSP {
("Exception while encoding OCSPRequest", e);
}
OCSPResponse ocspResponse = check(Collections.singletonList(certId),
- responderURI, issuerCert, null, Collections.<Extension>emptyList());
+ responderURI, issuerCert, null, null,
+ Collections.<Extension>emptyList());
return (RevocationStatus)ocspResponse.getSingleResponse(certId);
}
@@ -176,7 +177,7 @@ public final class OCSP {
("Exception while encoding OCSPRequest", e);
}
OCSPResponse ocspResponse = check(Collections.singletonList(certId),
- responderURI, responderCert, date, extensions);
+ responderURI, issuerCert, responderCert, date, extensions);
return (RevocationStatus) ocspResponse.getSingleResponse(certId);
}
@@ -185,6 +186,7 @@ public final class OCSP {
*
* @param certs the CertIds to be checked
* @param responderURI the URI of the OCSP responder
+ * @param issuerCert the issuer's certificate
* @param responderCert the OCSP responder's certificate
* @param date the time the validity of the OCSP responder's certificate
* should be checked against. If null, the current time is used.
@@ -195,6 +197,7 @@ public final class OCSP {
* encoding the OCSP Request or validating the OCSP Response
*/
static OCSPResponse check(List<CertId> certIds, URI responderURI,
+ X509Certificate issuerCert,
X509Certificate responderCert, Date date,
List<Extension> extensions)
throws IOException, CertPathValidatorException
@@ -284,7 +287,8 @@ public final class OCSP {
}
// verify the response
- ocspResponse.verify(certIds, responderCert, date, request.getNonce());
+ ocspResponse.verify(certIds, issuerCert, responderCert, date,
+ request.getNonce());
return ocspResponse;
}
diff --git a/src/share/classes/sun/security/provider/certpath/OCSPRequest.java b/src/share/classes/sun/security/provider/certpath/OCSPRequest.java
index 085424393..6bded9729 100644
--- a/src/share/classes/sun/security/provider/certpath/OCSPRequest.java
+++ b/src/share/classes/sun/security/provider/certpath/OCSPRequest.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
@@ -76,7 +76,8 @@ import sun.security.util.*;
class OCSPRequest {
- private static final boolean dump = false;
+ private static final Debug debug = Debug.getInstance("certpath");
+ private static final boolean dump = debug != null && Debug.isOn("ocsp");
// List of request CertIds
private final List<CertId> certIds;
@@ -138,8 +139,8 @@ class OCSPRequest {
if (dump) {
HexDumpEncoder hexEnc = new HexDumpEncoder();
- System.out.println("OCSPRequest bytes are... ");
- System.out.println(hexEnc.encode(bytes));
+ debug.println("OCSPRequest bytes...\n\n" +
+ hexEnc.encode(bytes) + "\n");
}
return bytes;
diff --git a/src/share/classes/sun/security/provider/certpath/OCSPResponse.java b/src/share/classes/sun/security/provider/certpath/OCSPResponse.java
index 955d63b57..113983796 100644
--- a/src/share/classes/sun/security/provider/certpath/OCSPResponse.java
+++ b/src/share/classes/sun/security/provider/certpath/OCSPResponse.java
@@ -132,7 +132,7 @@ public final class OCSPResponse {
private static ResponseStatus[] rsvalues = ResponseStatus.values();
private static final Debug debug = Debug.getInstance("certpath");
- private static final boolean dump = false;
+ private static final boolean dump = debug != null && Debug.isOn("ocsp");
private static final ObjectIdentifier OCSP_BASIC_RESPONSE_OID =
ObjectIdentifier.newInternal(new int[] { 1, 3, 6, 1, 5, 5, 7, 48, 1, 1});
private static final int CERT_STATUS_GOOD = 0;
@@ -177,11 +177,14 @@ public final class OCSPResponse {
private final ResponseStatus responseStatus;
private final Map<CertId, SingleResponse> singleResponseMap;
- private final List<X509CertImpl> certs;
private final AlgorithmId sigAlgId;
private final byte[] signature;
private final byte[] tbsResponseData;
private final byte[] responseNonce;
+ private List<X509CertImpl> certs;
+ private X509CertImpl signerCert = null;
+ private X500Principal responderName = null;
+ private KeyIdentifier responderKeyId = null;
/*
* Create an OCSP response from its ASN.1 DER encoding.
@@ -189,8 +192,8 @@ public final class OCSPResponse {
OCSPResponse(byte[] bytes) throws IOException {
if (dump) {
HexDumpEncoder hexEnc = new HexDumpEncoder();
- System.out.println("OCSPResponse bytes are...");
- System.out.println(hexEnc.encode(bytes));
+ debug.println("OCSPResponse bytes...\n\n" +
+ hexEnc.encode(bytes) + "\n");
}
DerValue der = new DerValue(bytes);
if (der.tag != DerValue.tag_Sequence) {
@@ -213,7 +216,7 @@ public final class OCSPResponse {
if (responseStatus != ResponseStatus.SUCCESSFUL) {
// no need to continue, responseBytes are not set.
singleResponseMap = Collections.emptyMap();
- certs = Collections.<X509CertImpl>emptyList();
+ certs = new ArrayList<X509CertImpl>();
sigAlgId = null;
signature = null;
tbsResponseData = null;
@@ -288,16 +291,15 @@ public final class OCSPResponse {
// responderID
short tag = (byte)(seq.tag & 0x1f);
if (tag == NAME_TAG) {
+ responderName = new X500Principal(seq.getData().toByteArray());
if (debug != null) {
- X500Principal responderName =
- new X500Principal(seq.getData().toByteArray());
- debug.println("OCSP Responder name: " + responderName);
+ debug.println("Responder's name: " + responderName);
}
} else if (tag == KEY_TAG) {
+ responderKeyId = new KeyIdentifier(seq.getData().getOctetString());
if (debug != null) {
- byte[] responderKey = seq.getData().getOctetString();
- debug.println("OCSP Responder key: " +
- Debug.toString(responderKey));
+ debug.println("Responder's key ID: " +
+ Debug.toString(responderKeyId.getIdentifier()));
}
} else {
throw new IOException("Bad encoding in responderID element of " +
@@ -368,18 +370,25 @@ public final class OCSPResponse {
certs = new ArrayList<X509CertImpl>(derCerts.length);
try {
for (int i = 0; i < derCerts.length; i++) {
- certs.add(new X509CertImpl(derCerts[i].toByteArray()));
+ X509CertImpl cert =
+ new X509CertImpl(derCerts[i].toByteArray());
+ certs.add(cert);
+
+ if (debug != null) {
+ debug.println("OCSP response cert #" + (i + 1) + ": " +
+ cert.getSubjectX500Principal());
+ }
}
} catch (CertificateException ce) {
throw new IOException("Bad encoding in X509 Certificate", ce);
}
} else {
- certs = Collections.<X509CertImpl>emptyList();
+ certs = new ArrayList<X509CertImpl>();
}
}
- void verify(List<CertId> certIds, X509Certificate responderCert,
- Date date, byte[] nonce)
+ void verify(List<CertId> certIds, X509Certificate issuerCert,
+ X509Certificate responderCert, Date date, byte[] nonce)
throws CertPathValidatorException
{
switch (responseStatus) {
@@ -414,22 +423,58 @@ public final class OCSPResponse {
}
}
+ // Locate the signer cert
+ if (signerCert == null) {
+ // Add the Issuing CA cert and/or Trusted Responder cert to the list
+ // of certs from the OCSP response
+ certs.add((X509CertImpl) issuerCert);
+ if (responderCert != null) {
+ certs.add((X509CertImpl) responderCert);
+ }
+
+ if (responderName != null) {
+ for (X509CertImpl cert : certs) {
+ if (cert.getSubjectX500Principal().equals(responderName)) {
+ signerCert = cert;
+ break;
+ }
+ }
+ } else if (responderKeyId != null) {
+ for (X509CertImpl cert : certs) {
+ KeyIdentifier certKeyId = cert.getSubjectKeyId();
+ if (certKeyId != null && responderKeyId.equals(certKeyId)) {
+ signerCert = cert;
+ break;
+ }
+ }
+ }
+ }
- // Check whether the cert returned by the responder is trusted
- if (!certs.isEmpty()) {
- X509CertImpl cert = certs.get(0);
- // First check if the cert matches the expected responder cert
- if (cert.equals(responderCert)) {
+ // Check whether the signer cert returned by the responder is trusted
+ if (signerCert != null) {
+ // Check if the response is signed by the issuing CA
+ if (signerCert.equals(issuerCert)) {
+ if (debug != null) {
+ debug.println("OCSP response is signed by the target's " +
+ "Issuing CA");
+ }
+ // cert is trusted, now verify the signed response
+
+ // Check if the response is signed by a trusted responder
+ } else if (signerCert.equals(responderCert)) {
+ if (debug != null) {
+ debug.println("OCSP response is signed by a Trusted " +
+ "Responder");
+ }
// cert is trusted, now verify the signed response
- // Next check if the cert was issued by the responder cert
- // which was set locally.
- } else if (cert.getIssuerX500Principal().equals(
- responderCert.getSubjectX500Principal())) {
+ // Check if the response is signed by an authorized responder
+ } else if (signerCert.getIssuerX500Principal().equals(
+ issuerCert.getSubjectX500Principal())) {
// Check for the OCSPSigning key purpose
try {
- List<String> keyPurposes = cert.getExtendedKeyUsage();
+ List<String> keyPurposes = signerCert.getExtendedKeyUsage();
if (keyPurposes == null ||
!keyPurposes.contains(KP_OCSP_SIGNING_OID)) {
throw new CertPathValidatorException(
@@ -446,16 +491,16 @@ public final class OCSPResponse {
// Check algorithm constraints specified in security property
// "jdk.certpath.disabledAlgorithms".
AlgorithmChecker algChecker = new AlgorithmChecker(
- new TrustAnchor(responderCert, null));
+ new TrustAnchor(issuerCert, null));
algChecker.init(false);
- algChecker.check(cert, Collections.<String>emptySet());
+ algChecker.check(signerCert, Collections.<String>emptySet());
// check the validity
try {
if (date == null) {
- cert.checkValidity();
+ signerCert.checkValidity();
} else {
- cert.checkValidity(date);
+ signerCert.checkValidity(date);
}
} catch (CertificateException e) {
throw new CertPathValidatorException(
@@ -471,7 +516,7 @@ public final class OCSPResponse {
// extension id-pkix-ocsp-nocheck.
//
Extension noCheck =
- cert.getExtension(PKIXExtensions.OCSPNoCheck_Id);
+ signerCert.getExtension(PKIXExtensions.OCSPNoCheck_Id);
if (noCheck != null) {
if (debug != null) {
debug.println("Responder's certificate includes " +
@@ -484,12 +529,15 @@ public final class OCSPResponse {
// verify the signature
try {
- cert.verify(responderCert.getPublicKey());
- responderCert = cert;
+ signerCert.verify(issuerCert.getPublicKey());
+ if (debug != null) {
+ debug.println("OCSP response is signed by an " +
+ "Authorized Responder");
+ }
// cert is trusted, now verify the signed response
} catch (GeneralSecurityException e) {
- responderCert = null;
+ signerCert = null;
}
} else {
throw new CertPathValidatorException(
@@ -500,12 +548,12 @@ public final class OCSPResponse {
// Confirm that the signed response was generated using the public
// key from the trusted responder cert
- if (responderCert != null) {
+ if (signerCert != null) {
// Check algorithm constraints specified in security property
// "jdk.certpath.disabledAlgorithms".
- AlgorithmChecker.check(responderCert.getPublicKey(), sigAlgId);
+ AlgorithmChecker.check(signerCert.getPublicKey(), sigAlgId);
- if (!verifySignature(responderCert)) {
+ if (!verifySignature(signerCert)) {
throw new CertPathValidatorException(
"Error verifying OCSP Response's signature");
}
@@ -555,7 +603,6 @@ public final class OCSPResponse {
/*
* Verify the signature of the OCSP response.
- * The responder's cert is implicitly trusted.
*/
private boolean verifySignature(X509Certificate cert)
throws CertPathValidatorException {
@@ -594,6 +641,13 @@ public final class OCSPResponse {
}
/*
+ * Returns the certificate for the authority that signed the OCSP response.
+ */
+ X509Certificate getSignerCertificate() {
+ return signerCert; // set in verify()
+ }
+
+ /*
* A class representing a single OCSP response.
*/
final static class SingleResponse implements OCSP.RevocationStatus {
diff --git a/src/share/classes/sun/security/provider/certpath/RevocationChecker.java b/src/share/classes/sun/security/provider/certpath/RevocationChecker.java
index f34e73710..bdd01c664 100644
--- a/src/share/classes/sun/security/provider/certpath/RevocationChecker.java
+++ b/src/share/classes/sun/security/provider/certpath/RevocationChecker.java
@@ -668,9 +668,6 @@ class RevocationChecker extends PKIXRevocationChecker {
throw new CertPathValidatorException(ce);
}
- X509Certificate respCert = (responderCert == null) ? issuerCert
- : responderCert;
-
// The algorithm constraints of the OCSP trusted responder certificate
// does not need to be checked in this code. The constraints will be
// checked when the responder's certificate is validated.
@@ -702,8 +699,8 @@ class RevocationChecker extends PKIXRevocationChecker {
nonce = ext.getValue();
}
}
- response.verify(Collections.singletonList(certId), respCert,
- params.date(), nonce);
+ response.verify(Collections.singletonList(certId), issuerCert,
+ responderCert, params.date(), nonce);
} else {
URI responderURI = (this.responderURI != null)
@@ -716,8 +713,8 @@ class RevocationChecker extends PKIXRevocationChecker {
}
response = OCSP.check(Collections.singletonList(certId),
- responderURI, respCert, null,
- ocspExtensions);
+ responderURI, issuerCert, responderCert,
+ null, ocspExtensions);
}
} catch (IOException e) {
throw new CertPathValidatorException(
@@ -733,7 +730,7 @@ class RevocationChecker extends PKIXRevocationChecker {
if (revocationTime.before(params.date())) {
Throwable t = new CertificateRevokedException(
revocationTime, rs.getRevocationReason(),
- respCert.getSubjectX500Principal(),
+ response.getSignerCertificate().getSubjectX500Principal(),
rs.getSingleExtensions());
throw new CertPathValidatorException(t.getMessage(), t, null,
-1, BasicReason.REVOKED);
diff --git a/src/share/classes/sun/security/x509/X509CertImpl.java b/src/share/classes/sun/security/x509/X509CertImpl.java
index b96674e2e..b3f448b09 100644
--- a/src/share/classes/sun/security/x509/X509CertImpl.java
+++ b/src/share/classes/sun/security/x509/X509CertImpl.java
@@ -1109,6 +1109,20 @@ public class X509CertImpl extends X509Certificate implements DerEncoder {
}
/**
+ * Returns the subject's key identifier, or null
+ */
+ public KeyIdentifier getSubjectKeyId() {
+ SubjectKeyIdentifierExtension ski = getSubjectKeyIdentifierExtension();
+ if (ski != null) {
+ try {
+ return (KeyIdentifier)ski.get(
+ SubjectKeyIdentifierExtension.KEY_ID);
+ } catch (IOException ioe) {} // not possible
+ }
+ return null;
+ }
+
+ /**
* Get AuthorityKeyIdentifier extension
* @return AuthorityKeyIdentifier object or null (if no such object
* in certificate)
diff --git a/src/share/classes/sun/util/calendar/ZoneInfoFile.java b/src/share/classes/sun/util/calendar/ZoneInfoFile.java
index d3ca7e94e..4c423b703 100644
--- a/src/share/classes/sun/util/calendar/ZoneInfoFile.java
+++ b/src/share/classes/sun/util/calendar/ZoneInfoFile.java
@@ -406,6 +406,9 @@ public final class ZoneInfoFile {
// LocalDateTime.of(2037, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC));
private static final long LDT2037 = 2114380800L;
+ //Current time. Used to determine future GMToffset transitions
+ private static final long CURRT = System.currentTimeMillis()/1000;
+
/* Get a ZoneInfo instance.
*
* @param standardTransitions the standard transitions, not null
@@ -427,8 +430,10 @@ public final class ZoneInfoFile {
boolean willGMTOffsetChange = false;
// rawOffset, pick the last one
- if (standardTransitions.length > 0)
+ if (standardTransitions.length > 0) {
rawOffset = standardOffsets[standardOffsets.length - 1] * 1000;
+ willGMTOffsetChange = standardTransitions[standardTransitions.length - 1] > CURRT;
+ }
else
rawOffset = standardOffsets[0] * 1000;
diff --git a/src/share/classes/sun/util/resources/TimeZoneNames.java b/src/share/classes/sun/util/resources/TimeZoneNames.java
index 81b28e79f..f275a716b 100644
--- a/src/share/classes/sun/util/resources/TimeZoneNames.java
+++ b/src/share/classes/sun/util/resources/TimeZoneNames.java
@@ -44,6 +44,9 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
protected final Object[][] getContents() {
// Note: generic names came from CLDR with some adjustments.
+ String ACT[] = new String[] {"Acre Time", "ACT",
+ "Acre Summer Time", "ACST",
+ "Acre Time", "ACT"};
String ADELAIDE[] = new String[] {"Central Standard Time (South Australia)", "CST",
"Central Summer Time (South Australia)", "CST",
"Central Time (South Australia)", "CT"};
@@ -362,7 +365,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -424,7 +427,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -510,7 +513,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
"Suriname Time", "SRT"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -518,7 +521,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -765,7 +768,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -893,7 +896,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"Middle Europe Time", "MET",
"Middle Europe Summer Time", "MEST",
"Middle Europe Time", "MET"}},
diff --git a/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java b/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java
index b61fbd307..e49f23359 100644
--- a/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java
+++ b/src/share/classes/sun/util/resources/de/TimeZoneNames_de.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
public final class TimeZoneNames_de extends TimeZoneNamesBundle {
protected final Object[][] getContents() {
+ String ACT[] = new String[] {"Acre Normalzeit", "ACT",
+ "Acre Sommerzeit", "ACST"};
String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien)", "CST",
"Zentrale Sommerzeit (S\u00FCdaustralien)", "CST"};
String AGT[] = new String[] {"Argentinische Zeit", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
"Suriname Sommerzeit", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"Zentraleurop\u00e4ische Zeit", "MET",
"Zentraleurop\u00e4ische Sommerzeit", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java b/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java
index 822ba2d41..55a4040b6 100644
--- a/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java
+++ b/src/share/classes/sun/util/resources/es/TimeZoneNames_es.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
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"};
String ADELAIDE[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia)", "CST",
"Hora de verano Central (Sur de Australia)", "CST"};
String AGT[] = new String[] {"Hora de Argentina", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
"Hora de verano de Surinam", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"Hora de Europa Central", "MET",
"Hora de verano de Europa Central", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java b/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java
index fd487e209..3f9565ef4 100644
--- a/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java
+++ b/src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
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"};
String ADELAIDE[] = new String[] {"Heure standard d'Australie centrale (Australie du sud)", "CST",
"Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud)", "CST"};
String AGT[] = new String[] {"Heure D'Argentine", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
"Heure d'\u00e9t\u00e9 du Surinam", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"Heure de l'Europe centrale", "MET",
"Heure d'\u00e9t\u00e9 de l'Europe centrale", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java b/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java
index 0b51765e0..8217ce5af 100644
--- a/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java
+++ b/src/share/classes/sun/util/resources/it/TimeZoneNames_it.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
public final class TimeZoneNames_it extends TimeZoneNamesBundle {
protected final Object[][] getContents() {
+ String ACT[] = new String[] {"Ora di Acre", "ACT",
+ "Ora estiva di Acre", "ACST"};
String ADELAIDE[] = new String[] {"Ora standard centrale (Australia del Sud)", "CST",
"Ora estiva centrale (Australia del Sud)", "CST"};
String AGT[] = new String[] {"Ora dell'Argentina", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
"Ora estiva di Suriname", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"Ora dell'Europa centrale", "MET",
"Ora estiva dell'Europa centrale", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java b/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java
index 2c8734c73..6a71a9fb6 100644
--- a/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java
+++ b/src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
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"};
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"};
String AGT[] = new String[] {"\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
"\u30b9\u30ea\u30ca\u30e0\u590f\u6642\u9593", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"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"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java b/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java
index 79542f7a3..12e8b8323 100644
--- a/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java
+++ b/src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
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"};
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"};
String AGT[] = new String[] {"\uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
"\uc218\ub9ac\ub0a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"\uc911\ubd80 \uc720\ub7fd \uc2dc\uac04", "MET",
"\uc911\ubd80 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java b/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java
index d549c10d5..29feb186b 100644
--- a/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java
+++ b/src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
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"};
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"};
String AGT[] = new String[] {"Fuso hor\u00e1rio da Argentina", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
"Fuso hor\u00e1rio de ver\u00e3o do Suriname", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"Fuso hor\u00e1rio da Europa M\u00e9dia", "MET",
"Fuso hor\u00e1rio de ver\u00e3o da Europa M\u00e9dia", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java b/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java
index 667b103cc..8d3c00000 100644
--- a/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java
+++ b/src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
protected final Object[][] getContents() {
+ String ACT[] = new String[] {"Acre, normaltid", "ACT",
+ "Acre, sommartid", "ACST"};
String ADELAIDE[] = new String[] {"Central standardtid (Sydaustralien)", "CST",
"Central sommartid (South Australia)", "CST"};
String AGT[] = new String[] {"Argentina, normaltid", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
"Surinam, sommartid", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"Mellaneuropeisk tid", "MET",
"Mellaneuropeisk sommartid", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java
index a3bbb3344..9bf8d1b33 100644
--- a/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java
+++ b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
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"};
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"};
String AGT[] = new String[] {"\u963f\u6839\u5ef7\u65f6\u95f4", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
"\u82cf\u5229\u5357\u590f\u4ee4\u65f6", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -635,7 +637,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -753,7 +755,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"\u4e2d\u6b27\u65f6\u95f4", "MET",
"\u4e2d\u6b27\u590f\u4ee4\u65f6", "MEST"}},
{"Mexico/BajaNorte", PST},
diff --git a/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java
index 322eecfb3..ab14a98fd 100644
--- a/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java
+++ b/src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java
@@ -45,6 +45,8 @@ import sun.util.resources.TimeZoneNamesBundle;
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"};
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"};
String AGT[] = new String[] {"\u963f\u6839\u5ef7\u6642\u9593", "ART",
@@ -287,7 +289,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Timbuktu", GMT},
- {"Africa/Tripoli", CET},
+ {"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
{"Africa/Windhoek", WAT},
{"America/Adak", HAST},
@@ -345,7 +347,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{"America/Detroit", EST},
{"America/Dominica", AST},
{"America/Edmonton", MST},
- {"America/Eirunepe", AMT},
+ {"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Wayne", EST},
@@ -422,7 +424,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
"\u8607\u5229\u5357\u590f\u4ee4\u6642\u9593", "SRST"}},
{"America/Port-au-Prince", EST},
{"America/Port_of_Spain", AST},
- {"America/Porto_Acre", AMT},
+ {"America/Porto_Acre", ACT},
{"America/Porto_Velho", AMT},
{"America/Puerto_Rico", AST},
{"America/Rainy_River", CST},
@@ -430,7 +432,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{"America/Recife", BRT},
{"America/Regina", CST},
{"America/Resolute", CST},
- {"America/Rio_Branco", AMT},
+ {"America/Rio_Branco", ACT},
{"America/Rosario", AGT},
{"America/Santa_Isabel", PST},
{"America/Santarem", BRT},
@@ -636,7 +638,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{"Australia/Yancowinna", BROKEN_HILL},
{"BET", BRT},
{"BST", BDT},
- {"Brazil/Acre", AMT},
+ {"Brazil/Acre", ACT},
{"Brazil/DeNoronha", NORONHA},
{"Brazil/East", BRT},
{"Brazil/West", AMT},
@@ -754,7 +756,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{"Jamaica", EST},
{"Japan", JST},
{"Kwajalein", MHT},
- {"Libya", CET},
+ {"Libya", EET},
{"MET", new String[] {"\u4e2d\u6b50\u6642\u9593", "MET",
"\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "MEST"}},
{"Mexico/BajaNorte", PST},