--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/CopyInterimCLDRConverter.gmk Tue Aug 04 10:59:31 2015 -0700
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# 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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+##########################################################################################
+
+### CLDRConverter needs the JRE time zone names from the java.base source.
+
+define cldrconverter_copytznames
+ $(MKDIR) -p '$(@D)'
+ $(RM) '$@'
+ $(SED) -e "s/package sun.util.resources/package build.tools.cldrconverter/" \
+ -e "s/extends TimeZoneNamesBundle//" \
+ -e "s/protected final/static final/" \
+ < $(<) > $@
+endef
+
+$(eval $(call SetupCopyFiles,COPY_INTERIM_CLDRCONVERTER, \
+ SRC := $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/resources, \
+ DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes/build/tools/cldrconverter, \
+ FILES := TimeZoneNames.java, \
+ MACRO := cldrconverter_copytznames))
+
+##########################################################################################
+
+all: $(COPY_INTERIM_CLDRCONVERTER)
--- a/jdk/make/Tools.gmk Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/make/Tools.gmk Tue Aug 04 10:59:31 2015 -0700
@@ -38,8 +38,8 @@
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
SETUP := GENERATE_OLDBYTECODE, \
- ADD_JAVAC_FLAGS := "-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes", \
- SRC := $(JDK_TOPDIR)/make/src/classes, \
+ ADD_JAVAC_FLAGS := "-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes$(PATH_SEP)$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes", \
+ SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
COPY := boot.modules ext.modules))
--- a/jdk/make/src/classes/build/tools/cldrconverter/Bundle.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/make/src/classes/build/tools/cldrconverter/Bundle.java Tue Aug 04 10:59:31 2015 -0700
@@ -27,12 +27,15 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Enumeration;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Objects;
+import java.util.ResourceBundle;
class Bundle {
static enum Type {
@@ -298,8 +301,8 @@
continue;
}
- if (id.startsWith("en")) {
- fillInAbbrs(key, nameMap);
+ if (id.equals("en")) {
+ fillInJREs(key, nameMap);
}
}
}
@@ -381,7 +384,8 @@
if (Objects.nonNull(parentsMap)) {
for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
String key = it.next();
- if (Objects.deepEquals(parentsMap.get(key), myMap.get(key))) {
+ if (!key.equals("numberingScripts") && // real body "NumberElements" may differ
+ Objects.deepEquals(parentsMap.get(key), myMap.get(key))) {
it.remove();
}
}
@@ -621,78 +625,41 @@
return null;
}
- private void fillInAbbrs(String key, Map<String, String> map) {
- fillInAbbrs(TZ_STD_LONG_KEY, TZ_STD_SHORT_KEY, map);
- fillInAbbrs(TZ_DST_LONG_KEY, TZ_DST_SHORT_KEY, map);
- fillInAbbrs(TZ_GEN_LONG_KEY, TZ_GEN_SHORT_KEY, map);
+ static Object[][] jreTimeZoneNames = TimeZoneNames.getContents();
+ private void fillInJREs(String key, Map<String, String> map) {
+ String tzid = null;
- // If the standard std is "Standard Time" and daylight std is "Summer Time",
- // replace the standard std with the generic std to avoid using
- // the same abbrivation except for Australia time zone names.
- String std = map.get(TZ_STD_SHORT_KEY);
- String dst = map.get(TZ_DST_SHORT_KEY);
- String gen = map.get(TZ_GEN_SHORT_KEY);
- if (std != null) {
- if (dst == null) {
- // if dst is null, create long and short names from the standard
- // std. ("Something Standard Time" to "Something Daylight Time",
- // or "Something Time" to "Something Summer Time")
- String name = map.get(TZ_STD_LONG_KEY);
- if (name != null) {
- if (name.contains("Standard Time")) {
- name = name.replace("Standard Time", "Daylight Time");
- } else if (name.endsWith("Mean Time")) {
- if (!name.startsWith("Greenwich ")) {
- name = name.replace("Mean Time", "Summer Time");
+ if (key.startsWith(CLDRConverter.METAZONE_ID_PREFIX)) {
+ // Look for tzid
+ String meta = key.substring(CLDRConverter.METAZONE_ID_PREFIX.length());
+ if (meta.equals("GMT")) {
+ tzid = meta;
+ } else {
+ for (String tz : CLDRConverter.handlerMetaZones.keySet()) {
+ if (CLDRConverter.handlerMetaZones.get(tz).equals(meta)) {
+ tzid = tz;
+ break;
}
- } else if (name.endsWith(" Time")) {
- name = name.replace(" Time", " Summer Time");
}
- map.put(TZ_DST_LONG_KEY, name);
- fillInAbbrs(TZ_DST_LONG_KEY, TZ_DST_SHORT_KEY, map);
+ }
+ } else {
+ tzid = key.substring(CLDRConverter.TIMEZONE_ID_PREFIX.length());
+ }
+
+ if (tzid != null) {
+ for (Object[] jreZone : jreTimeZoneNames) {
+ if (jreZone[0].equals(tzid)) {
+ for (int i = 0; i < ZONE_NAME_KEYS.length; i++) {
+ if (map.get(ZONE_NAME_KEYS[i]) == null) {
+ String[] jreNames = (String[])jreZone[1];
+ map.put(ZONE_NAME_KEYS[i], jreNames[i]);
}
}
- if (gen == null) {
- String name = map.get(TZ_STD_LONG_KEY);
- if (name != null) {
- if (name.endsWith("Standard Time")) {
- name = name.replace("Standard Time", "Time");
- } else if (name.endsWith("Mean Time")) {
- if (!name.startsWith("Greenwich ")) {
- name = name.replace("Mean Time", "Time");
- }
- }
- map.put(TZ_GEN_LONG_KEY, name);
- fillInAbbrs(TZ_GEN_LONG_KEY, TZ_GEN_SHORT_KEY, map);
- }
- }
+ break;
}
}
-
- private void fillInAbbrs(String longKey, String shortKey, Map<String, String> map) {
- String abbr = map.get(shortKey);
- if (abbr == null) {
- String name = map.get(longKey);
- if (name != null) {
- abbr = toAbbr(name);
- if (abbr != null) {
- map.put(shortKey, abbr);
- }
}
}
- }
-
- private String toAbbr(String name) {
- String[] substrs = name.split("\\s+");
- StringBuilder sb = new StringBuilder();
- for (String s : substrs) {
- char c = s.charAt(0);
- if (c >= 'A' && c <= 'Z') {
- sb.append(c);
- }
- }
- return sb.length() > 0 ? sb.toString() : null;
- }
private void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
switch (cldrLetter) {
--- a/jdk/make/src/classes/build/tools/cldrconverter/LDMLParseHandler.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/make/src/classes/build/tools/cldrconverter/LDMLParseHandler.java Tue Aug 04 10:59:31 2015 -0700
@@ -27,6 +27,7 @@
import java.io.File;
import java.io.IOException;
+import java.text.DateFormatSymbols;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -900,6 +901,12 @@
Entry<?> entry = (Entry<?>) currentContainer;
Object value = entry.getValue();
if (value != null) {
+ String key = entry.getKey();
+ // Tweak for MonthNames for the root locale, Needed for
+ // SimpleDateFormat.format()/parse() roundtrip.
+ if (id.equals("root") && key.startsWith("MonthNames")) {
+ value = new DateFormatSymbols(Locale.US).getShortMonths();
+ }
put(entry.getKey(), value);
}
}
--- a/jdk/src/java.base/share/classes/java/util/regex/Matcher.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/regex/Matcher.java Tue Aug 04 10:59:31 2015 -0700
@@ -63,7 +63,7 @@
*
* <p> A matcher finds matches in a subset of its input called the
* <i>region</i>. By default, the region contains all of the matcher's input.
- * The region can be modified via the{@link #region region} method and queried
+ * The region can be modified via the {@link #region region} method and queried
* via the {@link #regionStart regionStart} and {@link #regionEnd regionEnd}
* methods. The way that the region boundaries interact with some pattern
* constructs can be changed. See {@link #useAnchoringBounds
@@ -1639,15 +1639,15 @@
*/
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("java.util.regex.Matcher");
- sb.append("[pattern=" + pattern());
- sb.append(" region=");
- sb.append(regionStart() + "," + regionEnd());
- sb.append(" lastmatch=");
+ sb.append("java.util.regex.Matcher")
+ .append("[pattern=").append(pattern())
+ .append(" region=")
+ .append(regionStart()).append(',').append(regionEnd())
+ .append(" lastmatch=");
if ((first >= 0) && (group() != null)) {
sb.append(group());
}
- sb.append("]");
+ sb.append(']');
return sb.toString();
}
--- a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java Tue Aug 04 10:59:31 2015 -0700
@@ -565,7 +565,7 @@
* <p>
* <b><a name="usc">Scripts</a></b> are specified either with the prefix {@code Is}, as in
* {@code IsHiragana}, or by using the {@code script} keyword (or its short
- * form {@code sc})as in {@code script=Hiragana} or {@code sc=Hiragana}.
+ * form {@code sc}) as in {@code script=Hiragana} or {@code sc=Hiragana}.
* <p>
* The script names supported by <code>Pattern</code> are the valid script names
* accepted and defined by
@@ -1299,18 +1299,22 @@
if (slashEIndex == -1)
return "\\Q" + s + "\\E";
- StringBuilder sb = new StringBuilder(s.length() * 2);
+ int lenHint = s.length();
+ lenHint = (lenHint < Integer.MAX_VALUE - 8 - lenHint) ?
+ (lenHint << 1) : (Integer.MAX_VALUE - 8);
+
+ StringBuilder sb = new StringBuilder(lenHint);
sb.append("\\Q");
- slashEIndex = 0;
int current = 0;
- while ((slashEIndex = s.indexOf("\\E", current)) != -1) {
- sb.append(s.substring(current, slashEIndex));
+ do {
+ sb.append(s, current, slashEIndex)
+ .append("\\E\\\\E\\Q");
current = slashEIndex + 2;
- sb.append("\\E\\\\E\\Q");
- }
- sb.append(s.substring(current, s.length()));
- sb.append("\\E");
- return sb.toString();
+ } while ((slashEIndex = s.indexOf("\\E", current)) != -1);
+
+ return sb.append(s, current, s.length())
+ .append("\\E")
+ .toString();
}
/**
@@ -1367,14 +1371,16 @@
}
/**
- * The pattern is converted to normalizedD form and then a pure group
- * is constructed to match canonical equivalences of the characters.
+ * The pattern is converted to normalized form ({@linkplain
+ * java.text.Normalizer.Form.NFD NFD}, canonical decomposition)
+ * and then a pure group is constructed to match canonical
+ * equivalences of the characters.
*/
private void normalize() {
boolean inCharClass = false;
int lastCodePoint = -1;
- // Convert pattern into normalizedD form
+ // Convert pattern into normalized form
normalizedPattern = Normalizer.normalize(pattern, Normalizer.Form.NFD);
patternLength = normalizedPattern.length();
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java Tue Aug 04 10:59:31 2015 -0700
@@ -80,7 +80,17 @@
LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(TimeZoneNameProvider.class, locale);
TimeZoneNameProvider provider = adapter.getTimeZoneNameProvider();
if (provider instanceof TimeZoneNameProviderImpl) {
- return ((TimeZoneNameProviderImpl)provider).getZoneStrings(locale);
+ String[][] zoneStrings = ((TimeZoneNameProviderImpl)provider).getZoneStrings(locale);
+
+ if (zoneStrings.length == 0 && locale.equals(Locale.ROOT)) {
+ // Unlike other *Name provider, zoneStrings search won't do the fallback
+ // name search. If the ResourceBundle found for the root locale contains no
+ // zoneStrings, just use the one for English, assuming English bundle
+ // contains all the tzids and their names.
+ zoneStrings= getZoneStrings(Locale.ENGLISH);
+ }
+
+ return zoneStrings;
}
// Performs per-ID retrieval.
--- a/jdk/src/java.base/unix/native/libnio/ch/Net.c Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.base/unix/native/libnio/ch/Net.c Tue Aug 04 10:59:31 2015 -0700
@@ -29,6 +29,7 @@
#include <string.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
+#include <limits.h>
#include "jni.h"
#include "jni_util.h"
@@ -709,7 +710,12 @@
int rv;
pfd.fd = fdval(env, fdo);
pfd.events = events;
- rv = poll(&pfd, 1, timeout);
+ if (timeout < -1) {
+ timeout = -1;
+ } else if (timeout > INT_MAX) {
+ timeout = INT_MAX;
+ }
+ rv = poll(&pfd, 1, (int)timeout);
if (rv >= 0) {
return pfd.revents;
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java Tue Aug 04 10:59:31 2015 -0700
@@ -34,8 +34,6 @@
import sun.security.krb5.internal.*;
import sun.security.krb5.internal.crypto.KeyUsage;
import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
import sun.security.util.DerValue;
@@ -65,7 +63,6 @@
PrincipalName client = tgt.getClient();
PrincipalName tgService = tgt.getServer();
- PrincipalName server = serviceTicket.getServer();
if (!serviceTicket.getClient().equals(client))
throw new KrbException(Krb5.KRB_ERR_GENERIC,
"Client principal does not match");
@@ -78,28 +75,10 @@
options.set(KDCOptions.FORWARDED, true);
options.set(KDCOptions.FORWARDABLE, true);
- HostAddresses sAddrs = null;
-
- // GSSName.NT_HOSTBASED_SERVICE should display with KRB_NT_SRV_HST
- if (server.getNameType() == PrincipalName.KRB_NT_SRV_HST) {
- sAddrs = new HostAddresses(server);
- } else if (server.getNameType() == PrincipalName.KRB_NT_UNKNOWN) {
- // Sometimes this is also a server
- if (server.getNameStrings().length >= 2) {
- String host = server.getNameStrings()[1];
- try {
- InetAddress[] addr = InetAddress.getAllByName(host);
- if (addr != null && addr.length > 0) {
- sAddrs = new HostAddresses(addr);
- }
- } catch (UnknownHostException ioe) {
- // maybe we guessed wrong, let sAddrs be null
- }
- }
- }
-
KrbTgsReq tgsReq = new KrbTgsReq(options, tgt, tgService,
- null, null, null, null, sAddrs, null, null, null);
+ null, null, null, null,
+ null, // No easy way to get addresses right
+ null, null, null);
credMessg = createMessage(tgsReq.sendAndGetCreds(), key);
obuf = credMessg.asn1Encode();
@@ -111,7 +90,6 @@
EncryptionKey sessionKey
= delegatedCreds.getSessionKey();
PrincipalName princ = delegatedCreds.getClient();
- Realm realm = princ.getRealm();
PrincipalName tgService = delegatedCreds.getServer();
KrbCredInfo credInfo = new KrbCredInfo(sessionKey,
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java Tue Aug 04 10:59:31 2015 -0700
@@ -39,6 +39,7 @@
import java.net.Inet6Address;
import java.net.UnknownHostException;
import java.io.IOException;
+import java.util.Arrays;
/**
* Implements the ASN.1 HostAddress type.
@@ -295,4 +296,11 @@
}
}
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(Arrays.toString(address));
+ sb.append('(').append(addrType).append(')');
+ return sb.toString();
+ }
}
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java Tue Aug 04 10:59:31 2015 -0700
@@ -338,4 +338,9 @@
for (int i = 0; i < inetAddresses.length; i++)
addresses[i] = new HostAddress(inetAddresses[i]);
}
+
+ @Override
+ public String toString() {
+ return Arrays.toString(addresses);
+ }
}
--- a/jdk/src/java.sql/share/classes/javax/sql/RowSet.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/src/java.sql/share/classes/javax/sql/RowSet.java Tue Aug 04 10:59:31 2015 -0700
@@ -1477,7 +1477,7 @@
/**
* Sets the designated parameter to a <code>InputStream</code> object.
- * The "{@code InputStream} must contain the number
+ * The {@code InputStream} must contain the number
* of characters specified by length, otherwise a <code>SQLException</code> will be
* generated when the <code>CallableStatement</code> is executed.
* This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
--- a/jdk/test/TEST.groups Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/test/TEST.groups Tue Aug 04 10:59:31 2015 -0700
@@ -43,7 +43,8 @@
tier3 = \
:jdk_rmi \
- :jdk_beans
+ :jdk_beans \
+ :jdk_imageio
###############################################################################
#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/text/Format/NumberFormat/Bug8132125.java Tue Aug 04 10:59:31 2015 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * 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 8132125
+ * @summary Checks Swiss' number elements
+ */
+
+import java.text.*;
+import java.util.*;
+
+public class Bug8132125 {
+ public static void main(String[] args) {
+ Locale deCH = new Locale("de", "CH");
+ NumberFormat nf = NumberFormat.getInstance(deCH);
+
+ String expected = "54'839'483.142"; // i.e. "." as decimal separator, "'" as grouping separator
+ String actual = nf.format(54839483.1415);
+ if (!actual.equals(expected)) {
+ throw new RuntimeException("correct for de_CH: " + expected + " vs. actual " + actual);
+ }
+ }
+}
--- a/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java Tue Aug 04 10:59:31 2015 -0700
@@ -146,7 +146,7 @@
{"Asia/Macau", "China Standard Time", preferred, Locale.ENGLISH, TextStyle.FULL},
{"Asia/Taipei", "Taipei Standard Time", preferred, Locale.ENGLISH, TextStyle.FULL},
{"America/Chicago", "CST", none, Locale.ENGLISH, TextStyle.SHORT},
- {"Asia/Taipei", "TST", preferred, Locale.ENGLISH, TextStyle.SHORT},
+ {"Asia/Taipei", "CST", preferred, Locale.ENGLISH, TextStyle.SHORT},
{"Australia/South", "ACST", preferred_s, Locale.ENGLISH, TextStyle.SHORT},
{"America/Chicago", "CDT", none, Locale.ENGLISH, TextStyle.SHORT},
{"Asia/Shanghai", "CDT", preferred_s, Locale.ENGLISH, TextStyle.SHORT},
--- a/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java Tue Aug 04 10:59:31 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,12 +23,13 @@
/*
* @test
- * @bug 8005471 8008577
+ * @bug 8005471 8008577 8129881 8130845
* @run main/othervm -Djava.locale.providers=CLDR CLDRDisplayNamesTest
* @summary Make sure that localized time zone names of CLDR are used
* if specified.
*/
+import java.text.*;
import java.util.*;
import static java.util.TimeZone.*;
@@ -72,6 +73,8 @@
};
public static void main(String[] args) {
+ // Make sure that localized time zone names of CLDR are used
+ // if specified.
TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
int errors = 0;
for (String[] data : CLDR_DATA) {
@@ -87,6 +90,35 @@
}
}
}
+
+ // for 8129881
+ tz = TimeZone.getTimeZone("Europe/Vienna");
+ String name = tz.getDisplayName(false, SHORT);
+ if (!"CET".equals(name)) {
+ System.err.printf("error: got '%s' expected 'CET' %n", name);
+ errors++;
+ }
+
+ // for 8130845
+ SimpleDateFormat fmtROOT = new SimpleDateFormat("EEE MMM d hh:mm:ss z yyyy", Locale.ROOT);
+ SimpleDateFormat fmtUS = new SimpleDateFormat("EEE MMM d hh:mm:ss z yyyy", Locale.US);
+ SimpleDateFormat fmtUK = new SimpleDateFormat("EEE MMM d hh:mm:ss z yyyy", Locale.UK);
+ Locale originalLocale = Locale.getDefault();
+ try {
+ Locale.setDefault(Locale.ROOT);
+ fmtROOT.parse("Thu Nov 13 04:35:51 AKST 2008");
+ fmtUS.parse("Thu Nov 13 04:35:51 AKST 2008");
+ fmtUK.parse("Thu Nov 13 04:35:51 GMT-09:00 2008");
+ String dateString = new Date().toString();
+ System.out.println("Date: "+dateString);
+ System.out.println("Parsed Date: "+new Date(Date.parse(dateString)).toString());
+ } catch (ParseException pe) {
+ System.err.println(pe);
+ errors++;
+ } finally {
+ Locale.setDefault(originalLocale);
+ }
+
if (errors > 0) {
throw new RuntimeException("test failed");
}
--- a/jdk/test/sun/security/krb5/auto/KDC.java Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/test/sun/security/krb5/auto/KDC.java Tue Aug 04 10:59:31 2015 -0700
@@ -745,9 +745,10 @@
bFlags[Krb5.TKT_OPTS_FORWARDABLE] = true;
}
}
+ // We do not request for addresses for FORWARDED tickets
if (options.containsKey(Option.CHECK_ADDRESSES)
&& body.kdcOptions.get(KDCOptions.FORWARDED)
- && body.addresses == null) {
+ && body.addresses != null) {
throw new KrbException(Krb5.KDC_ERR_BADOPTION);
}
if (body.kdcOptions.get(KDCOptions.FORWARDED) ||
--- a/jdk/test/sun/text/resources/LocaleData.cldr Fri Jul 31 10:15:03 2015 -0700
+++ b/jdk/test/sun/text/resources/LocaleData.cldr Tue Aug 04 10:59:31 2015 -0700
@@ -2630,31 +2630,31 @@
LocaleNames/en_SG/VC=St. Vincent & Grenadines
LocaleNames/en_SG/WF=Wallis & Futuna
#in
-FormatData/in/MonthNames/0=M01
-FormatData/in/MonthNames/1=M02
-FormatData/in/MonthNames/2=M03
-FormatData/in/MonthNames/3=M04
-FormatData/in/MonthNames/4=M05
-FormatData/in/MonthNames/5=M06
-FormatData/in/MonthNames/6=M07
-FormatData/in/MonthNames/7=M08
-FormatData/in/MonthNames/8=M09
-FormatData/in/MonthNames/9=M10
-FormatData/in/MonthNames/10=M11
-FormatData/in/MonthNames/11=M12
+FormatData/in/MonthNames/0=Jan
+FormatData/in/MonthNames/1=Feb
+FormatData/in/MonthNames/2=Mar
+FormatData/in/MonthNames/3=Apr
+FormatData/in/MonthNames/4=May
+FormatData/in/MonthNames/5=Jun
+FormatData/in/MonthNames/6=Jul
+FormatData/in/MonthNames/7=Aug
+FormatData/in/MonthNames/8=Sep
+FormatData/in/MonthNames/9=Oct
+FormatData/in/MonthNames/10=Nov
+FormatData/in/MonthNames/11=Dec
FormatData/in/MonthNames/12=
-FormatData/in/MonthAbbreviations/0=M01
-FormatData/in/MonthAbbreviations/1=M02
-FormatData/in/MonthAbbreviations/2=M03
-FormatData/in/MonthAbbreviations/3=M04
-FormatData/in/MonthAbbreviations/4=M05
-FormatData/in/MonthAbbreviations/5=M06
-FormatData/in/MonthAbbreviations/6=M07
-FormatData/in/MonthAbbreviations/7=M08
-FormatData/in/MonthAbbreviations/8=M09
-FormatData/in/MonthAbbreviations/9=M10
-FormatData/in/MonthAbbreviations/10=M11
-FormatData/in/MonthAbbreviations/11=M12
+FormatData/in/MonthAbbreviations/0=Jan
+FormatData/in/MonthAbbreviations/1=Feb
+FormatData/in/MonthAbbreviations/2=Mar
+FormatData/in/MonthAbbreviations/3=Apr
+FormatData/in/MonthAbbreviations/4=May
+FormatData/in/MonthAbbreviations/5=Jun
+FormatData/in/MonthAbbreviations/6=Jul
+FormatData/in/MonthAbbreviations/7=Aug
+FormatData/in/MonthAbbreviations/8=Sep
+FormatData/in/MonthAbbreviations/9=Oct
+FormatData/in/MonthAbbreviations/10=Nov
+FormatData/in/MonthAbbreviations/11=Dec
FormatData/in/DayNames/0=Sun
FormatData/in/DayNames/1=Mon
FormatData/in/DayNames/2=Tue
@@ -5570,7 +5570,7 @@
# bug 6507067
TimeZoneNames/zh_TW/Asia\/Taipei/1=\u53f0\u5317\u6a19\u6e96\u6642\u9593
-TimeZoneNames/zh_TW/Asia\/Taipei/2=TST
+TimeZoneNames/zh_TW/Asia\/Taipei/2=CST
# bug 6645271
FormatData/hr_HR/DatePatterns/2=d. MMM y.